ISC DHCP  4.3.1
A reference DHCPv4 and DHCPv6 implementation
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
ip.h File Reference

Go to the source code of this file.

Data Structures

struct  ip
 
struct  ip_timestamp
 
union  ip_timestamp::ipt_timestamp
 
struct  ip_timestamp::ipt_timestamp::ipt_ta
 

Macros

#define IPVERSION   4
 
#define IP_DF   0x4000 /* dont fragment flag */
 
#define IP_MF   0x2000 /* more fragments flag */
 
#define IP_OFFMASK   0x1fff /* mask for fragmenting bits */
 
#define IP_V(iph)   ((iph)->ip_fvhl >> 4)
 
#define IP_HL(iph)   (((iph)->ip_fvhl & 0x0F) << 2)
 
#define IP_V_SET(iph, x)   ((iph)->ip_fvhl = ((iph)->ip_fvhl & 0x0F) | ((x) << 4))
 
#define IP_HL_SET(iph, x)
 
#define IP_MAXPACKET   65535 /* maximum packet size */
 
#define IPTOS_LOWDELAY   0x10
 
#define IPTOS_THROUGHPUT   0x08
 
#define IPTOS_RELIABILITY   0x04
 
#define IPTOS_PREC_NETCONTROL   0xe0
 
#define IPTOS_PREC_INTERNETCONTROL   0xc0
 
#define IPTOS_PREC_CRITIC_ECP   0xa0
 
#define IPTOS_PREC_FLASHOVERRIDE   0x80
 
#define IPTOS_PREC_FLASH   0x60
 
#define IPTOS_PREC_IMMEDIATE   0x40
 
#define IPTOS_PREC_PRIORITY   0x20
 
#define IPTOS_PREC_ROUTINE   0x00
 
#define IPOPT_COPIED(o)   ((o)&0x80)
 
#define IPOPT_CLASS(o)   ((o)&0x60)
 
#define IPOPT_NUMBER(o)   ((o)&0x1f)
 
#define IPOPT_CONTROL   0x00
 
#define IPOPT_RESERVED1   0x20
 
#define IPOPT_DEBMEAS   0x40
 
#define IPOPT_RESERVED2   0x60
 
#define IPOPT_EOL   0 /* end of option list */
 
#define IPOPT_NOP   1 /* no operation */
 
#define IPOPT_RR   7 /* record packet route */
 
#define IPOPT_TS   68 /* timestamp */
 
#define IPOPT_SECURITY   130 /* provide s,c,h,tcc */
 
#define IPOPT_LSRR   131 /* loose source route */
 
#define IPOPT_SATID   136 /* satnet id */
 
#define IPOPT_SSRR   137 /* strict source route */
 
#define IPOPT_OPTVAL   0 /* option ID */
 
#define IPOPT_OLEN   1 /* option length */
 
#define IPOPT_OFFSET   2 /* offset within option */
 
#define IPOPT_MINOFF   4 /* min value of above */
 
#define IPOPT_TS_TSONLY   0 /* timestamps only */
 
#define IPOPT_TS_TSANDADDR   1 /* timestamps and addresses */
 
#define IPOPT_TS_PRESPEC   3 /* specified modules only */
 
#define IPOPT_SECUR_UNCLASS   0x0000
 
#define IPOPT_SECUR_CONFID   0xf135
 
#define IPOPT_SECUR_EFTO   0x789a
 
#define IPOPT_SECUR_MMMM   0xbc4d
 
#define IPOPT_SECUR_RESTR   0xaf13
 
#define IPOPT_SECUR_SECRET   0xd788
 
#define IPOPT_SECUR_TOPSECRET   0x6bc5
 
#define MAXTTL   255 /* maximum time to live (seconds) */
 
#define IPDEFTTL   64 /* default ttl, from RFC 1340 */
 
#define IPFRAGTTL   60 /* time to live for frags, slowhz */
 
#define IPTTLDEC   1 /* subtracted when forwarding */
 
#define IP_MSS   576 /* default maximum segment size */
 

Macro Definition Documentation

#define IP_DF   0x4000 /* dont fragment flag */

Definition at line 53 of file ip.h.

#define IP_HL (   iph)    (((iph)->ip_fvhl & 0x0F) << 2)

Definition at line 63 of file ip.h.

#define IP_HL_SET (   iph,
 
)
Value:
((iph)->ip_fvhl = \
((iph)->ip_fvhl & 0xF0) | (((x) >> 2) & 0x0F))

Definition at line 65 of file ip.h.

#define IP_MAXPACKET   65535 /* maximum packet size */

Definition at line 68 of file ip.h.

#define IP_MF   0x2000 /* more fragments flag */

Definition at line 54 of file ip.h.

#define IP_MSS   576 /* default maximum segment size */

Definition at line 159 of file ip.h.

#define IP_OFFMASK   0x1fff /* mask for fragmenting bits */

