|
̾??addr2ascii , ascii2addr —
????Ū?ʥ??ɥ쥹?ե????ޥåȥ롼????
?饤?֥???Standard C Library (libc, -lc)????<sys/types.h>
<netinet/in.h>
<arpa/inet.h>
char *
addr2ascii (int af,
const void *addrp, int len,
char *buf) int
ascii2addr (int af,
const char *ascii, void *result)
?????롼????addr2ascii () ??
ascii2addr ()
?ϡ??Х??ʥ??????ȡ????ɥ쥹?ե??ߥ???Ŭ?ڤʰ?????ǽ?ʷ????Ȥδ֤?
?ͥåȥ?????ɥ쥹???Ѵ??????Τ˻??Ѥ????ޤ???
ξ???δؿ??Ȥ⡢?Ѵ??ץ??????ǻ??Ѥ????륢?ɥ쥹?ե??ߥ??????ꤹ??
af ?????????Ѥ??ޤ?
(???????Ǥϡ? AF_INET ??????
AF_LINK
???ɥ쥹?ե??ߥ??????????ݡ??Ȥ????Ƥ??ޤ?)??
???ꤵ?줿?ե??ߥ??ˤ????ƻ??Ѥ??????Х??ʥꥢ?ɥ쥹?Ȥ??? Ŭ?ڤʹ?¤?Τϼ??ΤȤ????Ǥ???
??????addr2ascii ()
?ؿ??ϡ??Ϥ??줿?Хåե??Υ??ɥ쥹???ޤ???
NULL
?ݥ????Ϥ??줿????????Ū?Хåե??Υ??ɥ쥹???֤??ޤ???
?????????Ԥ????????ϡ??̥??ݥ????֤??ޤ???
ascii2addr ()
?ؿ??ϡ??Х??ʥꥢ?ɥ쥹??Ĺ??
(?Х???ñ??) ???֤??ޤ??? ?????????Ԥ?????????
-1 ???֤??ޤ???
??inet(3) ?ؿ?inet_ntoa () ??
inet_aton ()
?ϼ??Τ褦?˼??????뤳?Ȥ??Ǥ??ޤ???
#include <sys/types.h> #include <sys/socket.h> #Include <netinet/in.h> #include <arpa/inet.h> char * inet_ntoa(struct in_addr addr) { return addr2ascii(AF_INET, &addr, sizeof addr, 0); } int inet_aton(const char *ascii, struct in_addr *addr) { return (ascii2addr(AF_INET, ascii, addr) == sizeof(*addr)); } ?ºݤˤϡ??????ϼ¹ԤǤ??ޤ?????
???顼???????Ԥ??֤??줿?Ȥ???errno
?˼????ͤ? 1 ?Ĥ????ꤵ???ޤ???
??Ϣ????inet(3), linkaddr(3), inet(4)?????????˶ᤤ???ե??????ϡ????Ȥ??? Craig Partridge ?ˤ??ä? ???Ƥ????ޤ????? ???Υ??ե????????Τϡ? INRIA ?? IPv6 ?μ????ˤ??ꡢ?Ϥ??????о줷?ޤ??????????????ɤȥɥ????????Ȥ? MIT Laboratory for Computer Science ?? Garrett A. Wollman ?ˤ??????ΤǤ????Х????ꥸ?ʥ??μ????? IPv6 ?ݡ??Ȥ??Ƥ??ޤ????? ???Υ??ݡ??Ȥϡ????Τ??????褵?????Ϥ??Ǥ??? NRL ?μ????ˤϡ?AF_ISO ??????
AF_NS
???ɥ쥹?ե??ߥ??Υ??ݡ??Ȥ??ޤޤ??Ƥ??ޤ?????
???Υ??ե??????ΰ??????ˤĤ??Ƥϡ??????餫???䤬?????ޤ???
?????˰???Ū?ʥ??ե??????Ǥ????С??Хåե???ưŪ?˳??????Ƥ뤳?Ȥ?
?Ǥ????褦?????Ѥ??????Хåե???Ĺ???????ꤹ?????ʤ??????Ƥ????Ǥ??礦????
?Х??ʥꥢ?ɥ쥹???ݻ??????Τˤ?ɬ??
“
Visit the GSP FreeBSD Man Page Interface. |