uuid_generate

Autres langues

Langue: ja

Autres versions - même langue

Version: May 2006 (openSuse - 09/10/07)

Section: 3 (Bibliothèques de fonctions)

̾Á°

uuid_generate, uuid_generate_random, uuid_generate_time - ¾¤È½Å¤Ê¤é¤Ê¤¤ UUID Ãͤò¿·¤·¤¯ºîÀ®¤¹¤ë

½ñ¼°


#include <uuid/uuid.h>



void uuid_generate(uuid_t out);

void uuid_generate_random(uuid_t out);

void uuid_generate_time(uuid_t out);

ÀâÌÀ

uuid_generate ´Ø¿ô¤Ï¿·¤·¤¤ UUID (universally unique identifier: ÀäÂФ˾¤È¤Ï½Å¤Ê¤é¤Ê¤¤¼±ÊÌ»Ò) ¤òÀ¸À®¤¹¤ë¡£ UUID ¤ÎÀ¸À®¤Ë¤Ï¡¢ /dev/urandom ¤Î¤è¤¦¤Ê¼Á¤ÎÎɤ¤Íð¿ôȯÀ¸µ¡¹½¤¬ÍøÍѤǤ­¤ë¾ì¹ç¤Ï¤½¤ì¤òÍøÍѤ¹¤ë¡£ ¤Ç¤­¤Ê¤¤¾ì¹ç¤Ë¤Ï¡¢ uuid_generate ¤ÏÊ̤Υ¢¥ë¥´¥ê¥º¥à¤òÍѤ¤¤ë¡£¤³¤Î¾ì¹ç¤Ï¸½ºß»þ¹ï¡¢ ¥í¡¼¥«¥ë¤Ê¥¤¡¼¥µ¥Í¥Ã¥È¤Î MAC ¥¢¥É¥ì¥¹¤¬¼èÆÀ¤Ç¤­¤ì¤Ð¤½¤ÎÃÍ¡¢ ¤ª¤è¤Óµ¼»÷Íð¿ôȯÀ¸µ¡¹½¤«¤éÀ¸À®¤µ¤ì¤¿Íð¿ô¤¬ÍѤ¤¤é¤ì¤ë¡£

uuid_generate_random ´Ø¿ô¤Ï¡¢¼Á¤ÎÎɤ¤Íð¿ôȯÀ¸µ¡¹½ (Î㤨¤Ð /dev/urandom) ¤¬ÍøÍѤǤ­¤Ê¤¤¾ì¹ç¤Ç¤â¡¢´°Á´¤Ë¥é¥ó¥À¥à¥Ù¡¼¥¹¤Î (¤Ä¤Þ¤ê»þ¹ï¤ä MAC ¥¢¥É¥ì¥¹¤ò»È¤ï¤Ê¤¤) UUID ¥Õ¥©¡¼¥Þ¥Ã¥È¤òºî¤ê¤¿¤¤¾ì¹ç¤ËÍѤ¤¤ë¡£ ¤³¤Î¾ì¹ç¤Ïµ¼»÷Íð¿ôȯÀ¸µ¡¹½¤¬Âå¤ï¤ê¤ËÍѤ¤¤é¤ì¤ë¡£ µ¼»÷Íð¿ôȯÀ¸µ¡¹½¤òÍøÍѤ¹¤ë¤È¡¢¤³¤Î¤è¤¦¤ËÀ¸À®¤µ¤ì¤¿ UUID ¤Î °ì°ÕÀ­¤ÏÎô²½¤¹¤ë¤«¤â¤·¤ì¤Ê¤¤¤³¤È¤ËÃí°Õ¤¹¤ë¤³¤È¡£

uuid_generata_time ´Ø¿ô¤Ï¡¢ÂåÂØ¥¢¥ë¥´¥ê¥º¥à¤ò»È¤¤¤¿¤¤¾ì¹ç¤ËÍѤ¤¤ë¡£ ¤³¤ì¤Ï¸½ºß»þ¹ï¤È (¤¢¤ì¤Ð) ¥¤¡¼¥µ¥Í¥Ã¥È¤Î MAC ¥¢¥É¥ì¥¹¤òÍѤ¤¤ë¡£ ¤³¤Î¥¢¥ë¥´¥ê¥º¥à¤Ï¤«¤Ä¤Æ UUID À¸À®ÊýË¡¤Î¥Ç¥Õ¥©¥ë¥È¤Ç¤¢¤Ã¤¿¤¬¡¢ ¥¤¡¼¥µ¥Í¥Ã¥È¤Î MAC ¥¢¥É¥ì¥¹¤òÍѤ¤¤ë¤Î¤Ç¡¢¤¤¤Ä¤É¤³¤Ç UUID ¤¬À¸À® ¤µ¤ì¤¿¤«¤Î¾ðÊ󤬥꡼¥¯¤·¤Æ¤·¤Þ¤¦¡£¤³¤ì¤Ï¥¢¥×¥ê¥±¡¼¥·¥ç¥ó¤Ë¤è¤Ã¤Æ¤Ï ¥×¥é¥¤¥Ð¥·¡¼¤ÎÌäÂê¤òµ¯¤³¤¹¤³¤È¤¬¤¢¤ë¤Î¤Ç¡¢ uuid_generate ´Ø¿ô¤Ï¼Á¤Î¹â¤¤Íð¿ôȯÀ¸µ¡¹½¤¬ÍøÍѤǤ­¤Ê¤¤¾ì¹ç¤Ë¸Â¤Ã¤Æ ¤³¤Î¥¢¥ë¥´¥ê¥º¥à¤òÍѤ¤¤ë¤è¤¦¤Ë¤Ê¤Ã¤¿¡£

UUID ¤Ï 16 ¥Ð¥¤¥È (128 ¥Ó¥Ã¥È) Ĺ¤Ç¡¢¤ª¤è¤½ 3.4x10^38 ¤³¤Î ¥æ¥Ë¡¼¥¯¤ÊÃͤòÍ¿¤¨¤ë (Carl Segan ¤Î Cosmos ¤Ë¤è¤ì¤Ð¡¢Á´±§Ãè¤Ë¤¢¤ëÁÇγ»Ò¤Î¸Ä¿ô¤Ï 10^80 ¤À¤½¤¦¤Ç¤¢¤ë)¡£ ¿·¤¿¤Ëºî¤é¤ì¤¿ UUID ¤Ï¡¢¥í¡¼¥«¥ë¤Ê¥·¥¹¥Æ¥à¤ä³°Éô¤Î¥·¥¹¥Æ¥à¤Ë¤è¤Ã¤Æ ²áµî¤Þ¤¿¤Ï̤Íè¤ËÀ¸À®¤µ¤ì¤¿/¤µ¤ì¤ë UUID ¤Î¤¤¤º¤ì¤È¤â°Û¤Ê¤ë¤È ¹Í¤¨¤ë¤³¤È¤¬¤Ç¤­¤ë¡£

ÊÖ¤êÃÍ

¿·¤¿¤ËÀ¸À®¤µ¤ì¤¿ UUID ¤¬¡¢ out ¤Î»Ø¤¹¥á¥â¥ê°ÌÃÖ¤ËÊÖ¤µ¤ì¤ë¡£

½àµò

OSF DCE 1.1

Ãø¼Ô

Theodore Y. Ts'o

Æþ¼êÊýË¡

http://e2fsprogs.sourceforge.net/

´ØÏ¢¹àÌÜ

uuid(3), uuidgen(1), uuid_clear(3), uuid_compare(3), uuid_copy(3), uuid_is_null(3), uuid_parse(3), uuid_time(3), uuid_unparse(3)