GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
ADDR2ASCII(3) FreeBSD Library Functions Manual ADDR2ASCII(3)

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() ?ؿ??ϡ??Х??ʥ??Υͥåȥ???????Υ??ɥ쥹????????ǽ?ʷ????? ?Ѵ??????Τ˻??Ѥ????ޤ??? af ??¾?ˡ? 3 ?Ĥΰ??????????ޤ??? addrp ?????ϡ??Ѵ??????ͥåȥ?????ɥ쥹?ؤΥݥ??󥿤Ǥ??? len ?????ϡ????ɥ쥹??Ĺ???Ǥ??? buf ?????ϡ????̤??ݻ????뤿???˸ƤӽФ????????꿶?? ?Хåե??ؤΥ??ץ??????Υݥ??󥿤Ǥ??? ?̥??ݥ??󥿤??Ϥ??????ȡ? addr2ascii() ????Ū?˳??꿶???줿?Хåե??????Ѥ??ޤ???

ascii2addr() ?ؿ??ϡ? addr2ascii() ?ȵդ????????¹Ԥ??ޤ??? af ?˲ä??ơ?2 ?ĤΥѥ??᡼?? ascii ?? result ?????Ѥ??ޤ??? ascii ?ѥ??᡼???ϡ??Х??ʥ????Ѵ???????ʸ?????ؤΥݥ??󥿤Ǥ??? result ?ѥ??᡼???ϡ????ꤵ?줿?ե??ߥ???Ŭ?ڤʥͥåȥ?????ɥ쥹??¤?Τؤ? ?ݥ??󥿤Ǥ???

???ꤵ?줿?ե??ߥ??ˤ????ƻ??Ѥ??????Х??ʥꥢ?ɥ쥹?Ȥ??? Ŭ?ڤʹ?¤?Τϼ??ΤȤ????Ǥ???

(in ⟨netinet/in.h⟩)
(in ⟨net/if_dl.h⟩)

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));
}

?ºݤˤϡ??????ϼ¹ԤǤ??ޤ????? addr2ascii() ?? ascii2addr() ?ϡ?¾????ˡ?Ǥʤ??? inet(3) ?ؿ??Ǽ????????Ƥ??뤫???Ǥ???

???????Ԥ??֤??줿?Ȥ??? errno ?˼????ͤ? 1 ?Ĥ????ꤵ???ޤ???
[ENAMETOOLONG]
addr2ascii() ?롼?????ϡ? af ?ˤ??ä??Ϥ??줿???ɥ쥹?ե??ߥ?????Ŭ?ڤʥѥ??᡼?? len ???Ϥ????ޤ?????
[EPROTONOSUPPORT]
?????줫?Υ롼?????ˡ? AF_INET ?ޤ??? AF_LINK ?ǤϤʤ? af ?ѥ??᡼?????Ϥ????ޤ?????
[EINVAL]
ascii2addr() ???Ϥ??줿ʸ?????ϡ? ???ɥ쥹?ե??ߥ? af ?ˤĤ?????Ŭ?ڤ˥ե????ޥåȤ????Ƥ??ޤ?????

inet(3), linkaddr(3), inet(4)

?????˶ᤤ???󥿥ե??????ϡ????Ȥ??? Craig Partridge ?ˤ??ä? ???Ƥ????ޤ????? ???Υ??󥿥ե????????Τϡ? INRIA ?? IPv6 ?μ????ˤ??ꡢ?Ϥ??????о줷?ޤ?????

?????ɤȥɥ????????Ȥ? MIT Laboratory for Computer Science ?? Garrett A. Wollman ?ˤ??????ΤǤ???

???ꥸ?ʥ??μ????? IPv6 ?򥵥ݡ??Ȥ??Ƥ??ޤ????? ???Υ??ݡ??Ȥϡ????Τ??????褵?????Ϥ??Ǥ??? NRL ?μ????ˤϡ? AF_ISO ?????? AF_NS ???ɥ쥹?ե??ߥ??Υ??ݡ??Ȥ??ޤޤ??Ƥ??ޤ?????

???Υ??󥿥ե??????ΰ??????ˤĤ??Ƥϡ??????餫???䤬?????ޤ??? ?????˰???Ū?ʥ??󥿥ե??????Ǥ????С??Хåե???ưŪ?˳??????Ƥ뤳?Ȥ? ?Ǥ????褦?????Ѥ??????Хåե???Ĺ???????ꤹ?????ʤ??????Ƥ????Ǥ??礦???? ?Х??ʥꥢ?ɥ쥹???ݻ??????Τˤ?ɬ?? “struct sockaddr” ???׵᤹???Ǥ??礦?? ??ǰ?ʤ??顢?????ϴ?¸?Τ??????ȸߴ??????????ޤ????? ???????¤Τ??ᡢǤ?դΥ??ɥ쥹?ե??ߥ꤫???ͥåȥ?????ɥ쥹?? ?????????롼?????ϡ?ɬ?פʺ????Хåե?Ĺ?䡢 ?Х??ʥꥢ?ɥ쥹?Ȥ??ƻ??Ѥ??륢?ɥ쥹??Ŭ?ڤ???ʬ?Ȥ??ä? ????Ū???μ????????Ȥ??ƻ??äƤ??ʤ????Фʤ??ޤ?????

June 13, 1996 FreeBSD 13.1-RELEASE

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.