Definition at line 55 of file ip.h.

#define IP_V (   iph)    ((iph)->ip_fvhl >> 4)

Definition at line 62 of file ip.h.

#define IP_V_SET (   iph,
 
)    ((iph)->ip_fvhl = ((iph)->ip_fvhl & 0x0F) | ((x) << 4))

Definition at line 64 of file ip.h.

#define IPDEFTTL   64 /* default ttl, from RFC 1340 */

Definition at line 155 of file ip.h.

#define IPFRAGTTL   60 /* time to live for frags, slowhz */

Definition at line 156 of file ip.h.

#define IPOPT_CLASS (   o)    ((o)&0x60)

Definition at line 94 of file ip.h.

#define IPOPT_CONTROL   0x00

Definition at line 97 of file ip.h.

#define IPOPT_COPIED (   o)    ((o)&0x80)

Definition at line 93 of file ip.h.

#define IPOPT_DEBMEAS   0x40

Definition at line 99 of file ip.h.

#define IPOPT_EOL   0 /* end of option list */

Definition at line 102 of file ip.h.

#define IPOPT_LSRR   131 /* loose source route */

Definition at line 108 of file ip.h.

#define IPOPT_MINOFF   4 /* min value of above */

Definition at line 118 of file ip.h.

#define IPOPT_NOP   1 /* no operation */

Definition at line 103 of file ip.h.

#define IPOPT_NUMBER (   o)    ((o)&0x1f)

Definition at line 95 of file ip.h.

#define IPOPT_OFFSET   2 /* offset within option */

Definition at line 117 of file ip.h.

#define IPOPT_OLEN   1 /* option length */

Definition at line 116 of file ip.h.

#define IPOPT_OPTVAL   0 /* option ID */

Definition at line 115 of file ip.h.

#define IPOPT_RESERVED1   0x20

Definition at line 98 of file ip.h.

#define IPOPT_RESERVED2   0x60

Definition at line 100 of file ip.h.

#define IPOPT_RR   7 /* record packet route */

Definition at line 105 of file ip.h.

#define IPOPT_SATID   136 /* satnet id */

Definition at line 109 of file ip.h.

#define IPOPT_SECUR_CONFID   0xf135

Definition at line 144 of file ip.h.

#define IPOPT_SECUR_EFTO   0x789a

Definition at line 145 of file ip.h.

#define IPOPT_SECUR_MMMM   0xbc4d

Definition at line 146 of file ip.h.

#define IPOPT_SECUR_RESTR   0xaf13

Definition at line 147 of file ip.h.

#define IPOPT_SECUR_SECRET   0xd788

Definition at line 148 of file ip.h.

#define IPOPT_SECUR_TOPSECRET   0x6bc5

Definition at line 149 of file ip.h.

#define IPOPT_SECUR_UNCLASS   0x0000

Definition at line 143 of file ip.h.

#define IPOPT_SECURITY   130 /* provide s,c,h,tcc */

Definition at line 107 of file ip.h.

#define IPOPT_SSRR   137 /* strict source route */

Definition at line 110 of file ip.h.

#define IPOPT_TS   68 /* timestamp */

Definition at line 106 of file ip.h.

#define IPOPT_TS_PRESPEC   3 /* specified modules only */

Definition at line 140 of file ip.h.

#define IPOPT_TS_TSANDADDR   1 /* timestamps and addresses */

Definition at line 139 of file ip.h.

#define IPOPT_TS_TSONLY   0 /* timestamps only */

Definition at line 138 of file ip.h.

#define IPTOS_LOWDELAY   0x10

Definition at line 73 of file ip.h.

#define IPTOS_PREC_CRITIC_ECP   0xa0

Definition at line 83 of file ip.h.

#define IPTOS_PREC_FLASH   0x60

Definition at line 85 of file ip.h.

#define IPTOS_PREC_FLASHOVERRIDE   0x80

Definition at line 84 of file ip.h.

#define IPTOS_PREC_IMMEDIATE   0x40

Definition at line 86 of file ip.h.

#define IPTOS_PREC_INTERNETCONTROL   0xc0

Definition at line 82 of file ip.h.

#define IPTOS_PREC_NETCONTROL   0xe0

Definition at line 81 of file ip.h.

#define IPTOS_PREC_PRIORITY   0x20

Definition at line 87 of file ip.h.

#define IPTOS_PREC_ROUTINE   0x00

Definition at line 88 of file ip.h.

#define IPTOS_RELIABILITY   0x04

Definition at line 75 of file ip.h.

#define IPTOS_THROUGHPUT   0x08

Definition at line 74 of file ip.h.

#define IPTTLDEC   1 /* subtracted when forwarding */

Definition at line 157 of file ip.h.

#define IPVERSION   4

Definition at line 38 of file ip.h.

#define MAXTTL   255 /* maximum time to live (seconds) */

Definition at line 154 of file ip.h.