⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 inet.3n

📁 <B>Digital的Unix操作系统VAX 4.2源码</B>
💻 3N
字号:
.\" SCCSID: @(#)inet.3n	8.1	9/11/90.TH inet 3n.SH Nameinet_addr, inet_network, inet_ntoa, inet_makeaddr, inet_lnaof, inet_netof \- Internet address manipulation routines.SH Syntax.nf.B "#include <sys/socket.h>.B "#include <netinet/in.h>.B "#include <arpa/inet.h>.PP.B "unsigned long inet_addr(cp).B "char *cp;.PP.B "unsigned long inet_network(cp).B "char *cp;.PP.B "char *inet_ntoa(in).B "struct in_addr in;.PP.B "struct in_addr inet_makeaddr(net, lna).B "int net, lna;.PP.B "int inet_lnaof(in).B "struct in_addr in;.PP.B "int inet_netof(in).B "struct in_addr in;.fi.SH Description.NXR "inet keyword".NXR "inet_addr subroutine".NXR "inet_network subroutine".NXR "inet_ntoa subroutine".NXR "inet_makeaddr subroutine".NXR "inet_lnaof subroutine".NXR "inet_netof subroutine".NXR "Internet address" "manipulation routines"The routines.PN inet_addrand.PN inet_networkeach interpret character strings representingnumbers expressed in the Internet standard \*(lq.\*(rqnotation, returning numbers suitable for useas Internet addresses and Internet networknumbers, respectively.  The routine.PN inet_ntoatakes an Internet address and returns an ASCIIstring representing the address in \*(lq.\*(rqnotation.  The routine.PN inet_makeaddrtakes an Internet network number and a localnetwork address and constructs an Internet addressfrom it.  The routines.PN inet_netofand.PN inet_lnaofbreak apart Internet host addresses, returningthe network number and local network address part,respectively..PPAll Internet address are returned in networkorder (bytes ordered from left to right).All network numbers and local address parts arereturned as machine format integer values..SH Internet Addresses.NXR "Internet address" "specifying"Values specified using the \*(lq.\*(rq notation take oneof the following forms:.EXa.b.c.da.b.ca.ba.EEWhen four parts are specified, each is interpretedas a byte of data and assigned, from left to right,to the four bytes of an Internet address.  Notethat when an Internet address is viewed as a 32-bitinteger quantity on the VAX, the bytes referred toabove appear as \*(lqd.c.b.a\*(rq.  That is, VAX bytes areordered from right to left..PPWhen a three-part address is specified, the lastpart is interpreted as a 16-bit quantity and placedin the right most two bytes of the network address.This makes the three-part address format convenientfor specifying Class B network addresses as\*(lq128.net.host\*(rq..PPWhen a two-part address is supplied, the last partis interpreted as a 24-bit quantity and placed inthe right most three bytes of the network address.This makes the two-part address format convenientfor specifying Class A network addresses as\*(lqnet.host\*(rq..PPWhen only one part is given, the value is storeddirectly in the network address without any byterearrangement..PPAll numbers supplied as \*(lqparts\*(rq in a \*(lq.\*(rq notationmay be decimal, octal, or hexadecimal, as specifiedin the C language (i.e. a leading 0x or 0X implieshexadecimal; otherwise, a leading 0 implies octal;otherwise, the number is interpreted as decimal)..SH Return ValuesThe value \-1 is returned by.PN inet_addrand.PN inet_networkfor malformed requests..SH See Alsogethostent(3n), getnetent(3n), hosts(5), networks(5)

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -