include/netinet/in.h File Reference

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

Defines

#define IPPROTO_IP   0
#define IPPROTO_ICMP   1
#define IPPROTO_IGMP   2
#define IPPROTO_GGP   3
#define IPPROTO_IPIP   4
#define IPPROTO_TCP   6
#define IPPROTO_EGP   8
#define IPPROTO_PUP   12
#define IPPROTO_UDP   17
#define IPPROTO_IDP   22
#define IPPROTO_TP   29
#define IPPROTO_ESP   50
#define IPPROTO_AH   51
#define IPPROTO_EON   80
#define IPPROTO_ENCAP   98
#define IPPROTO_RAW   255
#define IPPROTO_MAX   256
#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)   ((u_int32_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)
#define INADDR_NONE   __IPADDR(0xffffffff)
#define INADDR_UNSPEC_GROUP   __IPADDR(0xe0000000)
#define INADDR_ALLHOSTS_GROUP   __IPADDR(0xe0000001)
#define INADDR_ALLRTRS_GROUP   __IPADDR(0xe0000002)
#define INADDR_MAX_LOCAL_GROUP   __IPADDR(0xe00000ff)
#define IN_LOOPBACKNET   127
#define IP_OPTIONS   1
#define IP_HDRINCL   2
#define IP_TOS   3
#define IP_TTL   4
#define IP_RECVOPTS   5
#define IP_RECVRETOPTS   6
#define IP_RECVDSTADDR   7
#define IP_RETOPTS   8
#define IP_MULTICAST_IF   9
#define IP_MULTICAST_TTL   10
#define IP_MULTICAST_LOOP   11
#define IP_ADD_MEMBERSHIP   12
#define IP_DROP_MEMBERSHIP   13
#define IP_PORTRANGE   19
#define IP_RECVIF   20
#define IP_ERRORMTU   21
#define IP_DEFAULT_MULTICAST_TTL   1
#define IP_DEFAULT_MULTICAST_LOOP   1
#define IP_MAX_MEMBERSHIPS   20
#define IP_PORTRANGE_DEFAULT   0
#define IP_PORTRANGE_HIGH   1
#define IP_PORTRANGE_LOW   2
#define IPPROTO_MAXID   (IPPROTO_IDP + 1)
#define CTL_IPPROTO_NAMES
#define IPCTL_FORWARDING   1
#define IPCTL_SENDREDIRECTS   2
#define IPCTL_DEFTTL   3
#define IPCTL_FORWSRCRT   5
#define IPCTL_DIRECTEDBCAST   6
#define IPCTL_ALLOWSRCRT   7
#define IPCTL_SUBNETSARELOCAL   8
#define IPCTL_MTUDISC   9
#define IPCTL_ANONPORTMIN   10
#define IPCTL_ANONPORTMAX   11
#define IPCTL_MTUDISCTIMEOUT   12
#define IPCTL_MAXFLOWS   13
#define IPCTL_MAXID   14
#define IPCTL_NAMES

Typedefs

typedef uint32_t in_addr_t

Functions

uint32_t htonl (uint32_t hostlong)
uint16_t htons (uint16_t hostshort)
uint32_t ntohl (uint32_t netlong)
uint16_t ntohs (uint16_t netshort)


Define Documentation

#define __IPADDR (  )     ((u_int32_t)(x))

#define CTL_IPPROTO_NAMES

Value:

{ \
        { "ip", CTLTYPE_NODE }, \
        { "icmp", CTLTYPE_NODE }, \
        { "igmp", CTLTYPE_NODE }, \
        { "ggp", CTLTYPE_NODE }, \
        { 0, 0 }, \
        { 0, 0 }, \
        { "tcp", CTLTYPE_NODE }, \
        { 0, 0 }, \
        { "egp", CTLTYPE_NODE }, \
        { 0, 0 }, \
        { 0, 0 }, \
        { 0, 0 }, \
        { "pup", CTLTYPE_NODE }, \
        { 0, 0 }, \
        { 0, 0 }, \
        { 0, 0 }, \
        { 0, 0 }, \
        { "udp", CTLTYPE_NODE }, \
        { 0, 0 }, \
        { 0, 0 }, \
        { 0, 0 }, \
        { 0, 0 }, \
        { "idp", CTLTYPE_NODE }, \
}

#define IN_BADCLASS (  ) 

Value:

(((u_int32_t)(i) & __IPADDR(0xf0000000)) == \
                                 __IPADDR(0xf0000000))

#define IN_CLASSA (  ) 

Value:

(((u_int32_t)(i) & __IPADDR(0x80000000)) == \
                                 __IPADDR(0x00000000))

#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 (  ) 

Value:

(((u_int32_t)(i) & __IPADDR(0xc0000000)) == \
                                 __IPADDR(0x80000000))

#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 (  ) 

Value:

(((u_int32_t)(i) & __IPADDR(0xe0000000)) == \
                                 __IPADDR(0xc0000000))

#define IN_CLASSC_HOST   __IPADDR(0x000000ff)

#define IN_CLASSC_NET   __IPADDR(0xffffff00)

#define IN_CLASSC_NSHIFT   8

#define IN_CLASSD (  ) 

Value:

(((u_int32_t)(i) & __IPADDR(0xf0000000)) == \
                                 __IPADDR(0xe0000000))

#define IN_CLASSD_HOST   __IPADDR(0x0fffffff)

#define IN_CLASSD_NET   __IPADDR(0xf0000000)

#define IN_CLASSD_NSHIFT   28

#define IN_EXPERIMENTAL (  ) 

Value:

(((u_int32_t)(i) & __IPADDR(0xf0000000)) == \
                                 __IPADDR(0xf0000000))

#define IN_LOCAL_GROUP (  ) 

Value:

(((u_int32_t)(i) & __IPADDR(0xffffff00)) == \
                                 __IPADDR(0xe0000000))

#define IN_LOOPBACKNET   127

#define IN_MULTICAST (  )     IN_CLASSD(i)

#define INADDR_ALLHOSTS_GROUP   __IPADDR(0xe0000001)

#define INADDR_ALLRTRS_GROUP   __IPADDR(0xe0000002)

#define INADDR_ANY   __IPADDR(0x00000000)

#define INADDR_BROADCAST   __IPADDR(0xffffffff)

#define INADDR_LOOPBACK   __IPADDR(0x7f000001)

#define INADDR_MAX_LOCAL_GROUP   __IPADDR(0xe00000ff)

#define INADDR_NONE   __IPADDR(0xffffffff)

#define INADDR_UNSPEC_GROUP   __IPADDR(0xe0000000)

#define IP_ADD_MEMBERSHIP   12

#define IP_DEFAULT_MULTICAST_LOOP   1

#define IP_DEFAULT_MULTICAST_TTL   1

#define IP_DROP_MEMBERSHIP   13

#define IP_ERRORMTU   21

#define IP_HDRINCL   2

#define IP_MAX_MEMBERSHIPS   20

#define IP_MULTICAST_IF   9

#define IP_MULTICAST_LOOP   11

#define IP_MULTICAST_TTL   10

#define IP_OPTIONS   1

#define IP_PORTRANGE   19

#define IP_PORTRANGE_DEFAULT   0

#define IP_PORTRANGE_HIGH   1

#define IP_PORTRANGE_LOW   2

#define IP_RECVDSTADDR   7

#define IP_RECVIF   20

#define IP_RECVOPTS   5

#define IP_RECVRETOPTS   6

#define IP_RETOPTS   8

#define IP_TOS   3

#define IP_TTL   4

#define IPCTL_ALLOWSRCRT   7

#define IPCTL_ANONPORTMAX   11

#define IPCTL_ANONPORTMIN   10

#define IPCTL_DEFTTL   3

#define IPCTL_DIRECTEDBCAST   6

#define IPCTL_FORWARDING   1

#define IPCTL_FORWSRCRT   5

#define IPCTL_MAXFLOWS   13

#define IPCTL_MAXID   14

#define IPCTL_MTUDISC   9

#define IPCTL_MTUDISCTIMEOUT   12

#define IPCTL_NAMES

Value:

{ \
        { 0, 0 }, \
        { "forwarding", CTLTYPE_INT }, \
        { "redirect", CTLTYPE_INT }, \
        { "ttl", CTLTYPE_INT }, \
        { "mtu", CTLTYPE_INT }, \
        { "forwsrcrt", CTLTYPE_INT }, \
        { "directed-broadcast", CTLTYPE_INT }, \
        { "allowsrcrt", CTLTYPE_INT }, \
        { "subnetsarelocal", CTLTYPE_INT }, \
        { "mtudisc", CTLTYPE_INT }, \
        { "anonportmin", CTLTYPE_INT }, \
        { "anonportmax", CTLTYPE_INT }, \
        { "mtudisctimeout", CTLTYPE_INT }, \
        { "maxflows", CTLTYPE_INT }, \
}

#define IPCTL_SENDREDIRECTS   2

#define IPCTL_SUBNETSARELOCAL   8

#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

#define IPPROTO_EGP   8

#define IPPROTO_ENCAP   98

#define IPPROTO_EON   80

#define IPPROTO_ESP   50

#define IPPROTO_GGP   3

#define IPPROTO_ICMP   1

#define IPPROTO_IDP   22

#define IPPROTO_IGMP   2

#define IPPROTO_IP   0

#define IPPROTO_IPIP   4

#define IPPROTO_MAX   256

#define IPPROTO_MAXID   (IPPROTO_IDP + 1)

#define IPPROTO_PUP   12

#define IPPROTO_RAW   255

#define IPPROTO_TCP   6

#define IPPROTO_TP   29

#define IPPROTO_UDP   17


Typedef Documentation


Function Documentation

uint32_t htonl ( uint32_t  hostlong  ) 

uint16_t htons ( uint16_t  hostshort  ) 

uint32_t ntohl ( uint32_t  netlong  ) 

uint16_t ntohs ( uint16_t  netshort  ) 


Generated on Tue Jan 20 14:28:56 2009 for ABLE LIBC by  doxygen 1.5.6