PSPSDK 2024-12-16
Loading...
Searching...
No Matches
in.h File Reference
#include <sys/socket.h>
Include dependency graph for in.h:
This graph shows which files directly or indirectly include this file:

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)   ((uint32_t)(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)   IN_CLASSD(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)   __builtin_bswap16(x)
 
#define ntohl(x)   __builtin_bswap32(x)
 
#define htons(x)   __builtin_bswap16(x)
 
#define htonl(x)   __builtin_bswap32(x)
 

Typedefs

typedef uint32_t in_addr_t
 
typedef uint16_t in_port_t
 

Functions

struct in_addr __attribute__ ((__packed__))
 

Variables

in_addr_t s_addr
 
struct sockaddr_in __attribute__
 Writes gmon.out dump file and stops profiling Called from atexit() handler; will dump out a gmon.out file at cwd with all collected information.
 

Macro Definition Documentation

◆ __IPADDR

#define __IPADDR (   x)    ((uint32_t)(x))

◆ CTL_IPPROTO_IPSEC

#define CTL_IPPROTO_IPSEC   258

◆ htonl

#define htonl (   x)    __builtin_bswap32(x)

◆ htons

#define htons (   x)    __builtin_bswap16(x)

◆ IN_BADCLASS

#define IN_BADCLASS (   i)
Value:
(((uint32_t)(i) & __IPADDR(0xf0000000)) == \
__IPADDR(0xf0000000))
#define __IPADDR(x)
Definition in.h:137
float x
Definition psptypes.h:0
int i[4]
Definition psptypes.h:4

◆ IN_CLASSA

#define IN_CLASSA (   i)
Value:
(((uint32_t)(i) & __IPADDR(0x80000000)) == \
__IPADDR(0x00000000))

◆ IN_CLASSA_HOST

#define IN_CLASSA_HOST   __IPADDR(0x00ffffff)

◆ IN_CLASSA_MAX

#define IN_CLASSA_MAX   128

◆ IN_CLASSA_NET

#define IN_CLASSA_NET   __IPADDR(0xff000000)

◆ IN_CLASSA_NSHIFT

#define IN_CLASSA_NSHIFT   24

◆ IN_CLASSB

#define IN_CLASSB (   i)
Value:
(((uint32_t)(i) & __IPADDR(0xc0000000)) == \
__IPADDR(0x80000000))

◆ IN_CLASSB_HOST

#define IN_CLASSB_HOST   __IPADDR(0x0000ffff)

◆ IN_CLASSB_MAX

#define IN_CLASSB_MAX   65536

◆ IN_CLASSB_NET

#define IN_CLASSB_NET   __IPADDR(0xffff0000)

◆ IN_CLASSB_NSHIFT

#define IN_CLASSB_NSHIFT   16

◆ IN_CLASSC

#define IN_CLASSC (   i)
Value:
(((uint32_t)(i) & __IPADDR(0xe0000000)) == \
__IPADDR(0xc0000000))

◆ IN_CLASSC_HOST

#define IN_CLASSC_HOST   __IPADDR(0x000000ff)

◆ IN_CLASSC_NET

#define IN_CLASSC_NET   __IPADDR(0xffffff00)

◆ IN_CLASSC_NSHIFT

#define IN_CLASSC_NSHIFT   8

◆ IN_CLASSD

#define IN_CLASSD (   i)
Value:
(((uint32_t)(i) & __IPADDR(0xf0000000)) == \
__IPADDR(0xe0000000))

◆ IN_CLASSD_HOST

#define IN_CLASSD_HOST   __IPADDR(0x0fffffff)

◆ IN_CLASSD_NET

#define IN_CLASSD_NET   __IPADDR(0xf0000000)

◆ IN_CLASSD_NSHIFT

#define IN_CLASSD_NSHIFT   28

◆ IN_EXPERIMENTAL

#define IN_EXPERIMENTAL (   i)
Value:
(((uint32_t)(i) & __IPADDR(0xf0000000)) == \
__IPADDR(0xf0000000))

◆ IN_LOCAL_GROUP

#define IN_LOCAL_GROUP (   i)
Value:
(((uint32_t)(i) & __IPADDR(0xffffff00)) == \
__IPADDR(0xe0000000))

◆ IN_LOOPBACKNET

#define IN_LOOPBACKNET   127 /* official! */

◆ IN_MULTICAST

#define IN_MULTICAST (   i)    IN_CLASSD(i)

◆ INADDR_ALLHOSTS_GROUP

#define INADDR_ALLHOSTS_GROUP   __IPADDR(0xe0000001) /* 224.0.0.1 */

◆ INADDR_ALLRTRS_GROUP

#define INADDR_ALLRTRS_GROUP   __IPADDR(0xe0000002) /* 224.0.0.2 */

◆ INADDR_ANY

#define INADDR_ANY   __IPADDR(0x00000000)

◆ INADDR_BROADCAST

#define INADDR_BROADCAST   __IPADDR(0xffffffff) /* must be masked */

◆ INADDR_LOOPBACK

#define INADDR_LOOPBACK   __IPADDR(0x7f000001)

◆ INADDR_MAX_LOCAL_GROUP

#define INADDR_MAX_LOCAL_GROUP   __IPADDR(0xe00000ff) /* 224.0.0.255 */

◆ INADDR_UNSPEC_GROUP

#define INADDR_UNSPEC_GROUP   __IPADDR(0xe0000000) /* 224.0.0.0 */

◆ INET_ADDRSTRLEN

#define INET_ADDRSTRLEN   16

◆ IP_ADD_MEMBERSHIP

#define IP_ADD_MEMBERSHIP   12 /* ip_mreq; add an IP group membership */

◆ IP_DEFAULT_MULTICAST_LOOP

#define IP_DEFAULT_MULTICAST_LOOP   1 /* normally hear sends if a member */

◆ IP_DEFAULT_MULTICAST_TTL

#define IP_DEFAULT_MULTICAST_TTL   1 /* normally limit m'casts to 1 hop */

◆ IP_DROP_MEMBERSHIP

#define IP_DROP_MEMBERSHIP   13 /* ip_mreq; drop an IP group membership */

◆ IP_ERRORMTU

#define IP_ERRORMTU   21 /* int; get MTU of last xmit = EMSGSIZE */

◆ IP_HDRINCL

#define IP_HDRINCL   2 /* int; header is included with data */

◆ IP_IPSEC_POLICY

#define IP_IPSEC_POLICY   22 /* struct; get/set security policy */

◆ IP_MAX_MEMBERSHIPS

#define IP_MAX_MEMBERSHIPS   20 /* per socket; must fit in one mbuf */

◆ IP_MULTICAST_IF

#define IP_MULTICAST_IF   9 /* in_addr; set/get IP multicast i/f */

◆ IP_MULTICAST_LOOP

#define IP_MULTICAST_LOOP   11 /* u_char; set/get IP multicast loopback */

◆ IP_MULTICAST_TTL

#define IP_MULTICAST_TTL   10 /* u_char; set/get IP multicast ttl */

◆ IP_OPTIONS

#define IP_OPTIONS   1 /* buf/ip_opts; set/get IP options */

◆ IP_PORTRANGE

#define IP_PORTRANGE   19 /* int; range to use for ephemeral port */

◆ IP_PORTRANGE_DEFAULT

#define IP_PORTRANGE_DEFAULT   0 /* default range */

◆ IP_PORTRANGE_HIGH

#define IP_PORTRANGE_HIGH   1 /* same as DEFAULT (FreeBSD compat) */

◆ IP_PORTRANGE_LOW

#define IP_PORTRANGE_LOW   2 /* use privileged range */

◆ IP_RECVDSTADDR

#define IP_RECVDSTADDR   7 /* bool; receive IP dst addr w/dgram */

◆ IP_RECVIF

#define IP_RECVIF   20 /* bool; receive reception if w/dgram */

◆ IP_RECVOPTS

#define IP_RECVOPTS   5 /* bool; receive all IP opts w/dgram */

◆ IP_RECVRETOPTS

#define IP_RECVRETOPTS   6 /* bool; receive IP opts for response */

◆ IP_RETOPTS

#define IP_RETOPTS   8 /* ip_opts; set/get IP options */

◆ IP_TOS

#define IP_TOS   3 /* int; IP type of service and preced. */

◆ IP_TTL

#define IP_TTL   4 /* int; IP time to live */

◆ IPPORT_ANONMAX

#define IPPORT_ANONMAX   65535

◆ IPPORT_ANONMIN

#define IPPORT_ANONMIN   49152

◆ IPPORT_RESERVED

#define IPPORT_RESERVED   1024

◆ IPPORT_RESERVEDMAX

#define IPPORT_RESERVEDMAX   (IPPORT_RESERVED-1)

◆ IPPORT_RESERVEDMIN

#define IPPORT_RESERVEDMIN   600

◆ IPPROTO_AH

#define IPPROTO_AH   51 /* authentication header */

◆ IPPROTO_DONE

#define IPPROTO_DONE   257

◆ IPPROTO_DSTOPTS

#define IPPROTO_DSTOPTS   60 /* IP6 destination option */

◆ IPPROTO_EGP

#define IPPROTO_EGP   8 /* exterior gateway protocol */

◆ IPPROTO_ENCAP

#define IPPROTO_ENCAP   98 /* encapsulation header */

◆ IPPROTO_EON

#define IPPROTO_EON   80 /* ISO cnlp */

◆ IPPROTO_ESP

#define IPPROTO_ESP   50 /* encap. security payload */

◆ IPPROTO_ETHERIP

#define IPPROTO_ETHERIP   97 /* Ethernet-in-IP */

◆ IPPROTO_FRAGMENT

#define IPPROTO_FRAGMENT   44 /* IP6 fragmentation header */

◆ IPPROTO_GGP

#define IPPROTO_GGP   3 /* gateway^2 (deprecated) */

◆ IPPROTO_GRE

#define IPPROTO_GRE   47 /* GRE encaps RFC 1701 */

◆ IPPROTO_HOPOPTS

#define IPPROTO_HOPOPTS   0 /* IP6 hop-by-hop options */

◆ IPPROTO_ICMP

#define IPPROTO_ICMP   1 /* control message protocol */

◆ IPPROTO_ICMPV6

#define IPPROTO_ICMPV6   58 /* ICMP6 */

◆ IPPROTO_IDP

#define IPPROTO_IDP   22 /* xns idp */

◆ IPPROTO_IGMP

#define IPPROTO_IGMP   2 /* group mgmt protocol */

◆ IPPROTO_IP

#define IPPROTO_IP   0 /* dummy for IP */

◆ IPPROTO_IPCOMP

#define IPPROTO_IPCOMP   108 /* IP Payload Comp. Protocol */

◆ IPPROTO_IPIP

#define IPPROTO_IPIP   4 /* IP inside IP */

◆ IPPROTO_IPV4

#define IPPROTO_IPV4   4 /* IP header */

◆ IPPROTO_IPV6

#define IPPROTO_IPV6   41 /* IP6 header */

◆ IPPROTO_IPV6_ICMP

#define IPPROTO_IPV6_ICMP   58 /* IPv6 ICMP */

◆ IPPROTO_MAX

#define IPPROTO_MAX   256

◆ IPPROTO_MOBILE

#define IPPROTO_MOBILE   55 /* IP Mobility RFC 2004 */

◆ IPPROTO_NONE

#define IPPROTO_NONE   59 /* IP6 no next header */

◆ IPPROTO_PIM

#define IPPROTO_PIM   103 /* Protocol indep. multicast */

◆ IPPROTO_PUP

#define IPPROTO_PUP   12 /* pup */

◆ IPPROTO_RAW

#define IPPROTO_RAW   255 /* raw IP packet */

◆ IPPROTO_ROUTING

#define IPPROTO_ROUTING   43 /* IP6 routing header */

◆ IPPROTO_RSVP

#define IPPROTO_RSVP   46 /* resource reservation */

◆ IPPROTO_TCP

#define IPPROTO_TCP   6 /* tcp */

◆ IPPROTO_TP

#define IPPROTO_TP   29 /* tp-4 w/ class negotiation */

◆ IPPROTO_UDP

#define IPPROTO_UDP   17 /* user datagram protocol */

◆ IPPROTO_VRRP

#define IPPROTO_VRRP   112 /* VRRP RFC 2338 */

◆ ntohl

#define ntohl (   x)    __builtin_bswap32(x)

◆ ntohs

#define ntohs (   x)    __builtin_bswap16(x)

Typedef Documentation

◆ in_addr_t

◆ in_port_t

Function Documentation

◆ __attribute__()

struct in_addr __attribute__ ( (__packed__ )

Variable Documentation

◆ __attribute__

struct UsbDriver __attribute__

Writes gmon.out dump file and stops profiling Called from atexit() handler; will dump out a gmon.out file at cwd with all collected information.

Stop the profiler.

Internal timer handler.

Internal C handler for _mcount()

Parameters
frompcpc address of caller
selfpcpc address of current function

Called from mcount.S to make life a bit easier. __mcount is called right before a function starts. GCC generates a tiny stub at the very beginning of each compiled routine, which eventually brings the control to here.

If the profiler is not running, this function does nothing.

Parameters
filenameThe name of the file to write the profiling data to.
should_dumpIf 1, the profiling data will be written to the file. If 0, the profiling data will be discarded.

◆ s_addr

in_addr_t s_addr