FD.io VPP  v16.09
Vector Packet Processing
tcp_header_definitions.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  hdlc_hdr_type
 
struct  ppp_comp_hdr_type
 
struct  ethernet_arpa_hdr_type
 
struct  extension_802p3_type
 
struct  ethernet_802p3_hdr_type
 
struct  ethernet_vlan_802p3_hdr_type
 
struct  ethernet_vlan_hdr_type
 
struct  ethernet_qinq_hdr_type
 
struct  ethernet_lacp_hdr_type
 
struct  ethernet_bpdu_hdr_type
 
struct  ethernet_pppoe_arpa_hdr_type
 
struct  pppoe_hdr_type
 
struct  ethernet_pppoe_vlan_hdr_type
 
struct  ethernet_pppoe_qinq_hdr_type
 
struct  frame_relay_hdr_type
 
struct  fr_snap_hdr_type
 
struct  mlfr_hdr_type
 
struct  frf12_hdr_type_
 
struct  mlpofr_hdr_type
 
struct  apollo_atm_generic_hdr_type
 
struct  apollo_atm_aal5_snap_hdr_type
 
struct  atm_aal5_snap_hdr_type
 
struct  apollo_atm_aal5_snap_hdr1_type
 
struct  apollo_atm_aal5_clns_hdr_type
 
struct  apollo_atm_aal5_ilmi_hdr_type
 
struct  apollo_atm_aal5_mux_hdr_type
 
struct  apollo_atm_oam_f4_hdr_type
 
struct  apollo_atm_oam_f5_hdr_type
 
struct  apollo_atm_aal5_llcsnap_rbe_hdr_type
 
struct  apollo_atm_aal5_llcsnap_pppoe_hdr_type
 
struct  apollo_atm_aal5_mux_pppoa_hdr_type
 
struct  apollo_atm_aal5_llcsnap_pppoa_hdr_type
 
struct  apollo_atm_aal5_mux_mlpoa_hdr_type
 
struct  apollo_atm_aal5_llcsnap_mlpoa_hdr_type
 
struct  srp_hdr_type
 
struct  atm_oam_hdr_t_
 
struct  atm_oam_type_func_t_
 
struct  ipv4_header
 
struct  ipv4_options
 
struct  tcp_hdr_type
 
struct  tcp_option_s
 
struct  udp_hdr_type
 
struct  ipv6_header
 
struct  ipv6_frag_header
 
struct  ipv6_routing_header
 
struct  ipv6_hop_header
 
struct  ipv6_dest_opt_header
 
struct  icmp_v4_s
 
struct  icmp_v6_s
 
struct  pseudo_v6_header
 
struct  pptp_hdr_type
 

Macros

#define TYPE_IP   0x0800
 
#define TYPE_IP_V6   0x86DD
 
#define TYPE_ARP   0x0806
 
#define TYPE_RARP   0x8035
 
#define TYPE_MPLS   0x8847
 
#define TYPE_CDP   0x2000
 
#define TYPE_CGMP   0x2001
 
#define TYPE_LACP   0x8808 /* 802.3ad */
 
#define TYPE_CLNS   0xFEFE
 
#define TYPE_PPPOE_SESSION   0x8864 /* PTA plus */
 
#define TYPE_PPPOE_DISCOVERY   0x8863 /* PTA plus */
 
#define IN_ATM_ARP_BIT   0x0008
 
#define HDLC_ADDR_CMD   0x0F00
 
#define HDLC_HDR_LEN   4
 
#define HDLC_BROADCAST_BIT   31
 
#define TYPE_KEEP   0x8035
 
#define HDLC_CLNS   (HDLC_ADDR_CMD<<16|TYPE_CLNS)
 
#define HDLC_CDP   (HDLC_ADDR_CMD<<16|TYPE_CDP)
 
#define HDLC_MPLS   (HDLC_ADDR_CMD<<16|TYPE_MPLS)
 
#define HDLC_IP   (HDLC_ADDR_CMD<<16|TYPE_IP)
 
#define HDLC_IP_V6   (HDLC_ADDR_CMD<<16|TYPE_IP_V6)
 
#define HDLC_KEEPALIVE_CMD   (HDLC_ADDR_CMD<<16|TYPE_KEEP)
 
#define PPP_STATION   0xFF03
 
#define PPP_STATION_LEN   0x2
 
#define PPP_ENDPROTO   0x01
 
#define PPP_NOT_ENDPROTO   0xfffffffe
 
#define PPP_CONTROL_PROTOCOL_MASK   0x8000
 
#define PPP_CONTROL_PROTOCOL_BIT   15
 
#define PPP_CSCO_LEN   4
 
#define PPP_RFC1661_LEN   2
 
#define PPP_RFC1661_COMP_LEN   1
 
#define TYPE_PPP_IP   0x0021
 
#define TYPE_PPP_IP_V6   0x0057
 
#define TYPE_PPP_MPLS_UNICAST   0x0281
 
#define TYPE_PPP_MPLS_CONTROL   0x8281
 
#define TYPE_PPP_CLNS   0x0023
 
#define TYPE_PPP_CDP   0x0207
 
#define TYPE_PPP_IPCP   0x8021
 
#define TYPE_PPP_LCP   0xC021
 
#define TYPE_PPP_PAP   0xC023
 
#define TYPE_PPP_LQR   0xC025
 
#define TYPE_PPP_CHAP   0xC223
 
#define TYPE_PPP_LCP_ECHO_REQUEST   0x09
 
#define MLPPP_FLAGS_FIELD_LEN   4
 
#define MLPPP_BEGIN_MASK   0x80000000
 
#define MLPPP_END_MASK   0x40000000
 
#define MLPPP_BEGIN_END_MASK   (MLPPP_BEGIN_MASK|MLPPP_END_MASK)
 
#define MLPPP_BEGIN_END_SHIFT   30
 
#define MLPPP_SEQUENCE_NUM_MASK   0x00FFFFFF
 
#define MLPPP_MC_CLASS_ID_MASK   0x3C000000
 
#define MLPPP_MC_CLASS_SHIFT   26
 
#define TYPE_PPP_MULTILINK   0x003D
 
#define TYPE_PPP_FULL_IP_4   0xff030021
 
#define TYPE_PPP_FULL_IP_3   0xff0321
 
#define TYPE_PPP_FULL_IP_2   0x0021
 
#define TYPE_PPP_FULL_IP_1   0x21
 
#define MLPPP_BEGIN_END_MASK_BYTE   0xC0
 
#define MLPPP_BEGIN_BIT   7
 
#define MLPPP_END_BIT   6
 
#define MLPPP_MC_CLASS_ID_MASK_BYTE   0x3C
 
#define MLPPP_MC_CLASS_ID_SHIFT_BYTE   2
 
#define MLPOA_BEGIN_END_SHIFT   24
 
#define MIN_ETHERNET_PKT_LEN   60
 
#define MAX_ETHERNET_PKT_LEN   1500
 
#define ETHERNET_ARPA_HDR_LEN   14
 
#define ETHERNET_TYPE_FIELD_SIZE   2
 
#define ETH_BPDU_DSAP   0x42
 
#define ETH_BPDU_SSAP   0x42
 
#define ETH_BPDU_CONTROL   0x03
 
#define ETH_BPDU_MATCH   0x424203
 
#define ETH_PPPOE_ARPA_HDR_LEN   sizeof(ethernet_pppoe_arpa_hdr_type)
 
#define ETH_PPPOE_VLAN_HDR_LEN   sizeof(ethernet_pppoe_vlan_hdr_type)
 
#define ETH_PPPOE_QINQ_HDR_LEN   sizeof(ethernet_pppoe_qinq_hdr_type)
 
#define PPPOE_HDR_LEN   6
 
#define TYPE_DOT1Q   0x8100
 
#define DOT1Q_HDR_LEN   18
 
#define DOT1Q_VLAN_ID_MASK   0x0FFF
 
#define DOT1Q_VLAN_ID_RES_0   0x0000
 
#define DOT1Q_VLAN_ID_RES_4095   0x0FFF
 
#define DOT1Q_ARPA_INDEX   DOT1Q_VLAN_ID_RES_0
 
#define TYPE_QINQ_91   0x9100
 
#define TYPE_QINQ_92   0x9200
 
#define TYPE_QINQ_88A8   0x88A8
 
#define QINQ_HDR_LEN   22
 
#define DOT1P_VLAN_COS_MASK   0xE000
 
#define DOT1P_VLAN_COS_SHIFT   13
 
#define DOT1P_MAX_COS_VALUE   7
 
#define FR_ADDR_LEN   2
 
#define FR_CTL_NLPID_LEN   2
 
#define FR_HDR_LEN   (FR_ADDR_LEN+FR_CTL_NLPID_LEN)
 
#define FR_ARP_CONTROL   0x03
 
#define FR_ARP_PAD   0x00
 
#define FR_ARP_NLPID   0x80
 
#define FR_ARP_OUI_0   0x00
 
#define FR_ARP_OUI_1   0x00
 
#define FR_ARP_OUI_2   0x00
 
#define FR_NLPID_OUI_LEN   4
 
#define FR_ARP_CONTROL_PAD   0x0300
 
#define FR_ARP_NLPID_OUI   0x80000000
 
#define FR_DLCI_UPPER_MASK   0xFC00
 
#define FR_DLCI_UPPER_SHIFT   6
 
#define FR_DLCI_LOWER_MASK   0x00F0
 
#define FR_DLCI_LOWER_SHIFT   4
 
#define FR_DLCI_TO_HDR_UPPER_MASK   0x3f0
 
#define FR_DLCI_TO_HDR_UPPER_SHIFT   (10-4)
 
#define FR_DLCI_TO_HDR_LOWER_MASK   0xf
 
#define FR_DLCI_TO_HDR_LOWER_SHIFT   4
 
#define TYPE_FR_IETF_IP   0x03CC
 
#define TYPE_FR_IETF_IP_V6   0x038E
 
#define TYPE_FR_CISCO_IP   0x0800
 
#define TYPE_FR_CISCO_IP_V6   0x86DD
 
#define TYPE_FR_ISIS   0x0383
 
#define TYPE_FR_SNAP0PAD   0x0380
 
#define TYPE_FR_SNAP1PAD   0x0300
 
#define TYPE_FR_FRF12   0x03B1
 
#define TYPE_FR_MLP   0x03CF
 
#define TYPE_FR_EEK   0x8037
 
#define FR_LMI_DLCI_CISCO   1023
 
#define FR_LMI_DLCI_IETF   0
 
#define FR_NOT_NOT_NOT   0
 
#define FR_NOT_NOT_DE   1
 
#define FR_NOT_BECN_NOT   2
 
#define FR_NOT_BECN_DE   3
 
#define FR_FECN_NOT_NOT   4
 
#define FR_FECN_NOT_DE   5
 
#define FR_FECN_BECN_NOT   6
 
#define FR_FECN_BECN_DE   7
 
#define FR_FECN_BECN_DE_MASK   0x000E
 
#define FR_FECN_BECN_DE_SHIFT   1
 
#define FR_EA1_MASK   0x0001
 
#define FR_EA1_MASK_BIT   0
 
#define FR_DLCI_LS_BIT   4
 
#define MLFR_LIP_FRAME   0xE100
 
#define MLFR_LIP_MASK   0xE000
 
#define MLFR_FRAG_HDR_LEN   2
 
#define MLFR_BEGIN_MASK   0x8000
 
#define MLFR_END_MASK   0x4000
 
#define MLFR_BEGIN_END_MASK   (MLFR_BEGIN_MASK|MLFR_END_MASK)
 
