tcpdump  4.99.1
About: tcpdump is a tool for network monitoring and data acquisition.
  Fossies Dox: tcpdump-4.99.1.tar.gz  ("unofficial" and yet experimental doxygen-generated source code documentation)  

ip.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  ip
 
struct  ip_timestamp
 
union  ip_timestamp::ipt_timestamp
 
struct  ip_timestamp::ipt_timestamp::ipt_ta
 

Macros

#define IPVERSION   4
 
#define IP_V(ip)   ((GET_U_1((ip)->ip_vhl) & 0xf0) >> 4)
 
#define IP_HL(ip)   (GET_U_1((ip)->ip_vhl) & 0x0f)
 
#define IP_DF   0x4000 /* don't fragment flag */
 
#define IP_MF   0x2000 /* more fragments flag */
 
#define IP_OFFMASK   0x1fff /* mask for fragmenting bits */
 
#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_RFC1393   82 /* traceroute RFC 1393 */
 
#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_RA   148 /* router-alert, rfc2113 */
 
#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 IPTS_OFLW(ip)   (((ipt)->ipt_oflwflg & 0xf0) >> 4)
 
#define IPTS_FLG(ip)   ((ipt)->ipt_oflwflg & 0x0f)
 
#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

◆ IP_DF

#define IP_DF   0x4000 /* don't fragment flag */

Definition at line 60 of file ip.h.

◆ IP_HL

#define IP_HL (   ip)    (GET_U_1((ip)->ip_vhl) & 0x0f)

Definition at line 55 of file ip.h.

◆ IP_MAXPACKET

#define IP_MAXPACKET   65535 /* maximum packet size */

Definition at line 69 of file ip.h.

◆ IP_MF

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

Definition at line 61 of file ip.h.

◆ IP_MSS

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

Definition at line 163 of file ip.h.

◆ IP_OFFMASK

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

Definition at line 62 of file ip.h.

◆ IP_V

#define IP_V (   ip)    ((GET_U_1((ip)->ip_vhl) & 0xf0) >> 4)

Definition at line 54 of file ip.h.

◆ IPDEFTTL

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

Definition at line 159 of file ip.h.

◆ IPFRAGTTL

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

Definition at line 160 of file ip.h.

◆ IPOPT_CLASS

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

Definition at line 94 of file ip.h.

◆ IPOPT_CONTROL

#define IPOPT_CONTROL   0x00

Definition at line 97 of file ip.h.

◆ IPOPT_COPIED

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

Definition at line 93 of file ip.h.

◆ IPOPT_DEBMEAS

#define IPOPT_DEBMEAS   0x40

Definition at line 99 of file ip.h.

◆ IPOPT_EOL

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

Definition at line 102 of file ip.h.

◆ IPOPT_LSRR

#define IPOPT_LSRR   131 /* loose source route */

Definition at line 109 of file ip.h.

◆ IPOPT_MINOFF

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

Definition at line 120 of file ip.h.

◆ IPOPT_NOP

#define IPOPT_NOP   1 /* no operation */

Definition at line 103 of file ip.h.

◆ IPOPT_NUMBER

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

Definition at line 95 of file ip.h.

◆ IPOPT_OFFSET

#define IPOPT_OFFSET   2 /* offset within option */

Definition at line 119 of file ip.h.

◆ IPOPT_OLEN

#define IPOPT_OLEN   1 /* option length */

Definition at line 118 of file ip.h.

◆ IPOPT_OPTVAL

#define IPOPT_OPTVAL   0 /* option ID */

Definition at line 117 of file ip.h.

◆ IPOPT_RA

#define IPOPT_RA   148 /* router-alert, rfc2113 */

Definition at line 112 of file ip.h.

◆ IPOPT_RESERVED1

#define IPOPT_RESERVED1   0x20

Definition at line 98 of file ip.h.

◆ IPOPT_RESERVED2

#define IPOPT_RESERVED2   0x60

Definition at line 100 of file ip.h.

◆ IPOPT_RFC1393

#define IPOPT_RFC1393   82 /* traceroute RFC 1393 */

Definition at line 107 of file ip.h.

◆ IPOPT_RR

#define IPOPT_RR   7 /* record packet route */

Definition at line 105 of file ip.h.

◆ IPOPT_SATID

#define IPOPT_SATID   136 /* satnet id */

Definition at line 110 of file ip.h.

◆ IPOPT_SECUR_CONFID

#define IPOPT_SECUR_CONFID   0xf135

Definition at line 148 of file ip.h.

◆ IPOPT_SECUR_EFTO

#define IPOPT_SECUR_EFTO   0x789a

Definition at line 149 of file ip.h.

◆ IPOPT_SECUR_MMMM

#define IPOPT_SECUR_MMMM   0xbc4d

Definition at line 150 of file ip.h.

◆ IPOPT_SECUR_RESTR

#define IPOPT_SECUR_RESTR   0xaf13

Definition at line 151 of file ip.h.

◆ IPOPT_SECUR_SECRET

#define IPOPT_SECUR_SECRET   0xd788

Definition at line 152 of file ip.h.

◆ IPOPT_SECUR_TOPSECRET

#define IPOPT_SECUR_TOPSECRET   0x6bc5

Definition at line 153 of file ip.h.

◆ IPOPT_SECUR_UNCLASS

#define IPOPT_SECUR_UNCLASS   0x0000

Definition at line 147 of file ip.h.

◆ IPOPT_SECURITY

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

Definition at line 108 of file ip.h.

◆ IPOPT_SSRR

#define IPOPT_SSRR   137 /* strict source route */

Definition at line 111 of file ip.h.

◆ IPOPT_TS

#define IPOPT_TS   68 /* timestamp */

Definition at line 106 of file ip.h.

◆ IPOPT_TS_PRESPEC

#define IPOPT_TS_PRESPEC   3 /* specified modules only */

Definition at line 144 of file ip.h.

◆ IPOPT_TS_TSANDADDR

#define IPOPT_TS_TSANDADDR   1 /* timestamps and addresses */

Definition at line 143 of file ip.h.

◆ IPOPT_TS_TSONLY

#define IPOPT_TS_TSONLY   0 /* timestamps only */

Definition at line 142 of file ip.h.

◆ IPTOS_LOWDELAY

#define IPTOS_LOWDELAY   0x10

Definition at line 74 of file ip.h.

◆ IPTOS_PREC_CRITIC_ECP

#define IPTOS_PREC_CRITIC_ECP   0xa0

Definition at line 83 of file ip.h.

◆ IPTOS_PREC_FLASH

#define IPTOS_PREC_FLASH   0x60

Definition at line 85 of file ip.h.

◆ IPTOS_PREC_FLASHOVERRIDE

#define IPTOS_PREC_FLASHOVERRIDE   0x80

Definition at line 84 of file ip.h.

◆ IPTOS_PREC_IMMEDIATE

#define IPTOS_PREC_IMMEDIATE   0x40

Definition at line 86 of file ip.h.

◆ IPTOS_PREC_INTERNETCONTROL

#define IPTOS_PREC_INTERNETCONTROL   0xc0

Definition at line 82 of file ip.h.

◆ IPTOS_PREC_NETCONTROL

#define IPTOS_PREC_NETCONTROL   0xe0

Definition at line 81 of file ip.h.

◆ IPTOS_PREC_PRIORITY

#define IPTOS_PREC_PRIORITY   0x20

Definition at line 87 of file ip.h.

◆ IPTOS_PREC_ROUTINE

#define IPTOS_PREC_ROUTINE   0x00

Definition at line 88 of file ip.h.

◆ IPTOS_RELIABILITY

#define IPTOS_RELIABILITY   0x04

Definition at line 76 of file ip.h.

◆ IPTOS_THROUGHPUT

#define IPTOS_THROUGHPUT   0x08

Definition at line 75 of file ip.h.

◆ IPTS_FLG

#define IPTS_FLG (   ip)    ((ipt)->ipt_oflwflg & 0x0f)

Definition at line 131 of file ip.h.

◆ IPTS_OFLW

#define IPTS_OFLW (   ip)    (((ipt)->ipt_oflwflg & 0xf0) >> 4)

Definition at line 130 of file ip.h.

◆ IPTTLDEC

#define IPTTLDEC   1 /* subtracted when forwarding */

Definition at line 161 of file ip.h.

◆ IPVERSION

#define IPVERSION   4

Definition at line 43 of file ip.h.

◆ MAXTTL

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

Definition at line 158 of file ip.h.