aboutsummaryrefslogtreecommitdiffstats
path: root/src/vpp
diff options
context:
space:
mode:
authorJohn Lo <loj@cisco.com>2017-11-14 13:19:26 -0500
committerDave Barach <openvpp@barachs.net>2017-11-16 11:25:51 +0000
commit70bfcaf47779340951c1e6f169b1cedcabe708d1 (patch)
treeb6e1378942f278e914b7139d1210562d943cb680 /src/vpp
parent9d72120a6986e642c5b16c8650ad266188adf142 (diff)
Add Support of DHCP VSS Type 0 where VPN-ID is ASCII
Enhence support of DHCP VSS (Virtual Subnet Selection) to include VSS type 0 where VSS info is a NVT (Network Virtual Terminal) ASCII VPN ID where the ASCII string MUST NOT be terminated with a zero byte. Existing code already support VSS type 1, where VSS information is a RFC 2685 VPN-ID of 7 bytes with 3 bytes OUI and 4 bytes VPN index, and VSS type 255 indicating global VPN. Change-Id: I54edbc447c89a2aacd1cc9fc72bd5ba386037608 Signed-off-by: John Lo <loj@cisco.com>
Diffstat (limited to 'src/vpp')
-rw-r--r--src/vpp/api/custom_dump.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/vpp/api/custom_dump.c b/src/vpp/api/custom_dump.c
index fd0e88a9bb1..f27acda24dd 100644
--- a/src/vpp/api/custom_dump.c
+++ b/src/vpp/api/custom_dump.c
@@ -844,9 +844,13 @@ static void *vl_api_dhcp_proxy_set_vss_t_print
s = format (s, "tbl_id %d ", ntohl (mp->tbl_id));
- s = format (s, "fib_id %d ", ntohl (mp->fib_id));
-
- s = format (s, "oui %d ", ntohl (mp->oui));
+ if (mp->vss_type == VSS_TYPE_VPN_ID)
+ {
+ s = format (s, "fib_id %d ", ntohl (mp->vpn_index));
+ s = format (s, "oui %d ", ntohl (mp->oui));
+ }
+ else if (mp->vss_type == VSS_TYPE_ASCII)
+ s = format (s, "vpn_ascii_id %s", mp->vpn_ascii_id);
if (mp->is_ipv6 != 0)
s = format (s, "ipv6 ");