Back to index

glibc  2.9
Classes | Defines | Typedefs | Enumerations | Functions
in.h File Reference
#include <features.h>
#include <stdint.h>
#include <sys/socket.h>
#include <bits/types.h>
#include <bits/in.h>
#include <endian.h>
#include <bits/byteswap.h>

Go to the source code of this file.

Classes

struct  in_addr
struct  in6_addr
struct  sockaddr_in
struct  sockaddr_in6
struct  ipv6_mreq
union  in6_addr.__in6_u

Defines

#define IPPROTO_IP   IPPROTO_IP
#define IPPROTO_HOPOPTS   IPPROTO_HOPOPTS
#define IPPROTO_ICMP   IPPROTO_ICMP
#define IPPROTO_IGMP   IPPROTO_IGMP
#define IPPROTO_IPIP   IPPROTO_IPIP
#define IPPROTO_TCP   IPPROTO_TCP
#define IPPROTO_EGP   IPPROTO_EGP
#define IPPROTO_PUP   IPPROTO_PUP
#define IPPROTO_UDP   IPPROTO_UDP
#define IPPROTO_IDP   IPPROTO_IDP
#define IPPROTO_TP   IPPROTO_TP
#define IPPROTO_DCCP   IPPROTO_DCCP
#define IPPROTO_IPV6   IPPROTO_IPV6
#define IPPROTO_ROUTING   IPPROTO_ROUTING
#define IPPROTO_FRAGMENT   IPPROTO_FRAGMENT
#define IPPROTO_RSVP   IPPROTO_RSVP
#define IPPROTO_GRE   IPPROTO_GRE
#define IPPROTO_ESP   IPPROTO_ESP
#define IPPROTO_AH   IPPROTO_AH
#define IPPROTO_ICMPV6   IPPROTO_ICMPV6
#define IPPROTO_NONE   IPPROTO_NONE
#define IPPROTO_DSTOPTS   IPPROTO_DSTOPTS
#define IPPROTO_MTP   IPPROTO_MTP
#define IPPROTO_ENCAP   IPPROTO_ENCAP
#define IPPROTO_PIM   IPPROTO_PIM
#define IPPROTO_COMP   IPPROTO_COMP
#define IPPROTO_SCTP   IPPROTO_SCTP
#define IPPROTO_UDPLITE   IPPROTO_UDPLITE
#define IPPROTO_RAW   IPPROTO_RAW
#define IN_CLASSA(a)   ((((in_addr_t)(a)) & 0x80000000) == 0)
#define IN_CLASSA_NET   0xff000000
#define IN_CLASSA_NSHIFT   24
#define IN_CLASSA_HOST   (0xffffffff & ~IN_CLASSA_NET)
#define IN_CLASSA_MAX   128
#define IN_CLASSB(a)   ((((in_addr_t)(a)) & 0xc0000000) == 0x80000000)
#define IN_CLASSB_NET   0xffff0000
#define IN_CLASSB_NSHIFT   16
#define IN_CLASSB_HOST   (0xffffffff & ~IN_CLASSB_NET)
#define IN_CLASSB_MAX   65536
#define IN_CLASSC(a)   ((((in_addr_t)(a)) & 0xe0000000) == 0xc0000000)
#define IN_CLASSC_NET   0xffffff00
#define IN_CLASSC_NSHIFT   8
#define IN_CLASSC_HOST   (0xffffffff & ~IN_CLASSC_NET)
#define IN_CLASSD(a)   ((((in_addr_t)(a)) & 0xf0000000) == 0xe0000000)
#define IN_MULTICAST(a)   IN_CLASSD(a)
#define IN_EXPERIMENTAL(a)   ((((in_addr_t)(a)) & 0xe0000000) == 0xe0000000)
#define IN_BADCLASS(a)   ((((in_addr_t)(a)) & 0xf0000000) == 0xf0000000)
#define INADDR_ANY   ((in_addr_t) 0x00000000)
#define INADDR_BROADCAST   ((in_addr_t) 0xffffffff)
#define INADDR_NONE   ((in_addr_t) 0xffffffff)
#define IN_LOOPBACKNET   127
#define INADDR_LOOPBACK   ((in_addr_t) 0x7f000001) /* Inet 127.0.0.1. */
#define INADDR_UNSPEC_GROUP   ((in_addr_t) 0xe0000000) /* 224.0.0.0 */
#define INADDR_ALLHOSTS_GROUP   ((in_addr_t) 0xe0000001) /* 224.0.0.1 */
#define INADDR_ALLRTRS_GROUP   ((in_addr_t) 0xe0000002) /* 224.0.0.2 */
#define INADDR_MAX_LOCAL_GROUP   ((in_addr_t) 0xe00000ff) /* 224.0.0.255 */
#define s6_addr   __in6_u.__u6_addr8
#define IN6ADDR_ANY_INIT   { { { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 } } }
#define IN6ADDR_LOOPBACK_INIT   { { { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1 } } }
#define INET_ADDRSTRLEN   16
#define INET6_ADDRSTRLEN   46
#define IN6_IS_ADDR_UNSPECIFIED(a)
#define IN6_IS_ADDR_LOOPBACK(a)
#define IN6_IS_ADDR_MULTICAST(a)   (((__const uint8_t *) (a))[0] == 0xff)
#define IN6_IS_ADDR_LINKLOCAL(a)
#define IN6_IS_ADDR_SITELOCAL(a)
#define IN6_IS_ADDR_V4MAPPED(a)
#define IN6_IS_ADDR_V4COMPAT(a)
#define IN6_ARE_ADDR_EQUAL(a, b)
#define IN6_IS_ADDR_MC_NODELOCAL(a)
#define IN6_IS_ADDR_MC_LINKLOCAL(a)
#define IN6_IS_ADDR_MC_SITELOCAL(a)
#define IN6_IS_ADDR_MC_ORGLOCAL(a)
#define IN6_IS_ADDR_MC_GLOBAL(a)

Typedefs

typedef uint16_t in_port_t
typedef uint32_t in_addr_t

Enumerations

enum  {
  IPPROTO_IP = 0, IPPROTO_IP = 0, IPPROTO_HOPOPTS = 0, IPPROTO_HOPOPTS = 0,
  IPPROTO_ICMP = 1, IPPROTO_ICMP = 1, IPPROTO_IGMP = 2, IPPROTO_IGMP = 2,
  IPPROTO_IPIP = 4, IPPROTO_IPIP = 4, IPPROTO_TCP = 6, IPPROTO_TCP = 6,
  IPPROTO_EGP = 8, IPPROTO_EGP = 8, IPPROTO_PUP = 12, IPPROTO_PUP = 12,
  IPPROTO_UDP = 17, IPPROTO_UDP = 17, IPPROTO_IDP = 22, IPPROTO_IDP = 22,
  IPPROTO_TP = 29, IPPROTO_TP = 29, IPPROTO_DCCP = 33, IPPROTO_DCCP = 33,
  IPPROTO_IPV6 = 41, IPPROTO_IPV6 = 41, IPPROTO_ROUTING = 43, IPPROTO_ROUTING = 43,
  IPPROTO_FRAGMENT = 44, IPPROTO_FRAGMENT = 44, IPPROTO_RSVP = 46, IPPROTO_RSVP = 46,
  IPPROTO_GRE = 47, IPPROTO_GRE = 47, IPPROTO_ESP = 50, IPPROTO_ESP = 50,
  IPPROTO_AH = 51, IPPROTO_AH = 51, IPPROTO_ICMPV6 = 58, IPPROTO_ICMPV6 = 58,
  IPPROTO_NONE = 59, IPPROTO_NONE = 59, IPPROTO_DSTOPTS = 60, IPPROTO_DSTOPTS = 60,
  IPPROTO_MTP = 92, IPPROTO_MTP = 92, IPPROTO_ENCAP = 98, IPPROTO_ENCAP = 98,
  IPPROTO_PIM = 103, IPPROTO_PIM = 103, IPPROTO_COMP = 108, IPPROTO_COMP = 108,
  IPPROTO_SCTP = 132, IPPROTO_SCTP = 132, IPPROTO_UDPLITE = 136, IPPROTO_UDPLITE = 136,
  IPPROTO_RAW = 255, IPPROTO_RAW = 255, IPPROTO_MAX
}
enum  {
  IPPORT_ECHO = 7, IPPORT_DISCARD = 9, IPPORT_SYSTAT = 11, IPPORT_DAYTIME = 13,
  IPPORT_NETSTAT = 15, IPPORT_FTP = 21, IPPORT_TELNET = 23, IPPORT_SMTP = 25,
  IPPORT_TIMESERVER = 37, IPPORT_NAMESERVER = 42, IPPORT_WHOIS = 43, IPPORT_MTP = 57,
  IPPORT_TFTP = 69, IPPORT_RJE = 77, IPPORT_FINGER = 79, IPPORT_TTYLINK = 87,
  IPPORT_SUPDUP = 95, IPPORT_EXECSERVER = 512, IPPORT_LOGINSERVER = 513, IPPORT_CMDSERVER = 514,
  IPPORT_EFSSERVER = 520, IPPORT_BIFFUDP = 512, IPPORT_WHOSERVER = 513, IPPORT_ROUTESERVER = 520,
  IPPORT_RESERVED = 1024, IPPORT_USERRESERVED = 5000
}

Functions

uint32_t ntohl (uint32_t __netlong) __THROW __attribute__((__const__))
uint16_t ntohs (uint16_t __netshort) __THROW __attribute__((__const__))
uint32_t htonl (uint32_t __hostlong) __THROW __attribute__((__const__))
uint16_t htons (uint16_t __hostshort) __THROW __attribute__((__const__))

Class Documentation

struct in_addr

Definition at line 142 of file in.h.

Class Members
in_addr_t s_addr
struct in6_addr

Definition at line 198 of file in.h.

Class Members
union in6_addr __in6_u
struct ipv6_mreq

Definition at line 275 of file in.h.

Class Members
unsigned int ipv6mr_interface
union in6_addr.__in6_u

Definition at line 200 of file in.h.

Class Members
uint8_t __u6_addr8

Define Documentation

#define IN6_ARE_ADDR_EQUAL (   a,
  b 
)
Value:
((((__const uint32_t *) (a))[0] == ((__const uint32_t *) (b))[0])     \
        && (((__const uint32_t *) (a))[1] == ((__const uint32_t *) (b))[1])  \
        && (((__const uint32_t *) (a))[2] == ((__const uint32_t *) (b))[2])  \
        && (((__const uint32_t *) (a))[3] == ((__const uint32_t *) (b))[3]))

Definition at line 432 of file in.h.

#define IN6_IS_ADDR_LINKLOCAL (   a)
Value:
((((__const uint32_t *) (a))[0] & htonl (0xffc00000))                \
        == htonl (0xfe800000))

Definition at line 413 of file in.h.

#define IN6_IS_ADDR_LOOPBACK (   a)
Value:
(((__const uint32_t *) (a))[0] == 0                                  \
        && ((__const uint32_t *) (a))[1] == 0                               \
        && ((__const uint32_t *) (a))[2] == 0                               \
        && ((__const uint32_t *) (a))[3] == htonl (1))

Definition at line 405 of file in.h.

#define IN6_IS_ADDR_MC_GLOBAL (   a)
Value:
(IN6_IS_ADDR_MULTICAST(a)                                     \
        && ((((__const uint8_t *) (a))[1] & 0xf) == 0xe))

Definition at line 464 of file in.h.

#define IN6_IS_ADDR_MC_LINKLOCAL (   a)
Value:
(IN6_IS_ADDR_MULTICAST(a)                                     \
        && ((((__const uint8_t *) (a))[1] & 0xf) == 0x2))

Definition at line 452 of file in.h.

#define IN6_IS_ADDR_MC_NODELOCAL (   a)
Value:
(IN6_IS_ADDR_MULTICAST(a)                                     \
        && ((((__const uint8_t *) (a))[1] & 0xf) == 0x1))

Definition at line 448 of file in.h.

#define IN6_IS_ADDR_MC_ORGLOCAL (   a)
Value:
(IN6_IS_ADDR_MULTICAST(a)                                     \
        && ((((__const uint8_t *) (a))[1] & 0xf) == 0x8))

Definition at line 460 of file in.h.

#define IN6_IS_ADDR_MC_SITELOCAL (   a)
Value:
(IN6_IS_ADDR_MULTICAST(a)                                     \
        && ((((__const uint8_t *) (a))[1] & 0xf) == 0x5))

Definition at line 456 of file in.h.

#define IN6_IS_ADDR_MULTICAST (   a)    (((__const uint8_t *) (a))[0] == 0xff)

Definition at line 411 of file in.h.

