NDN-DPDK
High-Speed Named Data Networking Forwarder
Main Page
Related Pages
Data Structures
Data Structures
Data Structure Index
Data Fields
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
z
Functions
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
z
Files
File List
Globals
All
_
a
b
c
d
e
f
g
h
i
l
m
n
p
r
s
t
u
v
w
Functions
_
b
c
d
e
f
h
i
l
m
n
p
r
s
t
u
Variables
_
b
c
d
e
f
g
i
l
m
p
r
s
t
v
w
Typedefs
b
c
d
e
f
g
h
i
l
m
n
p
r
s
t
u
v
Enumerations
Enumerator
b
c
d
e
f
g
h
i
l
m
n
p
r
s
t
u
v
Macros
a
b
c
d
f
h
i
l
m
n
p
r
s
t
u
•
All
Data Structures
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Macros
Pages
bpf
xdp
api.h
Go to the documentation of this file.
1
#ifndef NDNDPDK_BPF_XDP_API_H
2
#define NDNDPDK_BPF_XDP_API_H
3
6
#include "../../csrc/ethface/xdp-locator.h"
7
#include "../../csrc/ndni/an.h"
8
9
#include <linux/bpf.h>
10
#include <linux/if_ether.h>
11
#include <linux/in.h>
12
#include <linux/ip.h>
13
#include <linux/ipv6.h>
14
#include <linux/udp.h>
15
16
#include <bpf/bpf_endian.h>
17
#include <bpf/bpf_helpers.h>
18
19
struct
vlanhdr
{
20
uint16_t
vlan_tci
;
21
uint16_t
eth_proto
;
22
}
__rte_packed
;
23
24
struct
vxlanhdr
{
25
uint8_t
flags
;
26
uint8_t
rsvd0
[3];
27
uint8_t
vni
[3];
28
uint8_t
rsvd1
;
29
}
__rte_packed
;
30
31
typedef
struct
VxlanInnerHdr
{
32
struct
vxlanhdr
vx
;
33
struct
ethhdr
eth
;
34
}
__rte_packed
VxlanInnerHdr
;
35
36
typedef
struct
GtpInnerHdr
{
37
EthGtpHdr
gtp
;
38
struct
iphdr
ipv4
;
39
struct
udphdr
udp
;
40
}
__rte_packed
GtpInnerHdr
;
41
42
enum
{
43
UDPPortVXLAN
= 4789,
44
UDPPortGTP
= 2152,
45
};
46
47
#define PacketPtrAs_(ptr, size, ...) \
48
__extension__({ \
49
if ((const uint8_t*)ptr + (size_t)(size) > (const uint8_t*)(long)ctx->data_end) { \
50
return XDP_DROP; \
51
} \
52
pkt; \
53
})
54
67
#define PacketPtrAs(ptr, ...) PacketPtrAs_((ptr), ##__VA_ARGS__, sizeof(*(ptr)))
68
69
#endif
// NDNDPDK_BPF_XDP_API_H
UDPPortGTP
@ UDPPortGTP
Definition:
api.h:44
UDPPortVXLAN
@ UDPPortVXLAN
Definition:
api.h:43
GtpInnerHdr
struct GtpInnerHdr GtpInnerHdr
VxlanInnerHdr
struct VxlanInnerHdr VxlanInnerHdr
__rte_packed
struct vlanhdr __rte_packed
EthGtpHdr
GTP-U header with PDU session container.
Definition:
xdp-locator.h:46
GtpInnerHdr
Definition:
api.h:36
GtpInnerHdr::gtp
EthGtpHdr gtp
Definition:
api.h:37
GtpInnerHdr::ipv4
struct iphdr ipv4
Definition:
api.h:38
GtpInnerHdr::udp
struct udphdr udp
Definition:
api.h:39
VxlanInnerHdr
Definition:
api.h:31
VxlanInnerHdr::eth
struct ethhdr eth
Definition:
api.h:33
VxlanInnerHdr::vx
struct vxlanhdr vx
Definition:
api.h:32
vlanhdr
Definition:
api.h:19
vlanhdr::vlan_tci
uint16_t vlan_tci
Definition:
api.h:20
vlanhdr::eth_proto
uint16_t eth_proto
Definition:
api.h:21
vxlanhdr
Definition:
api.h:24
vxlanhdr::flags
uint8_t flags
Definition:
api.h:25
vxlanhdr::vni
uint8_t vni[3]
Definition:
api.h:27
vxlanhdr::rsvd1
uint8_t rsvd1
Definition:
api.h:28
vxlanhdr::rsvd0
uint8_t rsvd0[3]
Definition:
api.h:26
Generated by
1.9.1