Begin adding session tables, debug infos
This commit is contained in:
parent
879abe94c2
commit
02fc065c1d
4 changed files with 176 additions and 11 deletions
|
|
@ -25,6 +25,10 @@ const bit<16> TABLE_V4_NETWORKS = 5;
|
|||
const bit<16> TABLE_ARP = 6;
|
||||
const bit<16> TABLE_ARP_EGRESS = 7;
|
||||
const bit<16> TABLE_ICMP = 8;
|
||||
const bit<16> TABLE_NAT64_TCP = 9;
|
||||
const bit<16> TABLE_NAT64_UDP = 10;
|
||||
const bit<16> TABLE_NAT64_ICMP6 = 11;
|
||||
const bit<16> TABLE_NAT64_SESSION = 12;
|
||||
|
||||
|
||||
const bit<16> TYPE_IPV4 = 0x0800;
|
||||
|
|
|
|||
|
|
@ -232,6 +232,42 @@ Echo or Echo Reply Message
|
|||
default_action = controller_debug_table_id(TABLE_NAT46);
|
||||
}
|
||||
|
||||
/********************** NAT64 sessions ***********************************/
|
||||
|
||||
action nat64_create_session()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
/* Used for detecting traffic that should have a session */
|
||||
table nat64_session {
|
||||
key = {
|
||||
hdr.ipv6.dst_addr: lpm;
|
||||
}
|
||||
actions = {
|
||||
controller_debug_table_id;
|
||||
NoAction;
|
||||
}
|
||||
size = NAT64_TABLE_SIZE;
|
||||
default_action = controller_debug_table_id(TABLE_NAT64_SESSION);
|
||||
}
|
||||
|
||||
table nat64_tcp {
|
||||
key = {
|
||||
hdr.ipv6.src_addr: exact;
|
||||
hdr.ipv6.dst_addr: exact;
|
||||
hdr.tcp.src_port: exact;
|
||||
hdr.tcp.dst_port: exact;
|
||||
}
|
||||
actions = {
|
||||
controller_debug_table_id;
|
||||
NoAction;
|
||||
}
|
||||
size = NAT64_TABLE_SIZE;
|
||||
default_action = controller_debug_table_id(TABLE_NAT64_TCP);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/********************** ICMP6 + NDP + ICMP ***********************************/
|
||||
|
||||
|
|
@ -433,7 +469,7 @@ Echo or Echo Reply Message
|
|||
/********************** APPLYING TABLES ***********************************/
|
||||
apply {
|
||||
if(hdr.ipv6.isValid()) {
|
||||
if(nat64.apply().hit) { /* generic nat64 done */
|
||||
if(nat64.apply().hit) { /* generic / static nat64 done */
|
||||
if(hdr.icmp6.isValid()) {
|
||||
nat64_icmp6_generic();
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue