diff options
author | Neale Ranns <nranns@cisco.com> | 2019-05-15 02:13:37 -0700 |
---|---|---|
committer | Ole Trøan <otroan@employees.org> | 2019-05-28 13:30:44 +0000 |
commit | 50f0ac0f097e5495da1f2b1816106e3d420ff34b (patch) | |
tree | d10ae0385fc10b7da97b2a24f8dea3882f6d702d /src/vpp/api/custom_dump.c | |
parent | 9080096f7c548415fc4d5354c7e582a3eda1a5ed (diff) |
Punt: socket register for exception dispatched/punted packets based on reason
- add to the Punt API to allow different descriptions of the desired packets: UDP or exceptions
- move the punt nodes into punt_node.c
- improve tests (test that the correct packets are punted to the registered socket)
Change-Id: I1a133dec88106874993cba1f5a439cd26b2fef72
Signed-off-by: Neale Ranns <nranns@cisco.com>
Diffstat (limited to 'src/vpp/api/custom_dump.c')
-rw-r--r-- | src/vpp/api/custom_dump.c | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/src/vpp/api/custom_dump.c b/src/vpp/api/custom_dump.c index e9175d6ddcd..32354e77e59 100644 --- a/src/vpp/api/custom_dump.c +++ b/src/vpp/api/custom_dump.c @@ -3404,13 +3404,17 @@ vl_api_set_punt_t_print (vl_api_set_punt_t * mp, void *handle) s = format (0, "SCRIPT: punt "); - if (mp->punt.ipv != (u8) ~ 0) - s = format (s, "ip %d ", mp->punt.ipv); + switch (clib_net_to_host_u32 (mp->punt.type)) + { + case PUNT_API_TYPE_L4: + s = format (s, "%U", format_vl_api_address_family, mp->punt.punt.l4.af); - s = format (s, "protocol %d ", mp->punt.l4_protocol); + s = format (s, "protocol %d ", mp->punt.punt.l4.protocol); - if (mp->punt.l4_port != (u16) ~ 0) - s = format (s, "port %d ", ntohs (mp->punt.l4_port)); + if (mp->punt.punt.l4.port != (u16) ~ 0) + s = format (s, "port %d ", ntohs (mp->punt.punt.l4.port)); + break; + } if (!mp->is_add) s = format (s, "del "); |