in_addr_t inet_network(const char *cp);
The converted network number is in network byte order (bytes ordered from left to right).
Values specified using dot notation take one of the following forms:
When four parts are specified, each is interpreted as a byte of data and assigned, from left to right, to the four bytes of an internet address.
When a three-part address is specified, the last part is interpreted as a 16-bit quantity and placed in the rightmost two bytes of the network address. This makes the three-part address format convenient for specifying Class B network addresses as 128.net.host.
When a two-part address is supplied, the last part is interpreted as a 24-bit quantity and placed in the rightmost three bytes of the network address. This makes the two-part address format convenient for specifying Class A network addresses as net.host.
When only one part is given, the value is stored directly in the network address without any byte rearrangement.
All numbers supplied as parts in dot notation may be decimal, octal, or hexadecimal, as specified in the ISO C standard (that is, a leading 0x or 0X implies hexadecimal; otherwise a leading 0 implies octal; otherwise, the number is interpreted as decimal).
PTC MKS Toolkit for Professional Developers
PTC MKS Toolkit for Professional Developers 64-Bit Edition
PTC MKS Toolkit for Enterprise Developers
PTC MKS Toolkit for Enterprise Developers 64-Bit Edition
inet_addr(), inet_aton(), inet_lnaof(), inet_makeaddr(), inet_net_ntop(), inet_net_pton(), inet_neta(), inet_netof(), inet_ntoa(), inet_ntop(), inet_pton()
PTC MKS Toolkit 10.3 Documentation Build 39.