#define IN6_IS_ADDR_SITELOCAL (   a)
Value:
((((__const uint32_t *) (a))[0] & htonl (0xffc00000))                \
        == htonl (0xfec00000))

Definition at line 417 of file in.h.

#define IN6_IS_ADDR_UNSPECIFIED (   a)
Value:
(((__const uint32_t *) (a))[0] == 0                                  \
        && ((__const uint32_t *) (a))[1] == 0                               \
        && ((__const uint32_t *) (a))[2] == 0                               \
        && ((__const uint32_t *) (a))[3] == 0)

Definition at line 399 of file in.h.

#define IN6_IS_ADDR_V4COMPAT (   a)
Value:
((((__const uint32_t *) (a))[0] == 0)                                \
        && (((__const uint32_t *) (a))[1] == 0)                      \
        && (((__const uint32_t *) (a))[2] == 0)                      \
        && (ntohl (((__const uint32_t *) (a))[3]) > 1))

Definition at line 426 of file in.h.

#define IN6_IS_ADDR_V4MAPPED (   a)
Value:
((((__const uint32_t *) (a))[0] == 0)                                \
        && (((__const uint32_t *) (a))[1] == 0)                      \
        && (((__const uint32_t *) (a))[2] == htonl (0xffff)))

Definition at line 421 of file in.h.

#define IN6ADDR_ANY_INIT   { { { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 } } }

Definition at line 217 of file in.h.

#define IN6ADDR_LOOPBACK_INIT   { { { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1 } } }

Definition at line 218 of file in.h.

#define IN_BADCLASS (   a)    ((((in_addr_t)(a)) & 0xf0000000) == 0xf0000000)

Definition at line 174 of file in.h.

#define IN_CLASSA (   a)    ((((in_addr_t)(a)) & 0x80000000) == 0)

Definition at line 153 of file in.h.

#define IN_CLASSA_HOST   (0xffffffff & ~IN_CLASSA_NET)

Definition at line 156 of file in.h.

#define IN_CLASSA_MAX   128

Definition at line 157 of file in.h.

#define IN_CLASSA_NET   0xff000000

Definition at line 154 of file in.h.

#define IN_CLASSA_NSHIFT   24

Definition at line 155 of file in.h.

#define IN_CLASSB (   a)    ((((in_addr_t)(a)) & 0xc0000000) == 0x80000000)

Definition at line 159 of file in.h.

#define IN_CLASSB_HOST   (0xffffffff & ~IN_CLASSB_NET)

Definition at line 162 of file in.h.

#define IN_CLASSB_MAX   65536

Definition at line 163 of file in.h.

#define IN_CLASSB_NET   0xffff0000

Definition at line 160 of file in.h.

#define IN_CLASSB_NSHIFT   16

Definition at line 161 of file in.h.

#define IN_CLASSC (   a)    ((((in_addr_t)(a)) & 0xe0000000) == 0xc0000000)

Definition at line 165 of file in.h.

#define IN_CLASSC_HOST   (0xffffffff & ~IN_CLASSC_NET)

Definition at line 168 of file in.h.

#define IN_CLASSC_NET   0xffffff00

Definition at line 166 of file in.h.

#define IN_CLASSC_NSHIFT   8

Definition at line 167 of file in.h.

#define IN_CLASSD (   a)    ((((in_addr_t)(a)) & 0xf0000000) == 0xe0000000)

Definition at line 170 of file in.h.

#define IN_EXPERIMENTAL (   a)    ((((in_addr_t)(a)) & 0xe0000000) == 0xe0000000)

Definition at line 173 of file in.h.

#define IN_LOOPBACKNET   127

Definition at line 184 of file in.h.

#define IN_MULTICAST (   a)    IN_CLASSD(a)

Definition at line 171 of file in.h.

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

Definition at line 192 of file in.h.

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

Definition at line 193 of file in.h.

#define INADDR_ANY   ((in_addr_t) 0x00000000)

Definition at line 177 of file in.h.

#define INADDR_BROADCAST   ((in_addr_t) 0xffffffff)

Definition at line 179 of file in.h.

#define INADDR_LOOPBACK   ((in_addr_t) 0x7f000001) /* Inet 127.0.0.1. */

Definition at line 187 of file in.h.

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

Definition at line 194 of file in.h.

#define INADDR_NONE   ((in_addr_t) 0xffffffff)

