mirror of
https://github.com/xdp-project/bpf-examples.git
synced 2024-05-06 15:54:53 +00:00
This adds an initial version of a NAT64 translator in BPF. It compiles and loads, but doesn't actually appear to work yet. Signed-off-by: Toke Høiland-Jørgensen <toke@redhat.com>
21 lines
316 B
C
21 lines
316 B
C
#ifndef __NAT64_H__
|
|
#define __NAT64_H__
|
|
|
|
#include <linux/in6.h>
|
|
|
|
struct nat64_config {
|
|
struct in6_addr v6_prefix;
|
|
__u64 timeout_ns;
|
|
__u32 v4_prefix;
|
|
__u32 v4_mask;
|
|
__u32 next_addr;
|
|
};
|
|
|
|
struct v6_addr_state {
|
|
__u64 last_seen;
|
|
__u32 v4_addr;
|
|
__u32 static_conf;
|
|
};
|
|
|
|
#endif
|