DPDK  1.7.0-rc0
Data Structures | Macros
rte_ip.h File Reference
#include <stdint.h>

Data Structures

struct  ipv4_hdr
 
struct  ipv6_hdr
 

Macros

#define IPv4(a, b, c, d)
 
#define IPPROTO_IP   0
 
#define IPPROTO_HOPOPTS   0
 
#define IPPROTO_ICMP   1
 
#define IPPROTO_IGMP   2
 
#define IPPROTO_GGP   3
 
#define IPPROTO_IPV4   4
 
#define IPPROTO_TCP   6
 
#define IPPROTO_ST   7
 
#define IPPROTO_EGP   8
 
#define IPPROTO_PIGP   9
 
#define IPPROTO_RCCMON   10
 
#define IPPROTO_NVPII   11
 
#define IPPROTO_PUP   12
 
#define IPPROTO_ARGUS   13
 
#define IPPROTO_EMCON   14
 
#define IPPROTO_XNET   15
 
#define IPPROTO_CHAOS   16
 
#define IPPROTO_UDP   17
 
#define IPPROTO_MUX   18
 
#define IPPROTO_MEAS   19
 
#define IPPROTO_HMP   20
 
#define IPPROTO_PRM   21
 
#define IPPROTO_IDP   22
 
#define IPPROTO_TRUNK1   23
 
#define IPPROTO_TRUNK2   24
 
#define IPPROTO_LEAF1   25
 
#define IPPROTO_LEAF2   26
 
#define IPPROTO_RDP   27
 
#define IPPROTO_IRTP   28
 
#define IPPROTO_TP   29
 
#define IPPROTO_BLT   30
 
#define IPPROTO_NSP   31
 
#define IPPROTO_INP   32
 
#define IPPROTO_SEP   33
 
#define IPPROTO_3PC   34
 
#define IPPROTO_IDPR   35
 
#define IPPROTO_XTP   36
 
#define IPPROTO_DDP   37
 
#define IPPROTO_CMTP   38
 
#define IPPROTO_TPXX   39
 
#define IPPROTO_IL   40
 
#define IPPROTO_IPV6   41
 
#define IPPROTO_SDRP   42
 
#define IPPROTO_ROUTING   43
 
#define IPPROTO_FRAGMENT   44
 
#define IPPROTO_IDRP   45
 
#define IPPROTO_RSVP   46
 
#define IPPROTO_GRE   47
 
#define IPPROTO_MHRP   48
 
#define IPPROTO_BHA   49
 
#define IPPROTO_ESP   50
 
#define IPPROTO_AH   51
 
#define IPPROTO_INLSP   52
 
#define IPPROTO_SWIPE   53
 
#define IPPROTO_NHRP   54
 
#define IPPROTO_ICMPV6   58
 
#define IPPROTO_NONE   59
 
#define IPPROTO_DSTOPTS   60
 
#define IPPROTO_AHIP   61
 
#define IPPROTO_CFTP   62
 
#define IPPROTO_HELLO   63
 
#define IPPROTO_SATEXPAK   64
 
#define IPPROTO_KRYPTOLAN   65
 
#define IPPROTO_RVD   66
 
#define IPPROTO_IPPC   67
 
#define IPPROTO_ADFS   68
 
#define IPPROTO_SATMON   69
 
#define IPPROTO_VISA   70
 
#define IPPROTO_IPCV   71
 
#define IPPROTO_CPNX   72
 
#define IPPROTO_CPHB   73
 
#define IPPROTO_WSN   74
 
#define IPPROTO_PVP   75
 
#define IPPROTO_BRSATMON   76
 
#define IPPROTO_ND   77
 
#define IPPROTO_WBMON   78
 
#define IPPROTO_WBEXPAK   79
 
#define IPPROTO_EON   80
 
#define IPPROTO_VMTP   81
 
#define IPPROTO_SVMTP   82
 
#define IPPROTO_VINES   83
 
#define IPPROTO_TTP   84
 
#define IPPROTO_IGP   85
 
#define IPPROTO_DGP   86
 
#define IPPROTO_TCF   87
 
#define IPPROTO_IGRP   88
 
#define IPPROTO_OSPFIGP   89
 
#define IPPROTO_SRPC   90
 
#define IPPROTO_LARP   91
 
#define IPPROTO_MTP   92
 
#define IPPROTO_AX25   93
 
#define IPPROTO_IPEIP   94
 
#define IPPROTO_MICP   95
 
#define IPPROTO_SCCSP   96
 
#define IPPROTO_ETHERIP   97
 
#define IPPROTO_ENCAP   98
 
#define IPPROTO_APES   99
 
#define IPPROTO_GMTP   100
 
#define IPPROTO_IPCOMP   108
 
#define IPPROTO_PIM   103
 
#define IPPROTO_PGM   113
 
#define IPPROTO_SCTP   132
 
#define IPPROTO_DIVERT   254
 
#define IPPROTO_RAW   255
 
#define IPPROTO_MAX   256
 
#define IPV4_ANY   ((uint32_t)0x00000000)
 
#define IPV4_LOOPBACK   ((uint32_t)0x7f000001)
 
#define IPV4_BROADCAST   ((uint32_t)0xe0000000)
 
#define IPV4_ALLHOSTS_GROUP   ((uint32_t)0xe0000001)
 
#define IPV4_ALLRTRS_GROUP   ((uint32_t)0xe0000002)
 
#define IPV4_MAX_LOCAL_GROUP   ((uint32_t)0xe00000ff)
 
#define IPV4_MIN_MCAST   IPv4(224, 0, 0, 0)
 
#define IPV4_MAX_MCAST   IPv4(239, 255, 255, 255)
 
#define IS_IPV4_MCAST(x)   ((x) >= IPV4_MIN_MCAST && (x) <= IPV4_MAX_MCAST)
 

Detailed Description

IP-related defines

Macro Definition Documentation

#define IPPROTO_3PC   34

Third Party Connect

#define IPPROTO_ADFS   68

Any distributed FS

#define IPPROTO_AH   51

IP6 Auth Header

#define IPPROTO_AHIP   61

any host internal protocol

#define IPPROTO_APES   99

any private encr. scheme

#define IPPROTO_ARGUS   13

Argus

#define IPPROTO_AX25   93

AX.25 Frames

#define IPPROTO_BHA   49

BHA

#define IPPROTO_BLT   30

Bulk Data Transfer

#define IPPROTO_BRSATMON   76

BackRoom SATNET Monitoring

#define IPPROTO_CFTP   62

CFTP

#define IPPROTO_CHAOS   16

Chaos

#define IPPROTO_CMTP   38

Control Message Transport

#define IPPROTO_CPHB   73

Comp. Prot. HeartBeat

#define IPPROTO_CPNX   72

Comp. Prot. Net. Executive

#define IPPROTO_DDP   37

Datagram Delivery

#define IPPROTO_DGP   86

dissimilar gateway prot.

#define IPPROTO_DIVERT   254

divert pseudo-protocol

#define IPPROTO_DSTOPTS   60

IP6 destination option

#define IPPROTO_EGP   8

exterior gateway protocol

#define IPPROTO_EMCON   14

EMCON

#define IPPROTO_ENCAP   98

encapsulation header

#define IPPROTO_EON   80

ISO cnlp

#define IPPROTO_ESP   50

IP6 Encap Sec. Payload

#define IPPROTO_ETHERIP   97

Ethernet IP encapsulation

#define IPPROTO_FRAGMENT   44

IP6 fragmentation header

#define IPPROTO_GGP   3

gateway^2 (deprecated)

#define IPPROTO_GMTP   100

GMTP

#define IPPROTO_GRE   47

General Routing Encap.

#define IPPROTO_HELLO   63

"hello" routing protocol

#define IPPROTO_HMP   20

Host Monitoring

#define IPPROTO_HOPOPTS   0

IP6 hop-by-hop options

#define IPPROTO_ICMP   1

control message protocol

#define IPPROTO_ICMPV6   58

ICMP6

#define IPPROTO_IDP   22

xns idp

#define IPPROTO_IDPR   35

InterDomain Policy Routing

#define IPPROTO_IDRP   45

InterDomain Routing

#define IPPROTO_IGMP   2

group mgmt protocol

#define IPPROTO_IGP   85

NSFNET-IGP

#define IPPROTO_IGRP   88

Cisco/GXS IGRP

#define IPPROTO_IL   40

IL transport protocol

#define IPPROTO_INLSP   52

Integ. Net Layer Security

#define IPPROTO_INP   32

Merit Internodal

#define IPPROTO_IP   0

dummy for IP

#define IPPROTO_IPCOMP   108

payload compression (IPComp)

#define IPPROTO_IPCV   71

Packet Core Utility

#define IPPROTO_IPEIP   94

IP encapsulated in IP

#define IPPROTO_IPPC   67

Pluribus Packet Core

#define IPPROTO_IPV4   4

IPv4 encapsulation

#define IPPROTO_IPV6   41

IP6 header

#define IPPROTO_IRTP   28

Reliable Transaction

#define IPPROTO_KRYPTOLAN   65