Definition at line 181 of file in.h.

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

Definition at line 191 of file in.h.

#define INET6_ADDRSTRLEN   46

Definition at line 221 of file in.h.

#define INET_ADDRSTRLEN   16

Definition at line 220 of file in.h.

#define IPPROTO_AH   IPPROTO_AH

Definition at line 71 of file in.h.

#define IPPROTO_COMP   IPPROTO_COMP

Definition at line 85 of file in.h.

#define IPPROTO_DCCP   IPPROTO_DCCP

Definition at line 57 of file in.h.

Definition at line 77 of file in.h.

#define IPPROTO_EGP   IPPROTO_EGP

Definition at line 47 of file in.h.

Definition at line 81 of file in.h.

#define IPPROTO_ESP   IPPROTO_ESP

Definition at line 69 of file in.h.

Definition at line 63 of file in.h.

#define IPPROTO_GRE   IPPROTO_GRE

Definition at line 67 of file in.h.

Definition at line 37 of file in.h.

#define IPPROTO_ICMP   IPPROTO_ICMP

Definition at line 39 of file in.h.

Definition at line 73 of file in.h.

#define IPPROTO_IDP   IPPROTO_IDP

Definition at line 53 of file in.h.

#define IPPROTO_IGMP   IPPROTO_IGMP

Definition at line 41 of file in.h.

#define IPPROTO_IP   IPPROTO_IP

Definition at line 35 of file in.h.

#define IPPROTO_IPIP   IPPROTO_IPIP

Definition at line 43 of file in.h.

#define IPPROTO_IPV6   IPPROTO_IPV6

Definition at line 59 of file in.h.

#define IPPROTO_MTP   IPPROTO_MTP

Definition at line 79 of file in.h.

#define IPPROTO_NONE   IPPROTO_NONE

Definition at line 75 of file in.h.

#define IPPROTO_PIM   IPPROTO_PIM

Definition at line 83 of file in.h.

#define IPPROTO_PUP   IPPROTO_PUP

Definition at line 49 of file in.h.

#define IPPROTO_RAW   IPPROTO_RAW

Definition at line 91 of file in.h.

Definition at line 61 of file in.h.

#define IPPROTO_RSVP   IPPROTO_RSVP

Definition at line 65 of file in.h.

#define IPPROTO_SCTP   IPPROTO_SCTP

Definition at line 87 of file in.h.

#define IPPROTO_TCP   IPPROTO_TCP

Definition at line 45 of file in.h.

#define IPPROTO_TP   IPPROTO_TP

Definition at line 55 of file in.h.

#define IPPROTO_UDP   IPPROTO_UDP

Definition at line 51 of file in.h.

Definition at line 89 of file in.h.

#define s6_addr   __in6_u.__u6_addr8

Definition at line 208 of file in.h.


Typedef Documentation

Definition at line 141 of file in.h.

Definition at line 97 of file in.h.


Enumeration Type Documentation

anonymous enum
Enumerator:
IPPROTO_IP 
IPPROTO_IP 
IPPROTO_HOPOPTS 
IPPROTO_HOPOPTS 
IPPROTO_ICMP 
IPPROTO_ICMP 
IPPROTO_IGMP 
IPPROTO_IGMP 
IPPROTO_IPIP 
IPPROTO_IPIP 
IPPROTO_TCP 
IPPROTO_TCP 
IPPROTO_EGP 
IPPROTO_EGP 
IPPROTO_PUP 
IPPROTO_PUP 
IPPROTO_UDP 
IPPROTO_UDP 
IPPROTO_IDP 
IPPROTO_IDP 
IPPROTO_TP 
IPPROTO_TP 
IPPROTO_DCCP 
IPPROTO_DCCP 
IPPROTO_IPV6 
IPPROTO_IPV6 
IPPROTO_ROUTING 
IPPROTO_ROUTING 
IPPROTO_FRAGMENT 
IPPROTO_FRAGMENT 
IPPROTO_RSVP 
IPPROTO_RSVP 
IPPROTO_GRE 
IPPROTO_GRE 
IPPROTO_ESP 
IPPROTO_ESP 
IPPROTO_AH 
IPPROTO_AH 
IPPROTO_ICMPV6 
IPPROTO_ICMPV6 
IPPROTO_NONE 
IPPROTO_NONE 
IPPROTO_DSTOPTS 
IPPROTO_DSTOPTS 
IPPROTO_MTP 
IPPROTO_MTP 
IPPROTO_ENCAP 
IPPROTO_ENCAP 
IPPROTO_PIM 
IPPROTO_PIM 
IPPROTO_COMP 
IPPROTO_COMP 
IPPROTO_SCTP 
IPPROTO_SCTP 
IPPROTO_UDPLITE 
IPPROTO_UDPLITE 
IPPROTO_RAW 
IPPROTO_RAW 
IPPROTO_MAX 