#define MLFR_BEGIN_END_SHIFT   14
 
#define MLFR_SEQ_NUM_HI_MASK   0x1E00
 
#define MLFR_SEQ_NUM_HI_SHIFT   1
 
#define MLFR_SEQ_NUM_LO_MASK   0x00FF
 
#define MLFR_BEGIN_END_MASK_BYTE   0xC0
 
#define FRF12_FRAG_HDR_LEN   sizeof(frf12_hdr_type)
 
#define FRF12_BEGIN_MASK   0x8000
 
#define FRF12_END_MASK   0x4000
 
#define FRF12_BEGIN_END_MASK   (FRF12_BEGIN_MASK|FRF12_END_MASK)
 
#define FRF12_BEGIN_END_SHIFT   8
 
#define FRF12_SEQ_NUM_HI_MASK   0x1E00
 
#define FRF12_SEQ_NUM_HI_SHIFT   1
 
#define FRF12_SEQ_NUM_LO_MASK   0x00FF
 
#define FRF12_BEGIN_END_MASK_BYTE   0xC0
 
#define APOLLO_ATM_OAM_F4_HDR_PT_MASK   0xE
 
#define APOLLO_ATM_OAM_F4_HDR_PT_SHIFT   1
 
#define APOLLO_IRONBUS_EXT_LESS_PROTO   0xFFFF0FFF
 
#define APOLLO_CHANNEL_HANDLE_MASK   0xFFFF
 
#define APOLLO_PKT_TYPE_MASK   0x0038
 
#define APOLLO_PKT_TYPE_SHIFT   3
 
#define APOLLO_FLAG_CLP_MASK   0x0001
 
#define APOLLO_FLAG_CLP_BIT   0
 
#define APOLLO_CHANNEL_HANDLE_RES_0   0x0000
 
#define APOLLO_F4_RX_CELL_SIZE   52
 
#define APOLLO_F5_RX_CELL_SIZE   52
 
#define APOLLO_ATM_PACKET_TYPE_AAL5   0
 
#define APOLLO_ATM_PACKET_TYPE_F4   1
 
#define APOLLO_ATM_PACKET_TYPE_F5_SEG   2
 
#define APOLLO_ATM_PACKET_TYPE_F5_E_TO_E   3
 
#define APOLLO_ATM_PACKET_TYPE_4   4
 
#define APOLLO_ATM_PACKET_TYPE_5   5
 
#define APOLLO_ATM_PACKET_TYPE_6   6
 
#define APOLLO_ATM_PACKET_RESERVED   7
 
#define APOLLO_AAL5_MUX_IP_HDR_LEN   4
 
#define APOLLO_AAL5_SNAP_HDR_LEN   12
 
#define APOLLO_RCV_IRON_BUS_EXT_LEN   4
 
#define APOLLO_TX_IRON_BUS_EXT_LEN   8
 
#define MLPOA_CISCO_HDR   0xFF03
 
#define MLPOA_SNAP_HDR_LEN   4
 
#define MLPOA_CISCO_HDR_LEN   2
 
#define PPPOA_SNAPLLC_HDR_LEN   sizeof(apollo_atm_aal5_llcsnap_pppoa_hdr_type)
 
#define PPPOA_MUX_HDR_LEN   sizeof(apollo_atm_aal5_mux_pppoa_hdr_type)
 
#define PPPOE_SNAPLLC_HDR_LEN   sizeof(apollo_atm_aal5_llcsnap_pppoe_hdr_type)
 
#define RBE_SNAPLLC_HDR_LEN   sizeof(apollo_atm_aal5_llcsnap_rbe_hdr_type)
 
#define LLCSNAP_PID_DOT3_NOFCS   0x0007
 
#define LLC_SNAP_HDR_DSAP   0xAA
 
#define LLC_SNAP_HDR_SSAP   0xAA
 
#define LLC_SNAP_HDR_CONTROL   0x03
 
#define LLC_SNAP_HDR_OUI_0   0x00
 
#define LLC_SNAP_HDR_OUI_1   0x00
 
#define LLC_SNAP_HDR_OUI_2   0x00
 
#define LLC_SNAP_HDR_OUI_2_CDP   0x0C
 
#define LLC_SNAP_HDR_DSAP_SSAP   0xAAAA
 
#define LLC_SNAP_HDR_DSAP_SSAP_CTRL_OUI0   0xAAAA0300
 
#define LLC_SNAP_HDR_CONTROL_OUI   0x03000000
 
#define LLC_SNAP_HDR_OUI1_OUI2_CDP   0x000C2000
 
#define SRP_HDR_LEN   16
 
#define SRP_IB_CHANNEL_CONTROL   0x0000
 
#define SRP_IB_CHANNEL_DATA_HI   0x0001
 
#define SRP_IB_CHANNEL_DATA_LO   0x0002
 
#define SRP_RING_ID_MASK   0x0080
 
#define SRP_RING_ID_BIT   7
 
#define SRP_MODE_BITS_MASK   0x0070
 
#define SRP_MODE_BITS_SHIFT   4
 
#define SRP_MODE_CONTROL_TOPOLOGY   4
 
#define SRP_MODE_CONTROL_IPS   5
 
#define SRP_MODE_DATA   7
 
#define SRP_PRIORITY_BITS_MASK   0x000E
 
#define SRP_PRIORITY_BITS_SHIFT   1
 
#define SRP_PRIORITY_HIGH   7
 
#define SRP_PRIORITY_PAK_PRIORITY   6
 
#define SRP_INV_PRIORITY_BITS_MASK   0xFFF1
 
#define SRP_PROT_CONTROL_TOPOLOGY   0x2007
 
#define SRP_PROT_CONTROL_IPS   0x2007
 
#define SRP_TRUE   1
 
#define SRP_FALSE   0
 
#define MPLS_EOS_BIT   0x00000100
 
#define MPLS_EOS_SHIFT   8
 
#define MPLS_LABEL_SIZE   4
 
#define MAX_MPLS_LABEL_STACK   6
 
#define MPLS_LABEL_MASK   0xfffff000
 
#define MPLS_LABEL_SHIFT   12
 
#define MPLS_TTL_MASK   0x000000ff
 
#define MPLS_EXP_MASK   0x00000e00
 
#define MPLS_EXP_SHIFT   9
 
#define MPLS_EXP_TTL_MASK   0x00000eff
 
#define ATM_OAM_FAULT_MGMT   0x1 /* OAM Fault mgmt. code */
 
#define ATM_OAM_PRFRM_MGMT   0x2 /* performance mgmt code */
 
#define ATM_OAM_ACT_DEACT
 
#define ATM_OAM_SYSTEM_MGMT   0xF /* System Management code */
 
#define ATM_OAM_AIS_FUNC   0x0 /* AIS function type */
 
#define ATM_OAM_RDI_FUNC   0x1 /* RDI function type */
 
#define ATM_OAM_CC_FUNC   0x4 /* OAM CC FM function code */
 
#define ATM_OAM_LOOP_FUNC   0x8 /* Loopback function type */
 
#define ATM_OAM_F5_SEGMENT   0x4 /* Segment function */
 
#define ATM_OAM_F5_ENDTOEND   0x5 /* End-to-End function */
 
#define ATM_OAM_F4_SEGMENT   0x3 /* Segment function */
 
#define ATM_OAM_F4_ENDTOEND   0x4 /* End-to-End function */
 
#define ATM_OAM_F4_PTI_ZERO   0x0 /* PTI=0 for F4 OAM */
 
#define LOOSE_SOURCE_ROUTE   131
 
#define STRICT_SOURCE_ROUTE   137
 
#define IPV4_NO_OPTIONS_HDR_LEN   (sizeof(ipv4_header))
 
#define IPV4_VERSION   4
 
#define IPV4_HEADER_LENGTH_WORDS   5
 
#define IPV4_VERSION_HDR_LEN_FIELD   ((u8) 0x45)
 
#define IPV4_HEADER_LENGTH_WORDS   5
 
#define IPV4_MIN_HEADER_LENGTH_BYTES   20
 
#define IP_HDR_LEN   sizeof(ipv4_header)
 
#define IPV4_VERSION_VALUE_SHIFT   4
 
#define IPV4_FRAG_OFFSET_MASK   (0x1fff)
 
#define IPV4_FRAG_MF_MASK   (0x2000)
 
#define IPV4_FRAG_MF_SHIFT   (13)
 
#define IP_BOOTP_SOURCE_ADDRESS   0
 
#define IP_LIMITED_BROADCAST_ADDRESS   0xFFFFFFFF
 
#define IP_VER_LEN   0x45
 
#define IP_VER   0x4
 
#define IP_MIN_LEN   0x5
 
#define IP_VER_MASK   0xf0
 
#define IP_LEN_MASK   0x0f
 
#define PS_IP_TOS_MASK   0xff
 
#define IP_PRECEDENCE_SHIFT   5 /* shift value up to precedence bits */
 
#define IP_DSCP_SHIFT   2 /* shift value up to dscp bits */
 
#define IP_TOS_PRECEDENCE   0xe0 /* mask of precedence in tos byte */
 
#define IP_TOS_NO_PRECEDENCE   0x1f
 
#define IP_TOS_LOW_DELAY   8 /* values must be shifted 1 bit */
 
#define IP_TOS_HIGH_TPUT   4 /* before using */
 
#define IP_TOS_HIGH_RELY   2
 
#define IP_TOS_LOW_COST   1
 
#define IP_TOS_NORMAL   0
 
#define IP_TOS_MASK   0x1e /* mask of tos in tos byte */
 
#define IP_TOS_MBZ_MASK   0x01 /* mask for MZB bit in tos byte */
 
#define IP_TOS_DSCP   0xfc /* mask for dscp in tos byte */
 
#define IP_TOS_NO_DSCP   0x03
 
#define IP_TOS_METRIC_TYPES   8
 
#define IP_TOS_SHIFT   1
 
#define IP_TOS_PRECEDENCE_MASK   (IP_TOS_PRECEDENCE | IP_TOS_MASK)
 
#define TOS_PREC_NET_CONTROL   0xe0
 
#define TOS_PREC_INET_CONTROL   0xc0
 
#define TOS_PREC_CRIT_ECP   0xa0
 
#define TOS_PREC_FLASH_OVER   0x80
 
#define TOS_PREC_FLASH   0x60
 
#define TOS_PREC_IMMEDIATE   0x40
 
#define TOS_PREC_PRIORITY   0x20
 
#define TOS_PREC_ROUTINE   0x00
 
#define TOS_PREC_ILLEGAL   0xff /* invalid precedence value */
 
#define TOS_PREC_NET_CONTROL_NUM   7
 
#define TOS_PREC_INET_CONTROL_NUM   6
 
#define TOS_PREC_CRIT_ECP_NUM   5
 
#define TOS_PREC_FLASH_OVER_NUM   4
 
#define TOS_PREC_FLASH_NUM   3
 
#define TOS_PREC_IMMEDIATE_NUM   2
 
#define TOS_PREC_PRIORITY_NUM   1
 
#define TOS_PREC_ROUTINE_NUM   0
 
#define IP_FRAG_OFFSET_MASK   0x1fff
 
#define IP_FRAG_MORE_MASK   0x2000
 
#define IP_FRAG_DF_MASK   0x4000
 
#define IP_FRAG_UNDEF_MASK   0x8000
 
#define IP_FRAG_NO_DF_SET   0x0000
 
#define IP_FRAG_MORE_BIT   13
 
#define IP_FRAG_DF_BIT   14
 
#define IP_FRAG_UNDEF_BIT   15
 
#define TTL_DEFAULT   255
 
#define TTL_1   1
 
#define TTL_2   2
 
#define TTL_255   255
 
#define ICMP_PROT   1
 
#define IGMP_PROT   2
 
#define GGP_PROT   3
 
#define IPINIP_PROT   4
 
#define TCP_PROT   6
 
#define EGP_PROT   8
 
#define IGRP_PROT   9
 
#define UDP_PROT   17
 
#define HMP_PROT   20
 
#define RDP_PROT   27
 
#define IPV6_INIP_PROT   41
 
#define RSVP_PROT   46
 
#define GRE_PROT   47
 
#define ESP_PROT   50
 
#define AHP_PROT   51
 
#define SDNS0_PROT   53
 
#define NHRP_PROT   54
 
#define SDNS1_PROT   55
 
#define HELLO_PROT   63
 
#define ND_PROT   77
 
#define EONIP_PROT   80
 
#define VINES_PROT   83
 
#define NEWIGRP_PROT   88
 
#define OSPF_PROT   89
 
#define FST_RSRB_PROT   90
 
#define FST_DLSW_PROT   91
 
#define NOSIP_PROT   94
 
#define PIM_PROT   103
 
#define PCP_PROT   108
 
#define PGM_PROT   113
 
#define MAX_PROT   113
 
#define FTP_PORT   21 /* For control connection */
 
#define TCP_FLAG_FIN   0x01
 
#define TCP_FLAG_SYN   0x02
 
#define TCP_FLAG_RST   0x04
 
#define TCP_FLAG_PUSH   0x08
 
#define TCP_FLAG_ACK   0x10
 
#define TCP_FLAG_URG   0x20
 
#define TCP_FLAG_ECE   0x40
 
#define TCP_FLAG_CWR   0x80
 
#define TCP_END_OPTIONS_LIST   0
 
#define TCP_OPTION_NOP   1
 
#define TCP_OPTION_MSS   2
 
#define TCP_OPTION_WINDOW_SCALE   3
 
#define TCP_OPTION_SACK_PERMITTED   4
 
#define TCP_OPTION_SACK_DATA   5
 
#define TCP_OPTION_ECHO   6
 
#define TCP_OPTION_ECHO_REPLY   7
 
#define TCP_OPTION_TSOPT   8
 
#define TCP_OPTION_MD5_SIGNATURE   19
 
#define TCP_OPTION_QUICK_START   27
 
#define TCP_OPTION_NUM_MAX   27
 
#define tcp_printf(format_str, params...)   printf(format_str, ## params)
 
#define TYPE_IPV6   0x86dd
 
#define TYPE_IPV4   0x0800
 
#define IPV6_HDR_LEN   40
 
#define IPV6_HDR_LEN_WORDS   10
 
#define IPV6_FLABLE_MASK   0x000FFFFF
 
#define IPV6_MIN_PATH_MTU   (1280)
 
#define IPV6_GET_IP_VER(ih)
 
#define IPV6_GET_TOS(ih)
 
#define IPV6_GET_FLOW_LABEL(ih)
 
#define IPV6_VERSION_VALUE   (6)
 
#define IPV6_VERSION_VALUE_SHIFT   (28)
 
#define IPV6_TRAFFIC_CLASS_VALUE_SHIFT   (20)
 
#define IPV6_TRAFFIC_CLASS_VALUE_MASK   (0xff)
 
#define IPV6_PROTO_HOPOPTS   0
 
#define IPV6_PROTO_TCP   6
 
#define IPV6_PROTO_UDP   17
 
#define IPV6_PROTO_IPV6   41
 
#define IPV6_PROTO_ROUTING   43
 
#define IPV6_PROTO_FRAGMENT   44
 
#define IPV6_PROTO_DESTOPTS   60
 
#define IPV6_PROTO_ESP   50
 
#define IPV6_PROTO_AH   51
 
#define IPV6_PROTO_ICMPV6   58
 
#define IPV6_PROTO_NONE   59
 
#define IPV6_FRAG_HDR_LEN   (sizeof(ipv6_frag_header_t))
 
#define IPV6_FRAG_OFFSET_MASK   (0xFFF8)
 
#define IPV6_FRAG_OFFSET_SHIFT   (3)
 
#define IPV6_FRAG_MORE_FRAG_MASK   (0x0001)
 
#define IPV6_TOS_SHIFT   20
 
#define IPV6_TOS_SHIFT_HLF_WD   4
 
#define IPV6_NEXT_HDR_SHIFT   8
 
#define IPV6_ROUTING_HDR_LEN   (sizeof(ipv6_routing_header_t))
 
#define IPV6_HOP_LEN   (sizeof(ipv6_hop_header_t))
 
#define IPV6_DESTOPT_LEN   (sizeof(ipv6_dest_opt_header_t))
 
#define ICMPV4_HDR_SIZE   (sizeof(icmp_v4_t))
 
#define ICMPV4_ECHOREPLY   0 /* Type: echo reply */
 
#define ICMPV4_ECHO   8 /* Type: echo request */
 
#define ICMPV4_UNREACHABLE   3 /* Type: destination unreachable */
 
#define ICMPV4_UNRNET   0 /* Code: Net unreachable */
 
#define ICMPV4_UNRHOST   1 /* Code: host unreachable */
 
#define ICMPV4_UNRPROT   2 /* Code: protocol unreachable */
 
#define ICMPV4_UNRPORT   3 /* Code: port unreachable */
 
#define ICMPV4_UNRFRAG   4 /* Code: frag req DF set */
 
#define ICMPV4_UNRADMIN   13 /* Code: administratively prohib. */
 
#define ICMPV4_SOURCEROUTE_FAILED   5 /* Code: administratively prohib. */
 
#define ICMPV4_SRC_ROUTE_FAIL   5 /* Code: Source Route Failed */
 
#define ICMPV4_NO_ROUTE_DESTN_8   8 /* Code: No Route to Destn */
 
#define ICMPV4_NO_ROUTE_DESTN_11   11 /* Code: No Route to Destn */
 
#define ICMPV4_NO_ROUTE_DESTN_12   12 /* Code: No Route to Destn */
 
#define ICMPV4_ADMIN_PROH_9   9 /* Code: Administratively Prohibited */
 
#define ICMPV4_ADMIN_PROH_10   10 /* Code: Administratively Prohibited */
 
#define ICMPV4_PREC_CUTOFF   15 /* Code: Precedence Cutoff */
 
#define ICMPV4_TIMEEXCEEDED   11 /* Type: time exceeded */
 
#define ICMPV4_TIMTTL   0 /* Code: ttl in transit code */
 
#define ICMPV4_PARAMETER_PROBLEM   12 /* Type: Parameter Problem */
 
#define ICMPV4_PARAM_ERROR   0 /* Code: Pointer to Error */
 
#define ICMPV4_MISSING_OPTION_CODE   1 /* Code: Mission option */
 
#define ICMPV4_PARAM_BAD_LEN   2 /* Code: Bad Length */
 
#define ICMPV4_CONVERSION_ERROR   31
 
#define ICMPV4_SOURCE_QUENCH   4
 
#define ICMPV4_REDIRECT   5
 
#define ICMPV4_TIMESTAMP   13
 
#define ICMPV4_TIMESTAMP_REPLY   14
 
#define ICMPV4_INFO_REQUEST   15
 
#define ICMPV4_INFO_REPLY   16
 
#define ICMPV4_ADDR_MASK_REQUEST   17
 
#define ICMPV4_ADDR_MASK_REPLY   18
 
#define ICMPV6_ECHO   128
 
#define ICMPV6_ECHO_REPLY   129
 
#define ICMPV6_PKT_TOO_BIG   2
 
#define ICMPV6_TIMEEXCEEDED   3
 
#define ICMPV6_TIMTTL   0
 
#define ICMPV6_PARAMETER_PROBLEM   4
 
#define ICMPV6_UNREACHABLE   1
 
#define ICMPV6_NEIGHBOR_SOLICITAION   135
 
#define ICMPV6_NEIGHBOR_ADVT   136
 
#define ICMPV6_ERR_SIZE   48
 
#define ICMPV6_HDR_SIZE   (sizeof(icmp_v6_t) +sizeof(u32))
 
#define ICMPV6_UNRDESTN   0 /* Code: No route to Desnt */
 
#define ICMPV6_ADM_PROH   1 /* Code: Adminitrative Prohibited */
 
#define ICMPV6_SRC_ADD_SCOPE   2 /* Code: Source Address beyond scope */
 
#define ICMPV6_UNRHOST   3 /* Code: Host Unreachable */
 
#define ICMPV6_UNRPORT   4 /* Code: Port UnReachable */
 
#define ICMPV6_UNRPROT   1 /* type 4 - Code: No route to Desnt */
 
#define ICMPV6_PTB_CODE   0 /* Code: For PTB */
 
#define ICMPV6_PARAM_CODE   0 /* Code: For Parameter Problem */
 
#define ICMPV6_UNREC_HDR   1 /* Code: For Parameter Problem */
 
#define ICMPV6_SRC_ADD_FAIL   5 /* Code: For Source address failed */
 
#define ICMP_ECHO_REPLY_CODE   0
 
#define DEFAULT_TTL_HOPLIMIT_VAL   64
 
#define MAXTCPOPTIONBYTES   40
 
#define MINTCPOPTIONLENGTH   2
 

Typedefs

typedef struct hdlc_hdr_type hdlc_hdr_type
 
typedef struct ppp_comp_hdr_type ppp_comp_hdr_type
 
typedef struct ethernet_arpa_hdr_type ethernet_arpa_hdr_type
 
typedef struct extension_802p3_type extension_802p3_type
 
typedef struct ethernet_802p3_hdr_type ethernet_802p3_hdr_type
 
typedef struct ethernet_vlan_802p3_hdr_type ethernet_vlan_802p3_hdr_type
 
typedef struct ethernet_vlan_hdr_type ethernet_vlan_hdr_type
 
typedef struct ethernet_qinq_hdr_type ethernet_qinq_hdr_type
 
typedef struct ethernet_lacp_hdr_type ethernet_lacp_hdr_type
 
typedef struct ethernet_bpdu_hdr_type ethernet_bpdu_hdr_type
 
typedef struct ethernet_pppoe_arpa_hdr_type ethernet_pppoe_arpa_hdr_type
 
typedef struct pppoe_hdr_type pppoe_hdr_type
 
typedef struct ethernet_pppoe_vlan_hdr_type ethernet_pppoe_vlan_hdr_type
 
typedef struct ethernet_pppoe_qinq_hdr_type ethernet_pppoe_qinq_hdr_type
 
typedef struct frame_relay_hdr_type frame_relay_hdr_type
 
typedef struct fr_snap_hdr_type fr_snap_hdr_type
 
typedef struct mlfr_hdr_type mlfr_hdr_type
 
typedef struct frf12_hdr_type_ frf12_hdr_type
 
typedef struct mlpofr_hdr_type mlpofr_hdr_type
 
typedef struct apollo_atm_generic_hdr_type apollo_atm_generic_hdr_type
 
typedef struct apollo_atm_aal5_snap_hdr_type apollo_atm_aal5_snap_hdr_type
 
typedef struct atm_aal5_snap_hdr_type atm_aal5_snap_hdr_type
 
typedef struct apollo_atm_aal5_snap_hdr1_type apollo_atm_aal5_snap_hdr1_type
 
typedef struct apollo_atm_aal5_clns_hdr_type apollo_atm_aal5_clns_hdr_type
 
typedef struct apollo_atm_aal5_ilmi_hdr_type apollo_atm_aal5_ilmi_hdr_type
 
typedef struct apollo_atm_aal5_mux_hdr_type apollo_atm_aal5_mux_hdr_type
 
typedef struct apollo_atm_oam_f4_hdr_type apollo_atm_oam_f4_hdr_type
 
typedef struct apollo_atm_oam_f5_hdr_type apollo_atm_oam_f5_hdr_type
 
typedef struct apollo_atm_aal5_llcsnap_rbe_hdr_type apollo_atm_aal5_llcsnap_rbe_hdr_type
 
typedef struct apollo_atm_aal5_llcsnap_pppoe_hdr_type apollo_atm_aal5_llcsnap_pppoe_hdr_type
 
typedef struct apollo_atm_aal5_mux_pppoa_hdr_type apollo_atm_aal5_mux_pppoa_hdr_type
 
typedef struct apollo_atm_aal5_llcsnap_pppoa_hdr_type apollo_atm_aal5_llcsnap_pppoa_hdr_type
 
typedef struct apollo_atm_aal5_mux_mlpoa_hdr_type apollo_atm_aal5_mux_mlpoa_hdr_type
 
typedef struct apollo_atm_aal5_llcsnap_mlpoa_hdr_type apollo_atm_aal5_llcsnap_mlpoa_hdr_type
 
typedef struct srp_hdr_type srp_hdr_type
 
typedef union _layer2 layer2_t
 
typedef struct atm_oam_hdr_t_ atm_oam_hdr_t
 
typedef struct atm_oam_type_func_t_ atm_oam_type_func_t
 
typedef struct ipv4_header ipv4_header
 
typedef struct ipv4_options ipv4_options
 
typedef struct tcp_hdr_type tcp_hdr_type
 
typedef struct tcp_option_s tcp_option_t
 
typedef struct udp_hdr_type udp_hdr_type_t
 
typedef struct ipv6_header ipv6_header_t
 
typedef struct ipv6_frag_header ipv6_frag_header_t
 
typedef struct ipv6_routing_header ipv6_routing_header_t
 
typedef struct ipv6_hop_header ipv6_hop_header_t
 
typedef struct ipv6_dest_opt_header ipv6_dest_opt_header_t
 
typedef struct icmp_v4_s icmp_v4_t
 
typedef struct icmp_v6_s icmp_v6_t
 
typedef struct pseudo_v6_header pseudo_v6_header_t
 
typedef struct pptp_hdr_type pptp_hdr_type_t
 

Functions

static u8tcp_findoption (tcp_hdr_type *tcp, u8 option)
 
static u32 crc_calc (ipv4_header *ipv4)
 

Macro Definition Documentation

#define AHP_PROT   51

Definition at line 1187 of file tcp_header_definitions.h.

#define APOLLO_AAL5_MUX_IP_HDR_LEN   4

Definition at line 699 of file tcp_header_definitions.h.

#define APOLLO_AAL5_SNAP_HDR_LEN   12

Definition at line 700 of file tcp_header_definitions.h.

#define APOLLO_ATM_OAM_F4_HDR_PT_MASK   0xE

Definition at line 667 of file tcp_header_definitions.h.

#define APOLLO_ATM_OAM_F4_HDR_PT_SHIFT   1

Definition at line 668 of file tcp_header_definitions.h.

#define APOLLO_ATM_PACKET_RESERVED   7

Definition at line 697 of file tcp_header_definitions.h.

#define APOLLO_ATM_PACKET_TYPE_4   4

Definition at line 694 of file tcp_header_definitions.h.

#define APOLLO_ATM_PACKET_TYPE_5   5

Definition at line 695 of file tcp_header_definitions.h.

#define APOLLO_ATM_PACKET_TYPE_6   6

Definition at line 696 of file tcp_header_definitions.h.

#define APOLLO_ATM_PACKET_TYPE_AAL5   0

Definition at line 690 of file tcp_header_definitions.h.

#define APOLLO_ATM_PACKET_TYPE_F4   1

Definition at line 691 of file tcp_header_definitions.h.

#define APOLLO_ATM_PACKET_TYPE_F5_E_TO_E   3

Definition at line 693 of file tcp_header_definitions.h.

#define APOLLO_ATM_PACKET_TYPE_F5_SEG   2

Definition at line 692 of file tcp_header_definitions.h.

#define APOLLO_CHANNEL_HANDLE_MASK   0xFFFF

Definition at line 677 of file tcp_header_definitions.h.

#define APOLLO_CHANNEL_HANDLE_RES_0   0x0000

Definition at line 683 of file tcp_header_definitions.h.

#define APOLLO_F4_RX_CELL_SIZE   52

Definition at line 687 of file tcp_header_definitions.h.

#define APOLLO_F5_RX_CELL_SIZE   52

Definition at line 688 of file tcp_header_definitions.h.

#define APOLLO_FLAG_CLP_BIT   0

Definition at line 681 of file tcp_header_definitions.h.

#define APOLLO_FLAG_CLP_MASK   0x0001

Definition at line 680 of file tcp_header_definitions.h.

#define APOLLO_IRONBUS_EXT_LESS_PROTO   0xFFFF0FFF

Definition at line 676 of file tcp_header_definitions.h.

#define APOLLO_PKT_TYPE_MASK   0x0038

Definition at line 678 of file tcp_header_definitions.h.

#define APOLLO_PKT_TYPE_SHIFT   3

Definition at line 679 of file tcp_header_definitions.h.

#define APOLLO_RCV_IRON_BUS_EXT_LEN   4

Definition at line 702 of file tcp_header_definitions.h.

#define APOLLO_TX_IRON_BUS_EXT_LEN   8

Definition at line 703 of file tcp_header_definitions.h.

#define ATM_OAM_ACT_DEACT
Value:
0x8 /* OAM Activation/Deactivation
code */

Definition at line 958 of file tcp_header_definitions.h.

#define ATM_OAM_AIS_FUNC   0x0 /* AIS function type */

Definition at line 962 of file tcp_header_definitions.h.

#define ATM_OAM_CC_FUNC   0x4 /* OAM CC FM function code */

Definition at line 964 of file tcp_header_definitions.h.

#define ATM_OAM_F4_ENDTOEND   0x4 /* End-to-End function */

Definition at line 970 of file tcp_header_definitions.h.

#define ATM_OAM_F4_PTI_ZERO   0x0 /* PTI=0 for F4 OAM */

Definition at line 971 of file tcp_header_definitions.h.

#define ATM_OAM_F4_SEGMENT   0x3 /* Segment function */

Definition at line 969 of file tcp_header_definitions.h.

#define ATM_OAM_F5_ENDTOEND   0x5 /* End-to-End function */

Definition at line 968 of file tcp_header_definitions.h.

#define ATM_OAM_F5_SEGMENT   0x4 /* Segment function */

Definition at line 967 of file tcp_header_definitions.h.

#define ATM_OAM_FAULT_MGMT   0x1 /* OAM Fault mgmt. code */

Definition at line 956 of file tcp_header_definitions.h.

#define ATM_OAM_LOOP_FUNC   0x8 /* Loopback function type */

Definition at line 965 of file tcp_header_definitions.h.

#define ATM_OAM_PRFRM_MGMT   0x2 /* performance mgmt code */

Definition at line 957 of file tcp_header_definitions.h.

#define ATM_OAM_RDI_FUNC   0x1 /* RDI function type */

Definition at line 963 of file tcp_header_definitions.h.

#define ATM_OAM_SYSTEM_MGMT   0xF /* System Management code */

Definition at line 960 of file tcp_header_definitions.h.

#define DEFAULT_TTL_HOPLIMIT_VAL   64

Definition at line 1481 of file tcp_header_definitions.h.

#define DOT1P_MAX_COS_VALUE   7

Definition at line 335 of file tcp_header_definitions.h.

#define DOT1P_VLAN_COS_MASK   0xE000

Definition at line 333 of file tcp_header_definitions.h.

#define DOT1P_VLAN_COS_SHIFT   13

Definition at line 334 of file tcp_header_definitions.h.

#define DOT1Q_ARPA_INDEX   DOT1Q_VLAN_ID_RES_0

Definition at line 323 of file tcp_header_definitions.h.

#define DOT1Q_HDR_LEN   18

Definition at line 319 of file tcp_header_definitions.h.

#define DOT1Q_VLAN_ID_MASK   0x0FFF

Definition at line 320 of file tcp_header_definitions.h.

#define DOT1Q_VLAN_ID_RES_0   0x0000

Definition at line 321 of file tcp_header_definitions.h.

#define DOT1Q_VLAN_ID_RES_4095   0x0FFF

Definition at line 322 of file tcp_header_definitions.h.

#define EGP_PROT   8

Definition at line 1178 of file tcp_header_definitions.h.

#define EONIP_PROT   80

Definition at line 1193 of file tcp_header_definitions.h.

#define ESP_PROT   50

Definition at line 1186 of file tcp_header_definitions.h.

#define ETH_BPDU_CONTROL   0x03

Definition at line 247 of file tcp_header_definitions.h.

#define ETH_BPDU_DSAP   0x42

Definition at line 245 of file tcp_header_definitions.h.

#define ETH_BPDU_MATCH   0x424203

Definition at line 248 of file tcp_header_definitions.h.

#define ETH_BPDU_SSAP   0x42

Definition at line 246 of file tcp_header_definitions.h.

#define ETH_PPPOE_ARPA_HDR_LEN   sizeof(ethernet_pppoe_arpa_hdr_type)

Definition at line 309 of file tcp_header_definitions.h.

#define ETH_PPPOE_QINQ_HDR_LEN   sizeof(ethernet_pppoe_qinq_hdr_type)

Definition at line 311 of file tcp_header_definitions.h.

#define ETH_PPPOE_VLAN_HDR_LEN   sizeof(ethernet_pppoe_vlan_hdr_type)

Definition at line 310 of file tcp_header_definitions.h.

#define ETHERNET_ARPA_HDR_LEN   14

Definition at line 185 of file tcp_header_definitions.h.

#define ETHERNET_TYPE_FIELD_SIZE   2

Definition at line 186 of file tcp_header_definitions.h.

#define FR_ADDR_LEN   2

Definition at line 366 of file tcp_header_definitions.h.

#define FR_ARP_CONTROL   0x03

Definition at line 378 of file tcp_header_definitions.h.

#define FR_ARP_CONTROL_PAD   0x0300

Definition at line 388 of file tcp_header_definitions.h.

#define FR_ARP_NLPID   0x80

Definition at line 380 of file tcp_header_definitions.h.

#define FR_ARP_NLPID_OUI   0x80000000

Definition at line 389 of file tcp_header_definitions.h.

#define FR_ARP_OUI_0   0x00

Definition at line 381 of file tcp_header_definitions.h.

#define FR_ARP_OUI_1   0x00

Definition at line 382 of file tcp_header_definitions.h.

#define FR_ARP_OUI_2   0x00

Definition at line 383 of file tcp_header_definitions.h.

#define FR_ARP_PAD   0x00

Definition at line 379 of file tcp_header_definitions.h.

#define FR_CTL_NLPID_LEN   2

Definition at line 367 of file tcp_header_definitions.h.

#define FR_DLCI_LOWER_MASK   0x00F0

Definition at line 394 of file tcp_header_definitions.h.

#define FR_DLCI_LOWER_SHIFT   4

Definition at line 395 of file tcp_header_definitions.h.

#define FR_DLCI_LS_BIT   4

Definition at line 464 of file tcp_header_definitions.h.

#define FR_DLCI_TO_HDR_LOWER_MASK   0xf

Definition at line 426 of file tcp_header_definitions.h.

#define FR_DLCI_TO_HDR_LOWER_SHIFT   4

Definition at line 427 of file tcp_header_definitions.h.

#define FR_DLCI_TO_HDR_UPPER_MASK   0x3f0

Definition at line 424 of file tcp_header_definitions.h.

#define FR_DLCI_TO_HDR_UPPER_SHIFT   (10-4)

Definition at line 425 of file tcp_header_definitions.h.

#define FR_DLCI_UPPER_MASK   0xFC00

Definition at line 392 of file tcp_header_definitions.h.

#define FR_DLCI_UPPER_SHIFT   6

Definition at line 393 of file tcp_header_definitions.h.

#define FR_EA1_MASK   0x0001

Definition at line 456 of file tcp_header_definitions.h.

#define FR_EA1_MASK_BIT   0

Definition at line 457 of file tcp_header_definitions.h.

#define FR_FECN_BECN_DE   7

Definition at line 450 of file tcp_header_definitions.h.

#define FR_FECN_BECN_DE_MASK   0x000E

Definition at line 452 of file tcp_header_definitions.h.

#define FR_FECN_BECN_DE_SHIFT   1

Definition at line 453 of file tcp_header_definitions.h.

#define FR_FECN_BECN_NOT   6

Definition at line 449 of file tcp_header_definitions.h.

#define FR_FECN_NOT_DE   5

Definition at line 448 of file tcp_header_definitions.h.

#define FR_FECN_NOT_NOT   4

Definition at line 447 of file tcp_header_definitions.h.

#define FR_HDR_LEN   (FR_ADDR_LEN+FR_CTL_NLPID_LEN)

Definition at line 368 of file tcp_header_definitions.h.

#define FR_LMI_DLCI_CISCO   1023

Definition at line 440 of file tcp_header_definitions.h.

#define FR_LMI_DLCI_IETF   0

Definition at line 441 of file tcp_header_definitions.h.

#define FR_NLPID_OUI_LEN   4

Definition at line 387 of file tcp_header_definitions.h.

#define FR_NOT_BECN_DE   3

Definition at line 446 of file tcp_header_definitions.h.

#define FR_NOT_BECN_NOT   2

Definition at line 445 of file tcp_header_definitions.h.

#define FR_NOT_NOT_DE   1

Definition at line 444 of file tcp_header_definitions.h.

#define FR_NOT_NOT_NOT   0

Definition at line 443 of file tcp_header_definitions.h.

#define FRF12_BEGIN_END_MASK   (FRF12_BEGIN_MASK|FRF12_END_MASK)

Definition at line 520 of file tcp_header_definitions.h.

#define FRF12_BEGIN_END_MASK_BYTE   0xC0

Definition at line 526 of file tcp_header_definitions.h.

#define FRF12_BEGIN_END_SHIFT   8

Definition at line 521 of file tcp_header_definitions.h.

#define FRF12_BEGIN_MASK   0x8000

Definition at line 518 of file tcp_header_definitions.h.

#define FRF12_END_MASK   0x4000

Definition at line 519 of file tcp_header_definitions.h.

#define FRF12_FRAG_HDR_LEN   sizeof(frf12_hdr_type)

Definition at line 516 of file tcp_header_definitions.h.

#define FRF12_SEQ_NUM_HI_MASK   0x1E00

Definition at line 523 of file tcp_header_definitions.h.

#define FRF12_SEQ_NUM_HI_SHIFT   1

Definition at line 524 of file tcp_header_definitions.h.

#define FRF12_SEQ_NUM_LO_MASK   0x00FF

Definition at line 525 of file tcp_header_definitions.h.

#define FST_DLSW_PROT   91

Definition at line 1198 of file tcp_header_definitions.h.

#define FST_RSRB_PROT   90

Definition at line 1197 of file tcp_header_definitions.h.

#define FTP_PORT   21 /* For control connection */

Definition at line 1206 of file tcp_header_definitions.h.

#define GGP_PROT   3

Definition at line 1175 of file tcp_header_definitions.h.

#define GRE_PROT   47

Definition at line 1185 of file tcp_header_definitions.h.

#define HDLC_ADDR_CMD   0x0F00

Definition at line 70 of file tcp_header_definitions.h.

#define HDLC_BROADCAST_BIT   31

Definition at line 72 of file tcp_header_definitions.h.

#define HDLC_CDP   (HDLC_ADDR_CMD<<16|TYPE_CDP)

Definition at line 76 of file tcp_header_definitions.h.

#define HDLC_CLNS   (HDLC_ADDR_CMD<<16|TYPE_CLNS)

Definition at line 75 of file tcp_header_definitions.h.

#define HDLC_HDR_LEN   4

Definition at line 71 of file tcp_header_definitions.h.

#define HDLC_IP   (HDLC_ADDR_CMD<<16|TYPE_IP)

Definition at line 78 of file tcp_header_definitions.h.

#define HDLC_IP_V6   (HDLC_ADDR_CMD<<16|TYPE_IP_V6)

Definition at line 79 of file tcp_header_definitions.h.

#define HDLC_KEEPALIVE_CMD   (HDLC_ADDR_CMD<<16|TYPE_KEEP)

Definition at line 80 of file tcp_header_definitions.h.

#define HDLC_MPLS   (HDLC_ADDR_CMD<<16|TYPE_MPLS)

Definition at line 77 of file tcp_header_definitions.h.

#define HELLO_PROT   63

Definition at line 1191 of file tcp_header_definitions.h.

#define HMP_PROT   20

Definition at line 1181 of file tcp_header_definitions.h.

#define ICMP_ECHO_REPLY_CODE   0

Definition at line 1480 of file tcp_header_definitions.h.

#define ICMP_PROT   1

Definition at line 1173 of file tcp_header_definitions.h.

#define ICMPV4_ADDR_MASK_REPLY   18

Definition at line 1435 of file tcp_header_definitions.h.

#define ICMPV4_ADDR_MASK_REQUEST   17

Definition at line 1434 of file tcp_header_definitions.h.

#define ICMPV4_ADMIN_PROH_10   10 /* Code: Administratively Prohibited */

Definition at line 1415 of file tcp_header_definitions.h.

#define ICMPV4_ADMIN_PROH_9   9 /* Code: Administratively Prohibited */

Definition at line 1414 of file tcp_header_definitions.h.

#define ICMPV4_CONVERSION_ERROR   31

Definition at line 1427 of file tcp_header_definitions.h.

#define ICMPV4_ECHO   8 /* Type: echo request */

Definition at line 1398 of file tcp_header_definitions.h.

#define ICMPV4_ECHOREPLY   0 /* Type: echo reply */

Definition at line 1397 of file tcp_header_definitions.h.

#define ICMPV4_HDR_SIZE   (sizeof(icmp_v4_t))

Definition at line 1396 of file tcp_header_definitions.h.

#define ICMPV4_INFO_REPLY   16

Definition at line 1433 of file tcp_header_definitions.h.

#define ICMPV4_INFO_REQUEST   15

Definition at line 1432 of file tcp_header_definitions.h.

#define ICMPV4_MISSING_OPTION_CODE   1 /* Code: Mission option */

Definition at line 1424 of file tcp_header_definitions.h.

#define ICMPV4_NO_ROUTE_DESTN_11   11 /* Code: No Route to Destn */

Definition at line 1411 of file tcp_header_definitions.h.

#define ICMPV4_NO_ROUTE_DESTN_12   12 /* Code: No Route to Destn */

Definition at line 1412 of file tcp_header_definitions.h.

#define ICMPV4_NO_ROUTE_DESTN_8   8 /* Code: No Route to Destn */

Definition at line 1410 of file tcp_header_definitions.h.

#define ICMPV4_PARAM_BAD_LEN   2 /* Code: Bad Length */

Definition at line 1425 of file tcp_header_definitions.h.

#define ICMPV4_PARAM_ERROR   0 /* Code: Pointer to Error */

Definition at line 1423 of file tcp_header_definitions.h.

#define ICMPV4_PARAMETER_PROBLEM   12 /* Type: Parameter Problem */

Definition at line 1422 of file tcp_header_definitions.h.

#define ICMPV4_PREC_CUTOFF   15 /* Code: Precedence Cutoff */

Definition at line 1416 of file tcp_header_definitions.h.

#define ICMPV4_REDIRECT   5

Definition at line 1429 of file tcp_header_definitions.h.

#define ICMPV4_SOURCE_QUENCH   4

Definition at line 1428 of file tcp_header_definitions.h.

#define ICMPV4_SOURCEROUTE_FAILED   5 /* Code: administratively prohib. */

Definition at line 1407 of file tcp_header_definitions.h.

#define ICMPV4_SRC_ROUTE_FAIL   5 /* Code: Source Route Failed */

Definition at line 1409 of file tcp_header_definitions.h.

#define ICMPV4_TIMEEXCEEDED   11 /* Type: time exceeded */

Definition at line 1419 of file tcp_header_definitions.h.

#define ICMPV4_TIMESTAMP   13

Definition at line 1430 of file tcp_header_definitions.h.

#define ICMPV4_TIMESTAMP_REPLY   14

Definition at line 1431 of file tcp_header_definitions.h.

#define ICMPV4_TIMTTL   0 /* Code: ttl in transit code */

Definition at line 1420 of file tcp_header_definitions.h.

#define ICMPV4_UNRADMIN   13 /* Code: administratively prohib. */

Definition at line 1406 of file tcp_header_definitions.h.

#define ICMPV4_UNREACHABLE   3 /* Type: destination unreachable */

Definition at line 1400 of file tcp_header_definitions.h.

#define ICMPV4_UNRFRAG   4 /* Code: frag req DF set */

Definition at line 1405 of file tcp_header_definitions.h.

#define ICMPV4_UNRHOST   1 /* Code: host unreachable */

Definition at line 1402 of file tcp_header_definitions.h.

#define ICMPV4_UNRNET   0 /* Code: Net unreachable */

Definition at line 1401 of file tcp_header_definitions.h.

#define ICMPV4_UNRPORT   3 /* Code: port unreachable */

Definition at line 1404 of file tcp_header_definitions.h.

#define ICMPV4_UNRPROT   2 /* Code: protocol unreachable */

Definition at line 1403 of file tcp_header_definitions.h.

#define ICMPV6_ADM_PROH   1 /* Code: Adminitrative Prohibited */

Definition at line 1469 of file tcp_header_definitions.h.

#define ICMPV6_ECHO   128

Definition at line 1454 of file tcp_header_definitions.h.

#define ICMPV6_ECHO_REPLY   129

Definition at line 1455 of file tcp_header_definitions.h.

#define ICMPV6_ERR_SIZE   48

Definition at line 1464 of file tcp_header_definitions.h.

#define ICMPV6_HDR_SIZE   (sizeof(icmp_v6_t) +sizeof(u32))

Definition at line 1465 of file tcp_header_definitions.h.

#define ICMPV6_NEIGHBOR_ADVT   136

Definition at line 1462 of file tcp_header_definitions.h.

#define ICMPV6_NEIGHBOR_SOLICITAION   135

Definition at line 1461 of file tcp_header_definitions.h.

#define ICMPV6_PARAM_CODE   0 /* Code: For Parameter Problem */

Definition at line 1477 of file tcp_header_definitions.h.

#define ICMPV6_PARAMETER_PROBLEM   4

Definition at line 1459 of file tcp_header_definitions.h.

#define ICMPV6_PKT_TOO_BIG   2

Definition at line 1456 of file tcp_header_definitions.h.

#define ICMPV6_PTB_CODE   0 /* Code: For PTB */

Definition at line 1476 of file tcp_header_definitions.h.

#define ICMPV6_SRC_ADD_FAIL   5 /* Code: For Source address failed */

Definition at line 1479 of file tcp_header_definitions.h.

#define ICMPV6_SRC_ADD_SCOPE   2 /* Code: Source Address beyond scope */

Definition at line 1470 of file tcp_header_definitions.h.

#define ICMPV6_TIMEEXCEEDED   3

Definition at line 1457 of file tcp_header_definitions.h.

#define ICMPV6_TIMTTL   0

Definition at line 1458 of file tcp_header_definitions.h.

#define ICMPV6_UNRDESTN   0 /* Code: No route to Desnt */

Definition at line 1468 of file tcp_header_definitions.h.

#define ICMPV6_UNREACHABLE   1

Definition at line 1460 of file tcp_header_definitions.h.

#define ICMPV6_UNREC_HDR   1 /* Code: For Parameter Problem */

Definition at line 1478 of file tcp_header_definitions.h.

#define ICMPV6_UNRHOST   3 /* Code: Host Unreachable */

Definition at line 1471 of file tcp_header_definitions.h.

#define ICMPV6_UNRPORT   4 /* Code: Port UnReachable */

Definition at line 1472 of file tcp_header_definitions.h.

#define ICMPV6_UNRPROT   1 /* type 4 - Code: No route to Desnt */

Definition at line 1474 of file tcp_header_definitions.h.

#define IGMP_PROT   2

Definition at line 1174 of file tcp_header_definitions.h.

#define IGRP_PROT   9

Definition at line 1179 of file tcp_header_definitions.h.

#define IN_ATM_ARP_BIT   0x0008

Definition at line 53 of file tcp_header_definitions.h.

#define IP_BOOTP_SOURCE_ADDRESS   0

Definition at line 1051 of file tcp_header_definitions.h.

#define IP_DSCP_SHIFT   2 /* shift value up to dscp bits */

Definition at line 1069 of file tcp_header_definitions.h.

#define IP_FRAG_DF_BIT   14

Definition at line 1125 of file tcp_header_definitions.h.

#define IP_FRAG_DF_MASK   0x4000

Definition at line 1119 of file tcp_header_definitions.h.

#define IP_FRAG_MORE_BIT   13

Definition at line 1124 of file tcp_header_definitions.h.

#define IP_FRAG_MORE_MASK   0x2000

Definition at line 1118 of file tcp_header_definitions.h.

#define IP_FRAG_NO_DF_SET   0x0000

Definition at line 1121 of file tcp_header_definitions.h.

#define IP_FRAG_OFFSET_MASK   0x1fff

Definition at line 1115 of file tcp_header_definitions.h.

#define IP_FRAG_UNDEF_BIT   15

Definition at line 1126 of file tcp_header_definitions.h.

#define IP_FRAG_UNDEF_MASK   0x8000

Definition at line 1120 of file tcp_header_definitions.h.

#define IP_HDR_LEN   sizeof(ipv4_header)

Definition at line 1043 of file tcp_header_definitions.h.

#define IP_LEN_MASK   0x0f

Definition at line 1062 of file tcp_header_definitions.h.

#define IP_LIMITED_BROADCAST_ADDRESS   0xFFFFFFFF

Definition at line 1053 of file tcp_header_definitions.h.

#define IP_MIN_LEN   0x5

Definition at line 1060 of file tcp_header_definitions.h.

#define IP_PRECEDENCE_SHIFT   5 /* shift value up to precedence bits */

Definition at line 1068 of file tcp_header_definitions.h.

#define IP_TOS_DSCP   0xfc /* mask for dscp in tos byte */

Definition at line 1080 of file tcp_header_definitions.h.

#define IP_TOS_HIGH_RELY   2

Definition at line 1075 of file tcp_header_definitions.h.

#define IP_TOS_HIGH_TPUT   4 /* before using */

Definition at line 1074 of file tcp_header_definitions.h.

#define IP_TOS_LOW_COST   1

Definition at line 1076 of file tcp_header_definitions.h.

#define IP_TOS_LOW_DELAY   8 /* values must be shifted 1 bit */

Definition at line 1073 of file tcp_header_definitions.h.

#define IP_TOS_MASK   0x1e /* mask of tos in tos byte */

Definition at line 1078 of file tcp_header_definitions.h.

#define IP_TOS_MBZ_MASK   0x01 /* mask for MZB bit in tos byte */

Definition at line 1079 of file tcp_header_definitions.h.

#define IP_TOS_METRIC_TYPES   8

Definition at line 1083 of file tcp_header_definitions.h.

#define IP_TOS_NO_DSCP   0x03

Definition at line 1081 of file tcp_header_definitions.h.

#define IP_TOS_NO_PRECEDENCE   0x1f

Definition at line 1072 of file tcp_header_definitions.h.

#define IP_TOS_NORMAL   0

Definition at line 1077 of file tcp_header_definitions.h.

#define IP_TOS_PRECEDENCE   0xe0 /* mask of precedence in tos byte */

Definition at line 1071 of file tcp_header_definitions.h.

#define IP_TOS_PRECEDENCE_MASK   (IP_TOS_PRECEDENCE | IP_TOS_MASK)

Definition at line 1086 of file tcp_header_definitions.h.

#define IP_TOS_SHIFT   1

Definition at line 1084 of file tcp_header_definitions.h.

#define IP_VER   0x4

Definition at line 1059 of file tcp_header_definitions.h.

#define IP_VER_LEN   0x45

Definition at line 1058 of file tcp_header_definitions.h.

#define IP_VER_MASK   0xf0

Definition at line 1061 of file tcp_header_definitions.h.

#define IPINIP_PROT   4

Definition at line 1176 of file tcp_header_definitions.h.

#define IPV4_FRAG_MF_MASK   (0x2000)

Definition at line 1047 of file tcp_header_definitions.h.

#define IPV4_FRAG_MF_SHIFT   (13)

Definition at line 1048 of file tcp_header_definitions.h.

#define IPV4_FRAG_OFFSET_MASK   (0x1fff)

Definition at line 1046 of file tcp_header_definitions.h.

#define IPV4_HEADER_LENGTH_WORDS   5

Definition at line 1041 of file tcp_header_definitions.h.

#define IPV4_HEADER_LENGTH_WORDS   5

Definition at line 1041 of file tcp_header_definitions.h.

#define IPV4_MIN_HEADER_LENGTH_BYTES   20

Definition at line 1042 of file tcp_header_definitions.h.

#define IPV4_NO_OPTIONS_HDR_LEN   (sizeof(ipv4_header))

Definition at line 1037 of file tcp_header_definitions.h.

#define IPV4_VERSION   4

Definition at line 1038 of file tcp_header_definitions.h.

#define IPV4_VERSION_HDR_LEN_FIELD   ((u8) 0x45)

Definition at line 1040 of file tcp_header_definitions.h.

#define IPV4_VERSION_VALUE_SHIFT   4

Definition at line 1044 of file tcp_header_definitions.h.

#define IPV6_DESTOPT_LEN   (sizeof(ipv6_dest_opt_header_t))

Definition at line 1384 of file tcp_header_definitions.h.

#define IPV6_FLABLE_MASK   0x000FFFFF

Definition at line 1314 of file tcp_header_definitions.h.

#define IPV6_FRAG_HDR_LEN   (sizeof(ipv6_frag_header_t))

Definition at line 1353 of file tcp_header_definitions.h.

#define IPV6_FRAG_MORE_FRAG_MASK   (0x0001)

Definition at line 1357 of file tcp_header_definitions.h.

#define IPV6_FRAG_OFFSET_MASK   (0xFFF8)

Definition at line 1355 of file tcp_header_definitions.h.

#define IPV6_FRAG_OFFSET_SHIFT   (3)

Definition at line 1356 of file tcp_header_definitions.h.

#define IPV6_GET_FLOW_LABEL (   ih)
Value:
((clib_net_to_host_u32((ih) \
->version_trafficclass_flowlabel)) & 0xfffff)

Definition at line 1321 of file tcp_header_definitions.h.

#define IPV6_GET_IP_VER (   ih)
Value:
((clib_net_to_host_u32((ih) \
->version_trafficclass_flowlabel) >> 28) & 0xf)

Definition at line 1317 of file tcp_header_definitions.h.

#define IPV6_GET_TOS (   ih)
Value:
((clib_net_to_host_u32((ih) \
->version_trafficclass_flowlabel) >> 20) & 0xff)

Definition at line 1319 of file tcp_header_definitions.h.

#define IPV6_HDR_LEN   40

Definition at line 1312 of file tcp_header_definitions.h.

#define IPV6_HDR_LEN_WORDS   10

Definition at line 1313 of file tcp_header_definitions.h.

#define IPV6_HOP_LEN   (sizeof(ipv6_hop_header_t))

Definition at line 1377 of file tcp_header_definitions.h.

#define IPV6_INIP_PROT   41

Definition at line 1183 of file tcp_header_definitions.h.

#define IPV6_MIN_PATH_MTU   (1280)

Definition at line 1315 of file tcp_header_definitions.h.

#define IPV6_NEXT_HDR_SHIFT   8

Definition at line 1361 of file tcp_header_definitions.h.

#define IPV6_PROTO_AH   51

Definition at line 1337 of file tcp_header_definitions.h.

#define IPV6_PROTO_DESTOPTS   60

Definition at line 1335 of file tcp_header_definitions.h.

#define IPV6_PROTO_ESP   50

Definition at line 1336 of file tcp_header_definitions.h.

#define IPV6_PROTO_FRAGMENT   44

Definition at line 1334 of file tcp_header_definitions.h.

#define IPV6_PROTO_HOPOPTS   0

Definition at line 1329 of file tcp_header_definitions.h.

#define IPV6_PROTO_ICMPV6   58

Definition at line 1338 of file tcp_header_definitions.h.

#define IPV6_PROTO_IPV6   41

Definition at line 1332 of file tcp_header_definitions.h.

#define IPV6_PROTO_NONE   59

Definition at line 1339 of file tcp_header_definitions.h.

#define IPV6_PROTO_ROUTING   43

Definition at line 1333 of file tcp_header_definitions.h.

#define IPV6_PROTO_TCP   6

Definition at line 1330 of file tcp_header_definitions.h.

#define IPV6_PROTO_UDP   17

Definition at line 1331 of file tcp_header_definitions.h.

#define IPV6_ROUTING_HDR_LEN   (sizeof(ipv6_routing_header_t))

Definition at line 1370 of file tcp_header_definitions.h.

#define IPV6_TOS_SHIFT   20

Definition at line 1359 of file tcp_header_definitions.h.

#define IPV6_TOS_SHIFT_HLF_WD   4

Definition at line 1360 of file tcp_header_definitions.h.

#define IPV6_TRAFFIC_CLASS_VALUE_MASK   (0xff)

Definition at line 1327 of file tcp_header_definitions.h.

#define IPV6_TRAFFIC_CLASS_VALUE_SHIFT   (20)

Definition at line 1326 of file tcp_header_definitions.h.

#define IPV6_VERSION_VALUE   (6)

Definition at line 1324 of file tcp_header_definitions.h.

#define IPV6_VERSION_VALUE_SHIFT   (28)

Definition at line 1325 of file tcp_header_definitions.h.

#define LLC_SNAP_HDR_CONTROL   0x03

Definition at line 813 of file tcp_header_definitions.h.

#define LLC_SNAP_HDR_CONTROL_OUI   0x03000000

Definition at line 821 of file tcp_header_definitions.h.

#define LLC_SNAP_HDR_DSAP   0xAA

Definition at line 811 of file tcp_header_definitions.h.

#define LLC_SNAP_HDR_DSAP_SSAP   0xAAAA

Definition at line 819 of file tcp_header_definitions.h.

#define LLC_SNAP_HDR_DSAP_SSAP_CTRL_OUI0   0xAAAA0300

Definition at line 820 of file tcp_header_definitions.h.

#define LLC_SNAP_HDR_OUI1_OUI2_CDP   0x000C2000

Definition at line 822 of file tcp_header_definitions.h.

#define LLC_SNAP_HDR_OUI_0   0x00

Definition at line 814 of file tcp_header_definitions.h.

#define LLC_SNAP_HDR_OUI_1   0x00

Definition at line 815 of file tcp_header_definitions.h.

#define LLC_SNAP_HDR_OUI_2   0x00

Definition at line 816 of file tcp_header_definitions.h.

#define LLC_SNAP_HDR_OUI_2_CDP   0x0C

Definition at line 817 of file tcp_header_definitions.h.

#define LLC_SNAP_HDR_SSAP   0xAA

Definition at line 812 of file tcp_header_definitions.h.

#define LLCSNAP_PID_DOT3_NOFCS   0x0007

Definition at line 800 of file tcp_header_definitions.h.

#define LOOSE_SOURCE_ROUTE   131

Definition at line 1035 of file tcp_header_definitions.h.

#define MAX_ETHERNET_PKT_LEN   1500

Definition at line 184 of file tcp_header_definitions.h.

#define MAX_MPLS_LABEL_STACK   6

Definition at line 880 of file tcp_header_definitions.h.

#define MAX_PROT   113

Definition at line 1203 of file tcp_header_definitions.h.

#define MAXTCPOPTIONBYTES   40
#define MIN_ETHERNET_PKT_LEN   60

Definition at line 183 of file tcp_header_definitions.h.

#define MINTCPOPTIONLENGTH   2
#define MLFR_BEGIN_END_MASK   (MLFR_BEGIN_MASK|MLFR_END_MASK)

Definition at line 493 of file tcp_header_definitions.h.

#define MLFR_BEGIN_END_MASK_BYTE   0xC0

Definition at line 503 of file tcp_header_definitions.h.

#define MLFR_BEGIN_END_SHIFT   14

Definition at line 494 of file tcp_header_definitions.h.

#define MLFR_BEGIN_MASK   0x8000

Definition at line 491 of file tcp_header_definitions.h.

#define MLFR_END_MASK   0x4000

Definition at line 492 of file tcp_header_definitions.h.

#define MLFR_FRAG_HDR_LEN   2

Definition at line 489 of file tcp_header_definitions.h.

#define MLFR_LIP_FRAME   0xE100

Definition at line 487 of file tcp_header_definitions.h.

#define MLFR_LIP_MASK   0xE000

Definition at line 488 of file tcp_header_definitions.h.

#define MLFR_SEQ_NUM_HI_MASK   0x1E00

Definition at line 496 of file tcp_header_definitions.h.

#define MLFR_SEQ_NUM_HI_SHIFT   1

Definition at line 497 of file tcp_header_definitions.h.

#define MLFR_SEQ_NUM_LO_MASK   0x00FF

Definition at line 498 of file tcp_header_definitions.h.

#define MLPOA_BEGIN_END_SHIFT   24

Definition at line 146 of file tcp_header_definitions.h.

#define MLPOA_CISCO_HDR   0xFF03

Definition at line 708 of file tcp_header_definitions.h.

#define MLPOA_CISCO_HDR_LEN   2

Definition at line 710 of file tcp_header_definitions.h.

#define MLPOA_SNAP_HDR_LEN   4

Definition at line 709 of file tcp_header_definitions.h.

#define MLPPP_BEGIN_BIT   7

Definition at line 141 of file tcp_header_definitions.h.

#define MLPPP_BEGIN_END_MASK   (MLPPP_BEGIN_MASK|MLPPP_END_MASK)

Definition at line 126 of file tcp_header_definitions.h.

#define MLPPP_BEGIN_END_MASK_BYTE   0xC0

Definition at line 140 of file tcp_header_definitions.h.

#define MLPPP_BEGIN_END_SHIFT   30

Definition at line 127 of file tcp_header_definitions.h.

#define MLPPP_BEGIN_MASK   0x80000000

Definition at line 124 of file tcp_header_definitions.h.

#define MLPPP_END_BIT   6

Definition at line 142 of file tcp_header_definitions.h.

#define MLPPP_END_MASK   0x40000000

Definition at line 125 of file tcp_header_definitions.h.

#define MLPPP_FLAGS_FIELD_LEN   4

Definition at line 123 of file tcp_header_definitions.h.

#define MLPPP_MC_CLASS_ID_MASK   0x3C000000

Definition at line 129 of file tcp_header_definitions.h.

#define MLPPP_MC_CLASS_ID_MASK_BYTE   0x3C

Definition at line 143 of file tcp_header_definitions.h.

#define MLPPP_MC_CLASS_ID_SHIFT_BYTE   2

Definition at line 144 of file tcp_header_definitions.h.

#define MLPPP_MC_CLASS_SHIFT   26

Definition at line 130 of file tcp_header_definitions.h.

#define MLPPP_SEQUENCE_NUM_MASK   0x00FFFFFF

Definition at line 128 of file tcp_header_definitions.h.

#define MPLS_EOS_BIT   0x00000100

Definition at line 877 of file tcp_header_definitions.h.

#define MPLS_EOS_SHIFT   8

Definition at line 878 of file tcp_header_definitions.h.

#define MPLS_EXP_MASK   0x00000e00

Definition at line 884 of file tcp_header_definitions.h.

#define MPLS_EXP_SHIFT   9

Definition at line 885 of file tcp_header_definitions.h.

#define MPLS_EXP_TTL_MASK   0x00000eff

Definition at line 886 of file tcp_header_definitions.h.

#define MPLS_LABEL_MASK   0xfffff000

Definition at line 881 of file tcp_header_definitions.h.

#define MPLS_LABEL_SHIFT   12

Definition at line 882 of file tcp_header_definitions.h.

#define MPLS_LABEL_SIZE   4

Definition at line 879 of file tcp_header_definitions.h.

#define MPLS_TTL_MASK   0x000000ff

Definition at line 883 of file tcp_header_definitions.h.

#define ND_PROT   77

Definition at line 1192 of file tcp_header_definitions.h.

#define NEWIGRP_PROT   88

Definition at line 1195 of file tcp_header_definitions.h.

#define NHRP_PROT   54

Definition at line 1189 of file tcp_header_definitions.h.

#define NOSIP_PROT   94

Definition at line 1199 of file tcp_header_definitions.h.

#define OSPF_PROT   89

Definition at line 1196 of file tcp_header_definitions.h.

#define PCP_PROT   108

Definition at line 1201 of file tcp_header_definitions.h.

#define PGM_PROT   113

Definition at line 1202 of file tcp_header_definitions.h.

#define PIM_PROT   103

Definition at line 1200 of file tcp_header_definitions.h.

#define PPP_CONTROL_PROTOCOL_BIT   15

Definition at line 99 of file tcp_header_definitions.h.

#define PPP_CONTROL_PROTOCOL_MASK   0x8000

Definition at line 98 of file tcp_header_definitions.h.

#define PPP_CSCO_LEN   4

Definition at line 100 of file tcp_header_definitions.h.

#define PPP_ENDPROTO   0x01

Definition at line 96 of file tcp_header_definitions.h.

#define PPP_NOT_ENDPROTO   0xfffffffe

Definition at line 97 of file tcp_header_definitions.h.

#define PPP_RFC1661_COMP_LEN   1

Definition at line 102 of file tcp_header_definitions.h.

#define PPP_RFC1661_LEN   2

Definition at line 101 of file tcp_header_definitions.h.

#define PPP_STATION   0xFF03

Definition at line 94 of file tcp_header_definitions.h.

#define PPP_STATION_LEN   0x2

Definition at line 95 of file tcp_header_definitions.h.

#define PPPOA_MUX_HDR_LEN   sizeof(apollo_atm_aal5_mux_pppoa_hdr_type)

Definition at line 793 of file tcp_header_definitions.h.

#define PPPOA_SNAPLLC_HDR_LEN   sizeof(apollo_atm_aal5_llcsnap_pppoa_hdr_type)

Definition at line 792 of file tcp_header_definitions.h.

#define PPPOE_HDR_LEN   6

Definition at line 312 of file tcp_header_definitions.h.

#define PPPOE_SNAPLLC_HDR_LEN   sizeof(apollo_atm_aal5_llcsnap_pppoe_hdr_type)

Definition at line 794 of file tcp_header_definitions.h.

#define PS_IP_TOS_MASK   0xff

Definition at line 1067 of file tcp_header_definitions.h.

#define QINQ_HDR_LEN   22

Definition at line 328 of file tcp_header_definitions.h.

#define RBE_SNAPLLC_HDR_LEN   sizeof(apollo_atm_aal5_llcsnap_rbe_hdr_type)

Definition at line 795 of file tcp_header_definitions.h.

#define RDP_PROT   27

Definition at line 1182 of file tcp_header_definitions.h.

#define RSVP_PROT   46

Definition at line 1184 of file tcp_header_definitions.h.

#define SDNS0_PROT   53

Definition at line 1188 of file tcp_header_definitions.h.

#define SDNS1_PROT   55

Definition at line 1190 of file tcp_header_definitions.h.

#define SRP_FALSE   0

Definition at line 872 of file tcp_header_definitions.h.

#define SRP_HDR_LEN   16

Definition at line 844 of file tcp_header_definitions.h.

#define SRP_IB_CHANNEL_CONTROL   0x0000

Definition at line 846 of file tcp_header_definitions.h.

#define SRP_IB_CHANNEL_DATA_HI   0x0001

Definition at line 847 of file tcp_header_definitions.h.

#define SRP_IB_CHANNEL_DATA_LO   0x0002

Definition at line 848 of file tcp_header_definitions.h.

#define SRP_INV_PRIORITY_BITS_MASK   0xFFF1

Definition at line 865 of file tcp_header_definitions.h.

#define SRP_MODE_BITS_MASK   0x0070

Definition at line 853 of file tcp_header_definitions.h.

#define SRP_MODE_BITS_SHIFT   4

Definition at line 854 of file tcp_header_definitions.h.

#define SRP_MODE_CONTROL_IPS   5

Definition at line 856 of file tcp_header_definitions.h.

#define SRP_MODE_CONTROL_TOPOLOGY   4

Definition at line 855 of file tcp_header_definitions.h.

#define SRP_MODE_DATA   7

Definition at line 857 of file tcp_header_definitions.h.

#define SRP_PRIORITY_BITS_MASK   0x000E

Definition at line 859 of file tcp_header_definitions.h.

#define SRP_PRIORITY_BITS_SHIFT   1

Definition at line 860 of file tcp_header_definitions.h.

#define SRP_PRIORITY_HIGH   7

Definition at line 861 of file tcp_header_definitions.h.

#define SRP_PRIORITY_PAK_PRIORITY   6

Definition at line 862 of file tcp_header_definitions.h.

#define SRP_PROT_CONTROL_IPS   0x2007

Definition at line 868 of file tcp_header_definitions.h.

#define SRP_PROT_CONTROL_TOPOLOGY   0x2007

Definition at line 867 of file tcp_header_definitions.h.

#define SRP_RING_ID_BIT   7

Definition at line 851 of file tcp_header_definitions.h.

#define SRP_RING_ID_MASK   0x0080

Definition at line 850 of file tcp_header_definitions.h.

#define SRP_TRUE   1

Definition at line 871 of file tcp_header_definitions.h.

#define STRICT_SOURCE_ROUTE   137

Definition at line 1036 of file tcp_header_definitions.h.

#define TCP_END_OPTIONS_LIST   0

Definition at line 1241 of file tcp_header_definitions.h.

#define TCP_FLAG_ACK   0x10

Definition at line 1227 of file tcp_header_definitions.h.

#define TCP_FLAG_CWR   0x80

Definition at line 1230 of file tcp_header_definitions.h.

#define TCP_FLAG_ECE   0x40

Definition at line 1229 of file tcp_header_definitions.h.

#define TCP_FLAG_FIN   0x01

Definition at line 1223 of file tcp_header_definitions.h.

#define TCP_FLAG_PUSH   0x08

Definition at line 1226 of file tcp_header_definitions.h.

#define TCP_FLAG_RST   0x04

Definition at line 1225 of file tcp_header_definitions.h.

#define TCP_FLAG_SYN   0x02

Definition at line 1224 of file tcp_header_definitions.h.

#define TCP_FLAG_URG   0x20

Definition at line 1228 of file tcp_header_definitions.h.

#define TCP_OPTION_ECHO   6

Definition at line 1247 of file tcp_header_definitions.h.

#define TCP_OPTION_ECHO_REPLY   7

Definition at line 1248 of file tcp_header_definitions.h.

#define TCP_OPTION_MD5_SIGNATURE   19

Definition at line 1262 of file tcp_header_definitions.h.

#define TCP_OPTION_MSS   2

Definition at line 1243 of file tcp_header_definitions.h.

#define TCP_OPTION_NOP   1

Definition at line 1242 of file tcp_header_definitions.h.

#define TCP_OPTION_NUM_MAX   27

Definition at line 1274 of file tcp_header_definitions.h.

#define TCP_OPTION_QUICK_START   27

Definition at line 1272 of file tcp_header_definitions.h.

#define TCP_OPTION_SACK_DATA   5

Definition at line 1246 of file tcp_header_definitions.h.

#define TCP_OPTION_SACK_PERMITTED   4

Definition at line 1245 of file tcp_header_definitions.h.

#define TCP_OPTION_TSOPT   8

Definition at line 1249 of file tcp_header_definitions.h.

#define TCP_OPTION_WINDOW_SCALE   3

Definition at line 1244 of file tcp_header_definitions.h.

#define tcp_printf (   format_str,
  params... 
)    printf(format_str, ## params)

Definition at line 1279 of file tcp_header_definitions.h.

#define TCP_PROT   6

Definition at line 1177 of file tcp_header_definitions.h.

#define TOS_PREC_CRIT_ECP   0xa0

Definition at line 1093 of file tcp_header_definitions.h.

#define TOS_PREC_CRIT_ECP_NUM   5

Definition at line 1103 of file tcp_header_definitions.h.

#define TOS_PREC_FLASH   0x60

Definition at line 1095 of file tcp_header_definitions.h.

#define TOS_PREC_FLASH_NUM   3

Definition at line 1105 of file tcp_header_definitions.h.

#define TOS_PREC_FLASH_OVER   0x80

Definition at line 1094 of file tcp_header_definitions.h.

#define TOS_PREC_FLASH_OVER_NUM   4

Definition at line 1104 of file tcp_header_definitions.h.

#define TOS_PREC_ILLEGAL   0xff /* invalid precedence value */

Definition at line 1099 of file tcp_header_definitions.h.

#define TOS_PREC_IMMEDIATE   0x40

Definition at line 1096 of file tcp_header_definitions.h.

#define TOS_PREC_IMMEDIATE_NUM   2

Definition at line 1106 of file tcp_header_definitions.h.

#define TOS_PREC_INET_CONTROL   0xc0

Definition at line 1092 of file tcp_header_definitions.h.

#define TOS_PREC_INET_CONTROL_NUM   6

Definition at line 1102 of file tcp_header_definitions.h.

#define TOS_PREC_NET_CONTROL   0xe0

Definition at line 1091 of file tcp_header_definitions.h.

#define TOS_PREC_NET_CONTROL_NUM   7

Definition at line 1101 of file tcp_header_definitions.h.

#define TOS_PREC_PRIORITY   0x20

Definition at line 1097 of file tcp_header_definitions.h.

#define TOS_PREC_PRIORITY_NUM   1

Definition at line 1107 of file tcp_header_definitions.h.

#define TOS_PREC_ROUTINE   0x00

Definition at line 1098 of file tcp_header_definitions.h.

#define TOS_PREC_ROUTINE_NUM   0

Definition at line 1108 of file tcp_header_definitions.h.

#define TTL_1   1

Definition at line 1132 of file tcp_header_definitions.h.

#define TTL_2   2

Definition at line 1133 of file tcp_header_definitions.h.

#define TTL_255   255

Definition at line 1134 of file tcp_header_definitions.h.

#define TTL_DEFAULT   255

Definition at line 1131 of file tcp_header_definitions.h.

#define TYPE_ARP   0x0806

Definition at line 39 of file tcp_header_definitions.h.

#define TYPE_CDP   0x2000

Definition at line 42 of file tcp_header_definitions.h.

#define TYPE_CGMP   0x2001

Definition at line 43 of file tcp_header_definitions.h.

#define TYPE_CLNS   0xFEFE

Definition at line 45 of file tcp_header_definitions.h.

#define TYPE_DOT1Q   0x8100

Definition at line 318 of file tcp_header_definitions.h.

#define TYPE_FR_CISCO_IP   0x0800

Definition at line 431 of file tcp_header_definitions.h.

#define TYPE_FR_CISCO_IP_V6   0x86DD

Definition at line 432 of file tcp_header_definitions.h.

#define TYPE_FR_EEK   0x8037

Definition at line 438 of file tcp_header_definitions.h.

#define TYPE_FR_FRF12   0x03B1

Definition at line 436 of file tcp_header_definitions.h.

#define TYPE_FR_IETF_IP   0x03CC

Definition at line 429 of file tcp_header_definitions.h.

#define TYPE_FR_IETF_IP_V6   0x038E

Definition at line 430 of file tcp_header_definitions.h.

#define TYPE_FR_ISIS   0x0383

Definition at line 433 of file tcp_header_definitions.h.

#define TYPE_FR_MLP   0x03CF

Definition at line 437 of file tcp_header_definitions.h.

#define TYPE_FR_SNAP0PAD   0x0380

Definition at line 434 of file tcp_header_definitions.h.

#define TYPE_FR_SNAP1PAD   0x0300

Definition at line 435 of file tcp_header_definitions.h.

#define TYPE_IP   0x0800

Definition at line 37 of file tcp_header_definitions.h.

#define TYPE_IP_V6   0x86DD

Definition at line 38 of file tcp_header_definitions.h.

#define TYPE_IPV4   0x0800

Definition at line 1290 of file tcp_header_definitions.h.

#define TYPE_IPV6   0x86dd

Definition at line 1289 of file tcp_header_definitions.h.

#define TYPE_KEEP   0x8035

Definition at line 73 of file tcp_header_definitions.h.

#define TYPE_LACP   0x8808 /* 802.3ad */

Definition at line 44 of file tcp_header_definitions.h.

#define TYPE_MPLS   0x8847

Definition at line 41 of file tcp_header_definitions.h.

#define TYPE_PPP_CDP   0x0207

Definition at line 109 of file tcp_header_definitions.h.

#define TYPE_PPP_CHAP   0xC223

Definition at line 115 of file tcp_header_definitions.h.

#define TYPE_PPP_CLNS   0x0023

Definition at line 108 of file tcp_header_definitions.h.

#define TYPE_PPP_FULL_IP_1   0x21

Definition at line 138 of file tcp_header_definitions.h.

#define TYPE_PPP_FULL_IP_2   0x0021

Definition at line 137 of file tcp_header_definitions.h.

#define TYPE_PPP_FULL_IP_3   0xff0321

Definition at line 136 of file tcp_header_definitions.h.

#define TYPE_PPP_FULL_IP_4   0xff030021

Definition at line 135 of file tcp_header_definitions.h.

#define TYPE_PPP_IP   0x0021

Definition at line 104 of file tcp_header_definitions.h.

#define TYPE_PPP_IP_V6   0x0057

Definition at line 105 of file tcp_header_definitions.h.

#define TYPE_PPP_IPCP   0x8021

Definition at line 111 of file tcp_header_definitions.h.

#define TYPE_PPP_LCP   0xC021

Definition at line 112 of file tcp_header_definitions.h.

#define TYPE_PPP_LCP_ECHO_REQUEST   0x09

Definition at line 118 of file tcp_header_definitions.h.

#define TYPE_PPP_LQR   0xC025

Definition at line 114 of file tcp_header_definitions.h.

#define TYPE_PPP_MPLS_CONTROL   0x8281

Definition at line 107 of file tcp_header_definitions.h.

#define TYPE_PPP_MPLS_UNICAST   0x0281

Definition at line 106 of file tcp_header_definitions.h.

#define TYPE_PPP_MULTILINK   0x003D

Definition at line 132 of file tcp_header_definitions.h.

#define TYPE_PPP_PAP   0xC023

Definition at line 113 of file tcp_header_definitions.h.

#define TYPE_PPPOE_DISCOVERY   0x8863 /* PTA plus */

Definition at line 48 of file tcp_header_definitions.h.

#define TYPE_PPPOE_SESSION   0x8864 /* PTA plus */

Definition at line 47 of file tcp_header_definitions.h.

#define TYPE_QINQ_88A8   0x88A8

Definition at line 327 of file tcp_header_definitions.h.

#define TYPE_QINQ_91   0x9100

Definition at line 325 of file tcp_header_definitions.h.

#define TYPE_QINQ_92   0x9200

Definition at line 326 of file tcp_header_definitions.h.

#define TYPE_RARP   0x8035

Definition at line 40 of file tcp_header_definitions.h.

#define UDP_PROT   17

Definition at line 1180 of file tcp_header_definitions.h.

#define VINES_PROT   83

Definition at line 1194 of file tcp_header_definitions.h.

Typedef Documentation

typedef struct atm_oam_hdr_t_ atm_oam_hdr_t
typedef struct hdlc_hdr_type hdlc_hdr_type
typedef struct icmp_v4_s icmp_v4_t
typedef struct icmp_v6_s icmp_v6_t
typedef struct ipv4_header ipv4_header
typedef struct ipv4_options ipv4_options
typedef struct ipv6_header ipv6_header_t
typedef union _layer2 layer2_t
typedef struct mlfr_hdr_type mlfr_hdr_type
typedef struct srp_hdr_type srp_hdr_type
typedef struct tcp_hdr_type tcp_hdr_type
typedef struct tcp_option_s tcp_option_t
typedef struct udp_hdr_type udp_hdr_type_t

Function Documentation

static u32 crc_calc ( ipv4_header ipv4)
inlinestatic

Definition at line 1557 of file tcp_header_definitions.h.

static u8* tcp_findoption ( tcp_hdr_type tcp,
u8  option 
)
inlinestatic

Definition at line 1516 of file tcp_header_definitions.h.

+ Here is the caller graph for this function: