|
PSPSDK 2025-10-12
|
#include <sys/socket.h>

Go to the source code of this file.
Data Structures | |
| struct | in_addr |
| struct | sockaddr_in |
| struct | ip_opts |
| struct | ip_mreq |
Macros | |
| #define | IPPROTO_IP 0 /* dummy for IP */ |
| #define | IPPROTO_HOPOPTS 0 /* IP6 hop-by-hop options */ |
| #define | IPPROTO_ICMP 1 /* control message protocol */ |
| #define | IPPROTO_IGMP 2 /* group mgmt protocol */ |
| #define | IPPROTO_GGP 3 /* gateway^2 (deprecated) */ |
| #define | IPPROTO_IPV4 4 /* IP header */ |
| #define | IPPROTO_IPIP 4 /* IP inside IP */ |
| #define | IPPROTO_TCP 6 /* tcp */ |
| #define | IPPROTO_EGP 8 /* exterior gateway protocol */ |
| #define | IPPROTO_PUP 12 /* pup */ |
| #define | IPPROTO_UDP 17 /* user datagram protocol */ |
| #define | IPPROTO_IDP 22 /* xns idp */ |
| #define | IPPROTO_TP 29 /* tp-4 w/ class negotiation */ |
| #define | IPPROTO_IPV6 41 /* IP6 header */ |
| #define | IPPROTO_ROUTING 43 /* IP6 routing header */ |
| #define | IPPROTO_FRAGMENT 44 /* IP6 fragmentation header */ |
| #define | IPPROTO_RSVP 46 /* resource reservation */ |
| #define | IPPROTO_GRE 47 /* GRE encaps RFC 1701 */ |
| #define | IPPROTO_ESP 50 /* encap. security payload */ |
| #define | IPPROTO_AH 51 /* authentication header */ |
| #define | IPPROTO_MOBILE 55 /* IP Mobility RFC 2004 */ |
| #define | IPPROTO_IPV6_ICMP 58 /* IPv6 ICMP */ |
| #define | IPPROTO_ICMPV6 58 /* ICMP6 */ |
| #define | IPPROTO_NONE 59 /* IP6 no next header */ |
| #define | IPPROTO_DSTOPTS 60 /* IP6 destination option */ |
| #define | IPPROTO_EON 80 /* ISO cnlp */ |
| #define | IPPROTO_ETHERIP 97 /* Ethernet-in-IP */ |
| #define | IPPROTO_ENCAP 98 /* encapsulation header */ |
| #define | IPPROTO_PIM 103 /* Protocol indep. multicast */ |
| #define | IPPROTO_IPCOMP 108 /* IP Payload Comp. Protocol */ |
| #define | IPPROTO_VRRP 112 /* VRRP RFC 2338 */ |
| #define | IPPROTO_RAW 255 /* raw IP packet */ |
| #define | IPPROTO_MAX 256 |
| #define | IPPROTO_DONE 257 |
| #define | CTL_IPPROTO_IPSEC 258 |
| #define | IPPORT_RESERVED 1024 |
| #define | IPPORT_ANONMIN 49152 |
| #define | IPPORT_ANONMAX 65535 |
| #define | IPPORT_RESERVEDMIN 600 |
| #define | IPPORT_RESERVEDMAX (IPPORT_RESERVED-1) |
| #define | __IPADDR(x) |
| #define | IN_CLASSA(i) |
| #define | IN_CLASSA_NET __IPADDR(0xff000000) |
| #define | IN_CLASSA_NSHIFT 24 |
| #define | IN_CLASSA_HOST __IPADDR(0x00ffffff) |
| #define | IN_CLASSA_MAX 128 |
| #define | IN_CLASSB(i) |
| #define | IN_CLASSB_NET __IPADDR(0xffff0000) |
| #define | IN_CLASSB_NSHIFT 16 |
| #define | IN_CLASSB_HOST __IPADDR(0x0000ffff) |
| #define | IN_CLASSB_MAX 65536 |
| #define | IN_CLASSC(i) |
| #define | IN_CLASSC_NET __IPADDR(0xffffff00) |
| #define | IN_CLASSC_NSHIFT 8 |
| #define | IN_CLASSC_HOST __IPADDR(0x000000ff) |
| #define | IN_CLASSD(i) |
| #define | IN_CLASSD_NET __IPADDR(0xf0000000) |
| #define | IN_CLASSD_NSHIFT 28 |
| #define | IN_CLASSD_HOST __IPADDR(0x0fffffff) |
| #define | IN_MULTICAST(i) |
| #define | IN_EXPERIMENTAL(i) |
| #define | IN_BADCLASS(i) |
| #define | IN_LOCAL_GROUP(i) |
| #define | INADDR_ANY __IPADDR(0x00000000) |
| #define | INADDR_LOOPBACK __IPADDR(0x7f000001) |
| #define | INADDR_BROADCAST __IPADDR(0xffffffff) /* must be masked */ |
| #define | INADDR_UNSPEC_GROUP __IPADDR(0xe0000000) /* 224.0.0.0 */ |
| #define | INADDR_ALLHOSTS_GROUP __IPADDR(0xe0000001) /* 224.0.0.1 */ |
| #define | INADDR_ALLRTRS_GROUP __IPADDR(0xe0000002) /* 224.0.0.2 */ |
| #define | INADDR_MAX_LOCAL_GROUP __IPADDR(0xe00000ff) /* 224.0.0.255 */ |
| #define | IN_LOOPBACKNET 127 /* official! */ |
| #define | INET_ADDRSTRLEN 16 |
| #define | IP_OPTIONS 1 /* buf/ip_opts; set/get IP options */ |
| #define | IP_HDRINCL 2 /* int; header is included with data */ |
| #define | IP_TOS 3 /* int; IP type of service and preced. */ |
| #define | IP_TTL 4 /* int; IP time to live */ |
| #define | IP_RECVOPTS 5 /* bool; receive all IP opts w/dgram */ |
| #define | IP_RECVRETOPTS 6 /* bool; receive IP opts for response */ |
| #define | IP_RECVDSTADDR 7 /* bool; receive IP dst addr w/dgram */ |
| #define | IP_RETOPTS 8 /* ip_opts; set/get IP options */ |
| #define | IP_MULTICAST_IF 9 /* in_addr; set/get IP multicast i/f */ |
| #define | IP_MULTICAST_TTL 10 /* u_char; set/get IP multicast ttl */ |
| #define | IP_MULTICAST_LOOP 11 /* u_char; set/get IP multicast loopback */ |
| #define | IP_ADD_MEMBERSHIP 12 /* ip_mreq; add an IP group membership */ |
| #define | IP_DROP_MEMBERSHIP 13 /* ip_mreq; drop an IP group membership */ |
| #define | IP_PORTRANGE 19 /* int; range to use for ephemeral port */ |
| #define | IP_RECVIF 20 /* bool; receive reception if w/dgram */ |
| #define | IP_ERRORMTU 21 /* int; get MTU of last xmit = EMSGSIZE */ |
| #define | IP_IPSEC_POLICY 22 /* struct; get/set security policy */ |
| #define | IP_DEFAULT_MULTICAST_TTL 1 /* normally limit m'casts to 1 hop */ |
| #define | IP_DEFAULT_MULTICAST_LOOP 1 /* normally hear sends if a member */ |
| #define | IP_MAX_MEMBERSHIPS 20 /* per socket; must fit in one mbuf */ |
| #define | IP_PORTRANGE_DEFAULT 0 /* default range */ |
| #define | IP_PORTRANGE_HIGH 1 /* same as DEFAULT (FreeBSD compat) */ |
| #define | IP_PORTRANGE_LOW 2 /* use privileged range */ |
| #define | ntohs(x) |
| #define | ntohl(x) |
| #define | htons(x) |
| #define | htonl(x) |
Typedefs | |
| typedef uint32_t | in_addr_t |
| typedef uint16_t | in_port_t |
| #define __IPADDR | ( | x | ) |
| #define CTL_IPPROTO_IPSEC 258 |
| #define htonl | ( | x | ) |
| #define htons | ( | x | ) |
| #define IN_BADCLASS | ( | i | ) |
| #define IN_CLASSA | ( | i | ) |
| #define IN_CLASSA_HOST __IPADDR(0x00ffffff) |
| #define IN_CLASSA_MAX 128 |
| #define IN_CLASSA_NET __IPADDR(0xff000000) |
| #define IN_CLASSA_NSHIFT 24 |
| #define IN_CLASSB | ( | i | ) |
| #define IN_CLASSB_HOST __IPADDR(0x0000ffff) |
| #define IN_CLASSB_MAX 65536 |
| #define IN_CLASSB_NET __IPADDR(0xffff0000) |
| #define IN_CLASSB_NSHIFT 16 |
| #define IN_CLASSC | ( | i | ) |
| #define IN_CLASSC_HOST __IPADDR(0x000000ff) |
| #define IN_CLASSC_NET __IPADDR(0xffffff00) |
| #define IN_CLASSC_NSHIFT 8 |
| #define IN_CLASSD | ( | i | ) |
| #define IN_CLASSD_HOST __IPADDR(0x0fffffff) |
| #define IN_CLASSD_NET __IPADDR(0xf0000000) |
| #define IN_CLASSD_NSHIFT 28 |
| #define IN_EXPERIMENTAL | ( | i | ) |
| #define IN_LOCAL_GROUP | ( | i | ) |
| #define IN_LOOPBACKNET 127 /* official! */ |
| #define INADDR_ALLHOSTS_GROUP __IPADDR(0xe0000001) /* 224.0.0.1 */ |
| #define INADDR_ALLRTRS_GROUP __IPADDR(0xe0000002) /* 224.0.0.2 */ |
| #define INADDR_ANY __IPADDR(0x00000000) |
| #define INADDR_BROADCAST __IPADDR(0xffffffff) /* must be masked */ |
| #define INADDR_LOOPBACK __IPADDR(0x7f000001) |
| #define INADDR_MAX_LOCAL_GROUP __IPADDR(0xe00000ff) /* 224.0.0.255 */ |
| #define INADDR_UNSPEC_GROUP __IPADDR(0xe0000000) /* 224.0.0.0 */ |
| #define INET_ADDRSTRLEN 16 |
| #define IP_ADD_MEMBERSHIP 12 /* ip_mreq; add an IP group membership */ |
| #define IP_DEFAULT_MULTICAST_LOOP 1 /* normally hear sends if a member */ |
| #define IP_DEFAULT_MULTICAST_TTL 1 /* normally limit m'casts to 1 hop */ |
| #define IP_DROP_MEMBERSHIP 13 /* ip_mreq; drop an IP group membership */ |
| #define IP_ERRORMTU 21 /* int; get MTU of last xmit = EMSGSIZE */ |
| #define IP_HDRINCL 2 /* int; header is included with data */ |
| #define IP_IPSEC_POLICY 22 /* struct; get/set security policy */ |
| #define IP_MAX_MEMBERSHIPS 20 /* per socket; must fit in one mbuf */ |
| #define IP_MULTICAST_IF 9 /* in_addr; set/get IP multicast i/f */ |
| #define IP_MULTICAST_LOOP 11 /* u_char; set/get IP multicast loopback */ |
| #define IP_MULTICAST_TTL 10 /* u_char; set/get IP multicast ttl */ |
| #define IP_OPTIONS 1 /* buf/ip_opts; set/get IP options */ |
| #define IP_PORTRANGE 19 /* int; range to use for ephemeral port */ |
| #define IP_PORTRANGE_DEFAULT 0 /* default range */ |
| #define IP_PORTRANGE_HIGH 1 /* same as DEFAULT (FreeBSD compat) */ |
| #define IP_PORTRANGE_LOW 2 /* use privileged range */ |
| #define IP_RECVDSTADDR 7 /* bool; receive IP dst addr w/dgram */ |
| #define IP_RECVIF 20 /* bool; receive reception if w/dgram */ |
| #define IP_RECVOPTS 5 /* bool; receive all IP opts w/dgram */ |
| #define IP_RECVRETOPTS 6 /* bool; receive IP opts for response */ |
| #define IP_RETOPTS 8 /* ip_opts; set/get IP options */ |
| #define IP_TOS 3 /* int; IP type of service and preced. */ |
| #define IP_TTL 4 /* int; IP time to live */ |
| #define IPPORT_ANONMAX 65535 |
| #define IPPORT_ANONMIN 49152 |
| #define IPPORT_RESERVED 1024 |
| #define IPPORT_RESERVEDMAX (IPPORT_RESERVED-1) |
| #define IPPORT_RESERVEDMIN 600 |
| #define IPPROTO_AH 51 /* authentication header */ |
| #define IPPROTO_DONE 257 |
| #define IPPROTO_DSTOPTS 60 /* IP6 destination option */ |
| #define IPPROTO_EGP 8 /* exterior gateway protocol */ |
| #define IPPROTO_ENCAP 98 /* encapsulation header */ |
| #define IPPROTO_EON 80 /* ISO cnlp */ |
| #define IPPROTO_ESP 50 /* encap. security payload */ |
| #define IPPROTO_ETHERIP 97 /* Ethernet-in-IP */ |
| #define IPPROTO_FRAGMENT 44 /* IP6 fragmentation header */ |
| #define IPPROTO_GGP 3 /* gateway^2 (deprecated) */ |
| #define IPPROTO_GRE 47 /* GRE encaps RFC 1701 */ |
| #define IPPROTO_HOPOPTS 0 /* IP6 hop-by-hop options */ |
| #define IPPROTO_ICMP 1 /* control message protocol */ |
| #define IPPROTO_ICMPV6 58 /* ICMP6 */ |
| #define IPPROTO_IDP 22 /* xns idp */ |
| #define IPPROTO_IGMP 2 /* group mgmt protocol */ |
| #define IPPROTO_IP 0 /* dummy for IP */ |
| #define IPPROTO_IPCOMP 108 /* IP Payload Comp. Protocol */ |
| #define IPPROTO_IPIP 4 /* IP inside IP */ |
| #define IPPROTO_IPV4 4 /* IP header */ |
| #define IPPROTO_IPV6 41 /* IP6 header */ |
| #define IPPROTO_IPV6_ICMP 58 /* IPv6 ICMP */ |
| #define IPPROTO_MAX 256 |
| #define IPPROTO_MOBILE 55 /* IP Mobility RFC 2004 */ |
| #define IPPROTO_NONE 59 /* IP6 no next header */ |
| #define IPPROTO_PIM 103 /* Protocol indep. multicast */ |
| #define IPPROTO_PUP 12 /* pup */ |
| #define IPPROTO_RAW 255 /* raw IP packet */ |
| #define IPPROTO_ROUTING 43 /* IP6 routing header */ |
| #define IPPROTO_RSVP 46 /* resource reservation */ |
| #define IPPROTO_TCP 6 /* tcp */ |
| #define IPPROTO_TP 29 /* tp-4 w/ class negotiation */ |
| #define IPPROTO_UDP 17 /* user datagram protocol */ |
| #define IPPROTO_VRRP 112 /* VRRP RFC 2338 */ |
| #define ntohl | ( | x | ) |
| #define ntohs | ( | x | ) |
| typedef uint32_t in_addr_t |
| typedef uint16_t in_port_t |