Definition at line 32 of file in.h.

  {
    IPPROTO_IP = 0,     /* Dummy protocol for TCP.  */
#define IPPROTO_IP          IPPROTO_IP
    IPPROTO_HOPOPTS = 0,   /* IPv6 Hop-by-Hop options.  */
#define IPPROTO_HOPOPTS            IPPROTO_HOPOPTS
    IPPROTO_ICMP = 1,          /* Internet Control Message Protocol.  */
#define IPPROTO_ICMP        IPPROTO_ICMP
    IPPROTO_IGMP = 2,          /* Internet Group Management Protocol. */
#define IPPROTO_IGMP        IPPROTO_IGMP
    IPPROTO_IPIP = 4,          /* IPIP tunnels (older KA9Q tunnels use 94).  */
#define IPPROTO_IPIP        IPPROTO_IPIP
    IPPROTO_TCP = 6,    /* Transmission Control Protocol.  */
#define IPPROTO_TCP         IPPROTO_TCP
    IPPROTO_EGP = 8,    /* Exterior Gateway Protocol.  */
#define IPPROTO_EGP         IPPROTO_EGP
    IPPROTO_PUP = 12,          /* PUP protocol.  */
#define IPPROTO_PUP         IPPROTO_PUP
    IPPROTO_UDP = 17,          /* User Datagram Protocol.  */
#define IPPROTO_UDP         IPPROTO_UDP
    IPPROTO_IDP = 22,          /* XNS IDP protocol.  */
#define IPPROTO_IDP         IPPROTO_IDP
    IPPROTO_TP = 29,    /* SO Transport Protocol Class 4.  */
#define IPPROTO_TP          IPPROTO_TP
    IPPROTO_DCCP = 33,         /* Datagram Congestion Control Protocol.  */
#define IPPROTO_DCCP        IPPROTO_DCCP
    IPPROTO_IPV6 = 41,     /* IPv6 header.  */
#define IPPROTO_IPV6        IPPROTO_IPV6
    IPPROTO_ROUTING = 43,  /* IPv6 routing header.  */
#define IPPROTO_ROUTING            IPPROTO_ROUTING
    IPPROTO_FRAGMENT = 44, /* IPv6 fragmentation header.  */
#define IPPROTO_FRAGMENT    IPPROTO_FRAGMENT
    IPPROTO_RSVP = 46,         /* Reservation Protocol.  */
#define IPPROTO_RSVP        IPPROTO_RSVP
    IPPROTO_GRE = 47,          /* General Routing Encapsulation.  */
#define IPPROTO_GRE         IPPROTO_GRE
    IPPROTO_ESP = 50,      /* encapsulating security payload.  */
#define IPPROTO_ESP         IPPROTO_ESP
    IPPROTO_AH = 51,       /* authentication header.  */
#define IPPROTO_AH          IPPROTO_AH
    IPPROTO_ICMPV6 = 58,   /* ICMPv6.  */
#define IPPROTO_ICMPV6             IPPROTO_ICMPV6
    IPPROTO_NONE = 59,     /* IPv6 no next header.  */
#define IPPROTO_NONE        IPPROTO_NONE
    IPPROTO_DSTOPTS = 60,  /* IPv6 destination options.  */
#define IPPROTO_DSTOPTS            IPPROTO_DSTOPTS
    IPPROTO_MTP = 92,          /* Multicast Transport Protocol.  */
#define IPPROTO_MTP         IPPROTO_MTP
    IPPROTO_ENCAP = 98,        /* Encapsulation Header.  */
#define IPPROTO_ENCAP              IPPROTO_ENCAP
    IPPROTO_PIM = 103,         /* Protocol Independent Multicast.  */
#define IPPROTO_PIM         IPPROTO_PIM
    IPPROTO_COMP = 108,        /* Compression Header Protocol.  */
#define IPPROTO_COMP        IPPROTO_COMP
    IPPROTO_SCTP = 132,        /* Stream Control Transmission Protocol.  */
#define IPPROTO_SCTP        IPPROTO_SCTP
    IPPROTO_UDPLITE = 136, /* UDP-Lite protocol.  */
#define IPPROTO_UDPLITE            IPPROTO_UDPLITE
    IPPROTO_RAW = 255,         /* Raw IP packets.  */
#define IPPROTO_RAW         IPPROTO_RAW
    IPPROTO_MAX
  };
