|
|
|
| Interface status: | externallyDefinedApi |
IPPROTO_UDP 17
user datagram protocol KProtocolInetUdp
| Interface status: | externallyDefinedApi |
INADDR_ANY (u_int32_t)0x00000000
IPv4 local host address.
| Interface status: | externallyDefinedApi |
INADDR_BROADCAST (u_int32_t)0xffffffff
IPv4 broadcast address.
TCP_NODELAY 0x304
User-settable options (used with setsockopt). don't delay send to coalesce packets KSoTcpNoDelay
TCP_MAXSEG 0x303
User-settable options (used with setsockopt). set maximum segment size KSoTcpMaxSegSize
IPPROTO_SPACER 32767
Defined to avoid confusion. The master value is defined by PROTO_SPACER in sys//protosw.h.
IPPORT_RESERVED 1024
Ports < IPPORT_RESERVED are reserved for privileged processes (e.g. root). (IP_PORTRANGE_LOW)
IPPORT_HIFIRSTAUTO 49152
Default local port range, used by both IP_PORTRANGE_DEFAULT and IP_PORTRANGE_HIGH.
IPPORT_HILASTAUTO 65535
Default local port range, used by both IP_PORTRANGE_DEFAULT and IP_PORTRANGE_HIGH.
IPPORT_RESERVEDSTART 600
Scanning for a free reserved port return a value below IPPORT_RESERVED, but higher than IPPORT_RESERVEDSTART. Traditionally the start value was 512, but that conflicts with some well-known-services that firewalls may have a fit if we use.
IN_CLASSA (i) (((u_int32_t)(i) & 0x80000000) == 0)
Definitions of bits in internet address integers. On subnets, the decomposition of addresses to host and net parts is done according to subnet mask, not the masks here.
|
IN_CLASSA_NET 0xff000000
Definitions of bits in internet address integers. On subnets, the decomposition of addresses to host and net parts is done according to subnet mask, not the masks here.
IN_CLASSA_NSHIFT 24
Definitions of bits in internet address integers. On subnets, the decomposition of addresses to host and net parts is done according to subnet mask, not the masks here.
IN_CLASSA_HOST 0x00ffffff
Definitions of bits in internet address integers. On subnets, the decomposition of addresses to host and net parts is done according to subnet mask, not the masks here.
IN_CLASSA_MAX 128
Definitions of bits in internet address integers. On subnets, the decomposition of addresses to host and net parts is done according to subnet mask, not the masks here.
IN_CLASSB (i) (((u_int32_t)(i) & 0xc0000000) == 0x80000000)
Definitions of bits in internet address integers. On subnets, the decomposition of addresses to host and net parts is done according to subnet mask, not the masks here.
|
IN_CLASSB_NET 0xffff0000
Definitions of bits in internet address integers. On subnets, the decomposition of addresses to host and net parts is done according to subnet mask, not the masks here.
IN_CLASSB_NSHIFT 16
Definitions of bits in internet address integers. On subnets, the decomposition of addresses to host and net parts is done according to subnet mask, not the masks here.
IN_CLASSB_HOST 0x0000ffff
Definitions of bits in internet address integers. On subnets, the decomposition of addresses to host and net parts is done according to subnet mask, not the masks here.
IN_CLASSB_MAX 65536
Definitions of bits in internet address integers. On subnets, the decomposition of addresses to host and net parts is done according to subnet mask, not the masks here.
IN_CLASSC (i) (((u_int32_t)(i) & 0xe0000000) == 0xc0000000)
Definitions of bits in internet address integers. On subnets, the decomposition of addresses to host and net parts is done according to subnet mask, not the masks here.
|
IN_CLASSC_NET 0xffffff00
Definitions of bits in internet address integers. On subnets, the decomposition of addresses to host and net parts is done according to subnet mask, not the masks here.
IN_CLASSC_NSHIFT 8
Definitions of bits in internet address integers. On subnets, the decomposition of addresses to host and net parts is done according to subnet mask, not the masks here.
IN_CLASSC_HOST 0x000000ff
Definitions of bits in internet address integers. On subnets, the decomposition of addresses to host and net parts is done according to subnet mask, not the masks here.
IN_CLASSD (i) (((u_int32_t)(i) & 0xf0000000) == 0xe0000000)
Definitions of bits in internet address integers. On subnets, the decomposition of addresses to host and net parts is done according to subnet mask, not the masks here.
|
IN_CLASSD_NET 0xf0000000
Definitions of bits in internet address integers. On subnets, the decomposition of addresses to host and net parts is done according to subnet mask, not the masks here.
IN_CLASSD_NSHIFT 28
Definitions of bits in internet address integers. On subnets, the decomposition of addresses to host and net parts is done according to subnet mask, not the masks here.
IN_CLASSD_HOST 0x0fffffff
Definitions of bits in internet address integers. On subnets, the decomposition of addresses to host and net parts is done according to subnet mask, not the masks here.
IN_MULTICAST (i) IN_CLASSD(i)
Definitions of bits in internet address integers. On subnets, the decomposition of addresses to host and net parts is done according to subnet mask, not the masks here.
|
IN_EXPERIMENTAL (i) (((u_int32_t)(i) & 0xf0000000) == 0xf0000000)
Definitions of bits in internet address integers. On subnets, the decomposition of addresses to host and net parts is done according to subnet mask, not the masks here.
|
IN_BADCLASS (i) (((u_int32_t)(i) & 0xf0000000) == 0xf0000000)
Definitions of bits in internet address integers.
|
INADDR_LOOPBACK (u_int32_t)0x7f000001
Definitions of bits in internet address integers. On subnets, the decomposition of addresses to host and net parts is done according to subnet mask, not the masks here.
INADDR_UNSPEC_GROUP (u_int32_t)0xe0000000
Definitions of bits in internet address integers.
INADDR_ALLHOSTS_GROUP (u_int32_t)0xe0000001
Definitions of bits in internet address integers.
INADDR_MAX_LOCAL_GROUP (u_int32_t)0xe00000ff
Definitions of bits in internet address integers.
IN_LOOPBACKNET 127
Definitions of bits in internet address integers. On subnets, the decomposition of addresses to host and net parts is done according to subnet mask, not the masks here.
IP_OPTIONS 0x306
Options for use with [gs]etsockopt at the IP level. First word of comment is data type; bool is stored in int. buf or ip_opts; set or get IP options
IP_TOS 0x309
Options for use with [gs]etsockopt at the IP level. First word of comment is data type; bool is stored in int. int; IP type of service and preced.
IP_TTL 0x310
Options for use with [gs]etsockopt at the IP level. First word of comment is data type; bool is stored in int. int; IP type of service and preced.
IP_RECVOPTS -1
Options for use with [gs]etsockopt at the IP level. First word of comment is data type; bool is stored in int. bool; receive all IP opts w dgram
IP_RECVRETOPTS -2
Options for use with [gs]etsockopt at the IP level. First word of comment is data type; bool is stored in int. bool; receive IP opts for response
IP_RECVDSTADDR -3
Options for use with [gs]etsockopt at the IP level. First word of comment is data type; bool is stored in int. bool; receive IP dst addr wdgram
IP_RETOPTS -4
Options for use with [gs]etsockopt at the IP level. First word of comment is data type; bool is stored in int. ip_opts; set or get IP options
IP_DEFAULT_MULTICAST_TTL 1
Defaults and limits for options. normally limit m'casts to 1 hop
IP_DEFAULT_MULTICAST_LOOP 1
Defaults and limits for options. normally hear sends if a member
| Interface status: | externallyDefinedApi |
typedef __uint8_t uint8_t;
denotes a unsigned integer type with a width of exactly 8 bits.
| Interface status: | externallyDefinedApi |
typedef __sa_family_t sa_family_t;
Address family type
| Interface status: | externallyDefinedApi |
IMPORT_C uint32_t htonl(uint32_t);
These routines convert 16 and 32 bit quantities between network byte order and host byte order. On machines which have a byte order which is the same as the network order, routines are defined as null macros.
These routines are most often used in conjunction with Internet addresses and ports as returned by gethostbyname and getservent .
Bugs:
On the VAX bytes are handled backwards from most everyone else in the world.
|
|
gethostbyaddr(const char *,int,int)gethostbyaddr(const char *,int,int)Get the internet name of the host by address. getservent(void)getservent(void)Note: This description also covers the following functions - getservbyname(const...| Interface status: | externallyDefinedApi |
IMPORT_C uint16_t htons(uint16_t);
|
|
gethostbyaddr(const char *,int,int)gethostbyaddr(const char *,int,int)Get the internet name of the host by address. getservent(void)getservent(void)Note: This description also covers the following functions - getservbyname(const...| Interface status: | externallyDefinedApi |
IMPORT_C int bindresvport(int __sockfd, struct sockaddr_in *__sock_in);
If sin is a pointer to a struct sockaddr_insockaddr_in the appropriate fields in the structure should be defined. Note that sin->sin_family must be initialized to the address family
of the socket, passed by sd. If sin->sin_port is '0' an anonymous port (in the range 600-1023) will be chosen and, if bind
is successful, the sin->sin_port will be updated to contain the allocated port.
If sin is the NULL pointer an anonymous port will be allocated (as above). However, there is no way for bindresvport to return the allocated port in this case.
The function prototype of bindresvport is biased to AF_INET socket.
Examples:
#include <sys/socket.h>
#include <netinet/in.h>
#include <unistd.h>
void BindResvPort()
{
int sockfd;
sockaddr_in selfAddr;
sockfd = socket(AF_INET,SOCK_STREAM,IPPROTO_TCP);
selfAddr.sin_family = AF_INET;
selfAddr.sin_addr.s_addr = INADDR_ANY;
selfAddr.sin_port = htons(100);
bindresvport(sockfd, &selfAddr;);
close(sockfd);
}
|
|