Kryptolan

#define IPPROTO_LARP   91

Locus Address Resoloution

#define IPPROTO_LEAF1   25

Leaf-1

#define IPPROTO_LEAF2   26

Leaf-2

#define IPPROTO_MAX   256

maximum protocol number

#define IPPROTO_MEAS   19

DCN Measurement Subsystems

#define IPPROTO_MHRP   48

Mobile Host Routing

#define IPPROTO_MICP   95

Mobile Int.ing control

#define IPPROTO_MTP   92

Multicast Transport

#define IPPROTO_MUX   18

Multiplexing

#define IPPROTO_ND   77

Sun net disk proto (temp.)

#define IPPROTO_NHRP   54

Next Hop Resolution

#define IPPROTO_NONE   59

IP6 no next header

#define IPPROTO_NSP   31

Network Services

#define IPPROTO_NVPII   11

network voice protocol

#define IPPROTO_OSPFIGP   89

OSPFIGP

#define IPPROTO_PGM   113

PGM

#define IPPROTO_PIGP   9

private interior gateway

#define IPPROTO_PIM   103

Protocol Independent Mcast

#define IPPROTO_PRM   21

Packet Radio Measurement

#define IPPROTO_PUP   12

pup

#define IPPROTO_PVP   75

Packet Video Protocol

#define IPPROTO_RAW   255

raw IP packet

#define IPPROTO_RCCMON   10

BBN RCC Monitoring

#define IPPROTO_RDP   27

Reliable Data

#define IPPROTO_ROUTING   43

IP6 routing header

#define IPPROTO_RSVP   46

resource reservation

#define IPPROTO_RVD   66

Remote Virtual Disk

#define IPPROTO_SATEXPAK   64

SATNET/Backroom EXPAK

#define IPPROTO_SATMON   69

Satnet Monitoring

#define IPPROTO_SCCSP   96

Semaphore Comm. security

#define IPPROTO_SCTP   132

Stream Control Transport Protocol

#define IPPROTO_SDRP   42

Source Demand Routing

#define IPPROTO_SEP   33

Sequential Exchange

#define IPPROTO_SRPC   90

Strite RPC protocol

#define IPPROTO_ST   7

Stream protocol II

#define IPPROTO_SVMTP   82

Secure VMTP

#define IPPROTO_SWIPE   53

IP with encryption

#define IPPROTO_TCF   87

TCF

#define IPPROTO_TCP   6

tcp

#define IPPROTO_TP   29

tp-4 w/ class negotiation

#define IPPROTO_TPXX   39

TP++ Transport

#define IPPROTO_TRUNK1   23

Trunk-1

#define IPPROTO_TRUNK2   24

Trunk-2

#define IPPROTO_TTP   84

TTP

#define IPPROTO_UDP   17

user datagram protocol

#define IPPROTO_VINES   83

Banyon VINES

#define IPPROTO_VISA   70

VISA Protocol

#define IPPROTO_VMTP   81

VMTP

#define IPPROTO_WBEXPAK   79

WIDEBAND EXPAK

#define IPPROTO_WBMON   78

WIDEBAND Monitoring

#define IPPROTO_WSN   74

Wang Span Network

#define IPPROTO_XNET   15

Cross Net Debugger

#define IPPROTO_XTP   36

XTP

#define IPv4 (   a,
  b,
  c,
 
)
Value:
((uint32_t)(((a) & 0xff) << 24) | \
(((b) & 0xff) << 16) | \
(((c) & 0xff) << 8) | \
((d) & 0xff))

Create IPv4 address

#define IPV4_ALLHOSTS_GROUP   ((uint32_t)0xe0000001)

224.0.0.1

#define IPV4_ALLRTRS_GROUP   ((uint32_t)0xe0000002)

224.0.0.2

#define IPV4_ANY   ((uint32_t)0x00000000)

0.0.0.0

#define IPV4_BROADCAST   ((uint32_t)0xe0000000)

224.0.0.0

#define IPV4_LOOPBACK   ((uint32_t)0x7f000001)

127.0.0.1

#define IPV4_MAX_LOCAL_GROUP   ((uint32_t)0xe00000ff)

224.0.0.255

#define IPV4_MAX_MCAST   IPv4(239, 255, 255, 255)

Maximum IPv4 multicast address

#define IPV4_MIN_MCAST   IPv4(224, 0, 0, 0)

Minimal IPv4-multicast address

#define IS_IPV4_MCAST (   x)    ((x) >= IPV4_MIN_MCAST && (x) <= IPV4_MAX_MCAST)

check if IPv4 address is multicast