anonymous enum
Enumerator:
IPPORT_ECHO 
IPPORT_DISCARD 
IPPORT_SYSTAT 
IPPORT_DAYTIME 
IPPORT_NETSTAT 
IPPORT_FTP 
IPPORT_TELNET 
IPPORT_SMTP 
IPPORT_TIMESERVER 
IPPORT_NAMESERVER 
IPPORT_WHOIS 
IPPORT_MTP 
IPPORT_TFTP 
IPPORT_RJE 
IPPORT_FINGER 
IPPORT_TTYLINK 
IPPORT_SUPDUP 
IPPORT_EXECSERVER 
IPPORT_LOGINSERVER 
IPPORT_CMDSERVER 
IPPORT_EFSSERVER 
IPPORT_BIFFUDP 
IPPORT_WHOSERVER 
IPPORT_ROUTESERVER 
IPPORT_RESERVED 
IPPORT_USERRESERVED 

Definition at line 100 of file in.h.

  {
    IPPORT_ECHO = 7,        /* Echo service.  */
    IPPORT_DISCARD = 9,            /* Discard transmissions service.  */
    IPPORT_SYSTAT = 11,            /* System status service.  */
    IPPORT_DAYTIME = 13,    /* Time of day service.  */
    IPPORT_NETSTAT = 15,    /* Network status service.  */
    IPPORT_FTP = 21,        /* File Transfer Protocol.  */
    IPPORT_TELNET = 23,            /* Telnet protocol.  */
    IPPORT_SMTP = 25,              /* Simple Mail Transfer Protocol.  */
    IPPORT_TIMESERVER = 37, /* Timeserver service.  */
    IPPORT_NAMESERVER = 42, /* Domain Name Service.  */
    IPPORT_WHOIS = 43,             /* Internet Whois service.  */
    IPPORT_MTP = 57,

    IPPORT_TFTP = 69,              /* Trivial File Transfer Protocol.  */
    IPPORT_RJE = 77,
    IPPORT_FINGER = 79,            /* Finger service.  */
    IPPORT_TTYLINK = 87,
    IPPORT_SUPDUP = 95,            /* SUPDUP protocol.  */


    IPPORT_EXECSERVER = 512,       /* execd service.  */
    IPPORT_LOGINSERVER = 513,      /* rlogind service.  */
    IPPORT_CMDSERVER = 514,
    IPPORT_EFSSERVER = 520,

    /* UDP ports.  */
    IPPORT_BIFFUDP = 512,
    IPPORT_WHOSERVER = 513,
    IPPORT_ROUTESERVER = 520,

    /* Ports less than this value are reserved for privileged processes.  */
    IPPORT_RESERVED = 1024,

    /* Ports greater this value are reserved for (non-privileged) servers.  */
    IPPORT_USERRESERVED = 5000
  };

Function Documentation

uint32_t htonl ( uint32_t  __hostlong) const

Definition at line 25 of file htonl.c.

{
#if BYTE_ORDER == BIG_ENDIAN
  return x;
#elif BYTE_ORDER == LITTLE_ENDIAN
  return __bswap_32 (x);
#else
# error "What kind of system is this?"
#endif
}

Here is the caller graph for this function:

uint16_t htons ( uint16_t  __hostshort) const

Definition at line 25 of file htons.c.

{
#if BYTE_ORDER == BIG_ENDIAN
  return x;
#elif BYTE_ORDER == LITTLE_ENDIAN
  return __bswap_16 (x);
#else
# error "What kind of system is this?"
#endif
}

Here is the caller graph for this function:

uint32_t ntohl ( uint32_t  __netlong) const

Here is the caller graph for this function:

uint16_t ntohs ( uint16_t  __netshort) const

Here is the caller graph for this function: