10f74e101Schristos /* 20f74e101Schristos * Copyright (c) 1998-2007 The TCPDUMP project 30f74e101Schristos * 40f74e101Schristos * Redistribution and use in source and binary forms, with or without 50f74e101Schristos * modification, are permitted provided that: (1) source code 60f74e101Schristos * distributions retain the above copyright notice and this paragraph 70f74e101Schristos * in its entirety, and (2) distributions including binary code include 80f74e101Schristos * the above copyright notice and this paragraph in its entirety in 90f74e101Schristos * the documentation or other materials provided with the distribution. 100f74e101Schristos * THIS SOFTWARE IS PROVIDED ``AS IS'' AND 110f74e101Schristos * WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, WITHOUT 120f74e101Schristos * LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 130f74e101Schristos * FOR A PARTICULAR PURPOSE. 140f74e101Schristos * 150f74e101Schristos * Reference documentation: 16c74ad251Schristos * https://www.cisco.com/c/en/us/support/docs/lan-switching/vtp/10558-21.html 17c74ad251Schristos * https://docstore.mik.ua/univercd/cc/td/doc/product/lan/trsrb/frames.htm 180f74e101Schristos * 190f74e101Schristos * Original code ode by Carles Kishimoto <carles.kishimoto@gmail.com> 200f74e101Schristos */ 210f74e101Schristos 22fdccd7e4Schristos #include <sys/cdefs.h> 23fdccd7e4Schristos #ifndef lint 24*26ba0b50Schristos __RCSID("$NetBSD: print-vtp.c,v 1.7 2024/09/02 16:15:33 christos Exp $"); 25fdccd7e4Schristos #endif 26fdccd7e4Schristos 27dc860a36Sspz /* \summary: Cisco VLAN Trunking Protocol (VTP) printer */ 28dc860a36Sspz 29c74ad251Schristos #include <config.h> 300f74e101Schristos 31c74ad251Schristos #include "netdissect-stdinc.h" 320f74e101Schristos 33c74ad251Schristos #define ND_LONGJMP_FROM_TCHECK 34784088dfSchristos #include "netdissect.h" 350f74e101Schristos #include "addrtoname.h" 360f74e101Schristos #include "extract.h" 370f74e101Schristos 380f74e101Schristos #define VTP_HEADER_LEN 36 390f74e101Schristos #define VTP_DOMAIN_NAME_LEN 32 400f74e101Schristos #define VTP_MD5_DIGEST_LEN 16 410f74e101Schristos #define VTP_UPDATE_TIMESTAMP_LEN 12 4272c96ff3Schristos #define VTP_VLAN_INFO_FIXED_PART_LEN 12 /* length of VLAN info before VLAN name */ 430f74e101Schristos 440f74e101Schristos #define VTP_SUMMARY_ADV 0x01 450f74e101Schristos #define VTP_SUBSET_ADV 0x02 460f74e101Schristos #define VTP_ADV_REQUEST 0x03 470f74e101Schristos #define VTP_JOIN_MESSAGE 0x04 480f74e101Schristos 490f74e101Schristos struct vtp_vlan_ { 50c74ad251Schristos nd_uint8_t len; 51c74ad251Schristos nd_uint8_t status; 52c74ad251Schristos nd_uint8_t type; 53c74ad251Schristos nd_uint8_t name_len; 54c74ad251Schristos nd_uint16_t vlanid; 55c74ad251Schristos nd_uint16_t mtu; 56c74ad251Schristos nd_uint32_t index; 570f74e101Schristos }; 580f74e101Schristos 59026d7285Schristos static const struct tok vtp_message_type_values[] = { 600f74e101Schristos { VTP_SUMMARY_ADV, "Summary advertisement"}, 610f74e101Schristos { VTP_SUBSET_ADV, "Subset advertisement"}, 620f74e101Schristos { VTP_ADV_REQUEST, "Advertisement request"}, 630f74e101Schristos { VTP_JOIN_MESSAGE, "Join message"}, 640f74e101Schristos { 0, NULL } 650f74e101Schristos }; 660f74e101Schristos 67026d7285Schristos static const struct tok vtp_header_values[] = { 680f74e101Schristos { 0x01, "Followers"}, /* On Summary advertisement, 3rd byte is Followers */ 690f74e101Schristos { 0x02, "Seq number"}, /* On Subset advertisement, 3rd byte is Sequence number */ 700f74e101Schristos { 0x03, "Rsvd"}, /* On Adver. requests 3rd byte is Rsvd */ 710f74e101Schristos { 0x04, "Rsvd"}, /* On Adver. requests 3rd byte is Rsvd */ 720f74e101Schristos { 0, NULL } 730f74e101Schristos }; 740f74e101Schristos 75026d7285Schristos static const struct tok vtp_vlan_type_values[] = { 760f74e101Schristos { 0x01, "Ethernet"}, 770f74e101Schristos { 0x02, "FDDI"}, 780f74e101Schristos { 0x03, "TrCRF"}, 790f74e101Schristos { 0x04, "FDDI-net"}, 800f74e101Schristos { 0x05, "TrBRF"}, 810f74e101Schristos { 0, NULL } 820f74e101Schristos }; 830f74e101Schristos 84026d7285Schristos static const struct tok vtp_vlan_status[] = { 850f74e101Schristos { 0x00, "Operational"}, 860f74e101Schristos { 0x01, "Suspended"}, 870f74e101Schristos { 0, NULL } 880f74e101Schristos }; 890f74e101Schristos 900f74e101Schristos #define VTP_VLAN_SOURCE_ROUTING_RING_NUMBER 0x01 910f74e101Schristos #define VTP_VLAN_SOURCE_ROUTING_BRIDGE_NUMBER 0x02 920f74e101Schristos #define VTP_VLAN_STP_TYPE 0x03 930f74e101Schristos #define VTP_VLAN_PARENT_VLAN 0x04 940f74e101Schristos #define VTP_VLAN_TRANS_BRIDGED_VLAN 0x05 950f74e101Schristos #define VTP_VLAN_PRUNING 0x06 960f74e101Schristos #define VTP_VLAN_BRIDGE_TYPE 0x07 970f74e101Schristos #define VTP_VLAN_ARP_HOP_COUNT 0x08 980f74e101Schristos #define VTP_VLAN_STE_HOP_COUNT 0x09 990f74e101Schristos #define VTP_VLAN_BACKUP_CRF_MODE 0x0A 1000f74e101Schristos 101026d7285Schristos static const struct tok vtp_vlan_tlv_values[] = { 1020f74e101Schristos { VTP_VLAN_SOURCE_ROUTING_RING_NUMBER, "Source-Routing Ring Number TLV"}, 1030f74e101Schristos { VTP_VLAN_SOURCE_ROUTING_BRIDGE_NUMBER, "Source-Routing Bridge Number TLV"}, 1040f74e101Schristos { VTP_VLAN_STP_TYPE, "STP type TLV"}, 1050f74e101Schristos { VTP_VLAN_PARENT_VLAN, "Parent VLAN TLV"}, 1060f74e101Schristos { VTP_VLAN_TRANS_BRIDGED_VLAN, "Translationally bridged VLANs TLV"}, 1070f74e101Schristos { VTP_VLAN_PRUNING, "Pruning TLV"}, 1080f74e101Schristos { VTP_VLAN_BRIDGE_TYPE, "Bridge Type TLV"}, 1090f74e101Schristos { VTP_VLAN_ARP_HOP_COUNT, "Max ARP Hop Count TLV"}, 1100f74e101Schristos { VTP_VLAN_STE_HOP_COUNT, "Max STE Hop Count TLV"}, 1110f74e101Schristos { VTP_VLAN_BACKUP_CRF_MODE, "Backup CRF Mode TLV"}, 1120f74e101Schristos { 0, NULL } 1130f74e101Schristos }; 1140f74e101Schristos 115026d7285Schristos static const struct tok vtp_stp_type_values[] = { 1160f74e101Schristos { 1, "SRT"}, 1170f74e101Schristos { 2, "SRB"}, 1180f74e101Schristos { 3, "Auto"}, 1190f74e101Schristos { 0, NULL } 1200f74e101Schristos }; 1210f74e101Schristos 1220f74e101Schristos void 123c47fd378Schristos vtp_print(netdissect_options *ndo, 124c74ad251Schristos const u_char *pptr, const u_int length) 1250f74e101Schristos { 126c74ad251Schristos u_int type, len, name_len, tlv_len, tlv_value, mgmtd_len; 1270f74e101Schristos const u_char *tptr; 1280f74e101Schristos const struct vtp_vlan_ *vtp_vlan; 1290f74e101Schristos 130c74ad251Schristos ndo->ndo_protocol = "vtp"; 1310f74e101Schristos if (length < VTP_HEADER_LEN) 132c74ad251Schristos goto invalid; 1330f74e101Schristos 1340f74e101Schristos tptr = pptr; 1350f74e101Schristos 136c74ad251Schristos ND_TCHECK_LEN(tptr, VTP_HEADER_LEN); 1370f74e101Schristos 138c74ad251Schristos type = GET_U_1(tptr + 1); 139c74ad251Schristos ND_PRINT("VTPv%u, Message %s (0x%02x), length %u", 140c74ad251Schristos GET_U_1(tptr), 1410f74e101Schristos tok2str(vtp_message_type_values,"Unknown message type", type), 142784088dfSchristos type, 143c74ad251Schristos length); 1440f74e101Schristos 1450f74e101Schristos /* In non-verbose mode, just print version and message type */ 146c47fd378Schristos if (ndo->ndo_vflag < 1) { 147c74ad251Schristos goto tcheck_full_packet; 1480f74e101Schristos } 1490f74e101Schristos 1500f74e101Schristos /* verbose mode print all fields */ 151c74ad251Schristos ND_PRINT("\n\tDomain name: "); 152c74ad251Schristos mgmtd_len = GET_U_1(tptr + 3); 153c74ad251Schristos if (mgmtd_len < 1 || mgmtd_len > VTP_DOMAIN_NAME_LEN) { 154*26ba0b50Schristos ND_PRINT(" [MgmtD Len %u]", mgmtd_len); 155c74ad251Schristos goto invalid; 156dc860a36Sspz } 157c74ad251Schristos nd_printjnp(ndo, tptr + 4, mgmtd_len); 158c74ad251Schristos ND_PRINT(", %s: %u", 159784088dfSchristos tok2str(vtp_header_values, "Unknown", type), 160c74ad251Schristos GET_U_1(tptr + 2)); 1610f74e101Schristos 1620f74e101Schristos tptr += VTP_HEADER_LEN; 1630f74e101Schristos 1640f74e101Schristos switch (type) { 1650f74e101Schristos 1660f74e101Schristos case VTP_SUMMARY_ADV: 1670f74e101Schristos 1680f74e101Schristos /* 1690f74e101Schristos * SUMMARY ADVERTISEMENT 1700f74e101Schristos * 1710f74e101Schristos * 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 1720f74e101Schristos * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 173dc860a36Sspz * | Version | Code | Followers | MgmtD Len | 1740f74e101Schristos * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 175784088dfSchristos * | Management Domain Name (zero-padded to 32 bytes) | 1760f74e101Schristos * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1770f74e101Schristos * | Configuration revision number | 1780f74e101Schristos * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1790f74e101Schristos * | Updater Identity IP address | 1800f74e101Schristos * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1810f74e101Schristos * | Update Timestamp (12 bytes) | 1820f74e101Schristos * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1830f74e101Schristos * | MD5 digest (16 bytes) | 1840f74e101Schristos * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1850f74e101Schristos * 1860f74e101Schristos */ 1870f74e101Schristos 188c74ad251Schristos ND_PRINT("\n\t Config Rev %x, Updater %s", 189c74ad251Schristos GET_BE_U_4(tptr), 190c74ad251Schristos GET_IPADDR_STRING(tptr+4)); 1910f74e101Schristos tptr += 8; 192c74ad251Schristos ND_PRINT(", Timestamp 0x%08x 0x%08x 0x%08x", 193c74ad251Schristos GET_BE_U_4(tptr), 194c74ad251Schristos GET_BE_U_4(tptr + 4), 195c74ad251Schristos GET_BE_U_4(tptr + 8)); 1960f74e101Schristos tptr += VTP_UPDATE_TIMESTAMP_LEN; 197c74ad251Schristos ND_PRINT(", MD5 digest: %08x%08x%08x%08x", 198c74ad251Schristos GET_BE_U_4(tptr), 199c74ad251Schristos GET_BE_U_4(tptr + 4), 200c74ad251Schristos GET_BE_U_4(tptr + 8), 201c74ad251Schristos GET_BE_U_4(tptr + 12)); 2020f74e101Schristos tptr += VTP_MD5_DIGEST_LEN; 2030f74e101Schristos break; 2040f74e101Schristos 2050f74e101Schristos case VTP_SUBSET_ADV: 2060f74e101Schristos 2070f74e101Schristos /* 2080f74e101Schristos * SUBSET ADVERTISEMENT 2090f74e101Schristos * 2100f74e101Schristos * 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2110f74e101Schristos * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 212dc860a36Sspz * | Version | Code | Seq number | MgmtD Len | 2130f74e101Schristos * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 214784088dfSchristos * | Management Domain Name (zero-padded to 32 bytes) | 2150f74e101Schristos * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 2160f74e101Schristos * | Configuration revision number | 2170f74e101Schristos * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 2180f74e101Schristos * | VLAN info field 1 | 2190f74e101Schristos * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 2200f74e101Schristos * | ................ | 2210f74e101Schristos * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 2220f74e101Schristos * | VLAN info field N | 2230f74e101Schristos * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 2240f74e101Schristos * 2250f74e101Schristos */ 2260f74e101Schristos 227c74ad251Schristos ND_PRINT(", Config Rev %x", GET_BE_U_4(tptr)); 2280f74e101Schristos 2290f74e101Schristos /* 2300f74e101Schristos * VLAN INFORMATION 2310f74e101Schristos * 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2320f74e101Schristos * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 2330f74e101Schristos * | V info len | Status | VLAN type | VLAN name len | 2340f74e101Schristos * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 2350f74e101Schristos * | ISL vlan id | MTU size | 2360f74e101Schristos * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 2370f74e101Schristos * | 802.10 index (SAID) | 2380f74e101Schristos * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 2390f74e101Schristos * | VLAN name | 2400f74e101Schristos * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 2410f74e101Schristos * 2420f74e101Schristos */ 2430f74e101Schristos 2440f74e101Schristos tptr += 4; 245817e9a7eSchristos while ((unsigned)(tptr - pptr) < length) { 2460f74e101Schristos 247c74ad251Schristos len = GET_U_1(tptr); 2480f74e101Schristos if (len == 0) 2490f74e101Schristos break; 2500f74e101Schristos 251c74ad251Schristos ND_TCHECK_LEN(tptr, len); 2520f74e101Schristos 253784088dfSchristos vtp_vlan = (const struct vtp_vlan_*)tptr; 25472c96ff3Schristos if (len < VTP_VLAN_INFO_FIXED_PART_LEN) 255c74ad251Schristos goto invalid; 256c74ad251Schristos ND_PRINT("\n\tVLAN info status %s, type %s, VLAN-id %u, MTU %u, SAID 0x%08x, Name ", 257c74ad251Schristos tok2str(vtp_vlan_status,"Unknown",GET_U_1(vtp_vlan->status)), 258c74ad251Schristos tok2str(vtp_vlan_type_values,"Unknown",GET_U_1(vtp_vlan->type)), 259c74ad251Schristos GET_BE_U_2(vtp_vlan->vlanid), 260c74ad251Schristos GET_BE_U_2(vtp_vlan->mtu), 261c74ad251Schristos GET_BE_U_4(vtp_vlan->index)); 26272c96ff3Schristos len -= VTP_VLAN_INFO_FIXED_PART_LEN; 26372c96ff3Schristos tptr += VTP_VLAN_INFO_FIXED_PART_LEN; 264c74ad251Schristos name_len = GET_U_1(vtp_vlan->name_len); 265c74ad251Schristos if (len < 4*((name_len + 3)/4)) 266c74ad251Schristos goto invalid; 267c74ad251Schristos nd_printjnp(ndo, tptr, name_len); 2680f74e101Schristos 2690f74e101Schristos /* 2700f74e101Schristos * Vlan names are aligned to 32-bit boundaries. 2710f74e101Schristos */ 272c74ad251Schristos len -= 4*((name_len + 3)/4); 273c74ad251Schristos tptr += 4*((name_len + 3)/4); 2740f74e101Schristos 2750f74e101Schristos /* TLV information follows */ 2760f74e101Schristos 2770f74e101Schristos while (len > 0) { 2780f74e101Schristos 2790f74e101Schristos /* 28072c96ff3Schristos * Cisco specs say 2 bytes for type + 2 bytes for length; 281c74ad251Schristos * see https://docstore.mik.ua/univercd/cc/td/doc/product/lan/trsrb/frames.htm 28272c96ff3Schristos * However, actual packets on the wire appear to use 1 28372c96ff3Schristos * byte for the type and 1 byte for the length, so that's 28472c96ff3Schristos * what we do. 2850f74e101Schristos */ 28672c96ff3Schristos if (len < 2) 287c74ad251Schristos goto invalid; 288c74ad251Schristos type = GET_U_1(tptr); 289c74ad251Schristos tlv_len = GET_U_1(tptr + 1); 2900f74e101Schristos 291c74ad251Schristos ND_PRINT("\n\t\t%s (0x%04x) TLV", 2920f74e101Schristos tok2str(vtp_vlan_tlv_values, "Unknown", type), 293c74ad251Schristos type); 2940f74e101Schristos 29572c96ff3Schristos if (len < tlv_len * 2 + 2) { 296c74ad251Schristos ND_PRINT(" (TLV goes past the end of the packet)"); 297c74ad251Schristos goto invalid; 2980f74e101Schristos } 299c74ad251Schristos ND_TCHECK_LEN(tptr, tlv_len * 2 + 2); 3000f74e101Schristos 30172c96ff3Schristos /* 30272c96ff3Schristos * We assume the value is a 2-byte integer; the length is 30372c96ff3Schristos * in units of 16-bit words. 30472c96ff3Schristos */ 30572c96ff3Schristos if (tlv_len != 1) { 306*26ba0b50Schristos ND_PRINT(" [TLV length %u != 1]", tlv_len); 307c74ad251Schristos goto invalid; 30872c96ff3Schristos } else { 309c74ad251Schristos tlv_value = GET_BE_U_2(tptr + 2); 3100f74e101Schristos 3110f74e101Schristos switch (type) { 3120f74e101Schristos case VTP_VLAN_STE_HOP_COUNT: 313c74ad251Schristos ND_PRINT(", %u", tlv_value); 3140f74e101Schristos break; 3150f74e101Schristos 3160f74e101Schristos case VTP_VLAN_PRUNING: 317c74ad251Schristos ND_PRINT(", %s (%u)", 3180f74e101Schristos tlv_value == 1 ? "Enabled" : "Disabled", 319c74ad251Schristos tlv_value); 3200f74e101Schristos break; 3210f74e101Schristos 3220f74e101Schristos case VTP_VLAN_STP_TYPE: 323c74ad251Schristos ND_PRINT(", %s (%u)", 3240f74e101Schristos tok2str(vtp_stp_type_values, "Unknown", tlv_value), 325c74ad251Schristos tlv_value); 3260f74e101Schristos break; 3270f74e101Schristos 3280f74e101Schristos case VTP_VLAN_BRIDGE_TYPE: 329c74ad251Schristos ND_PRINT(", %s (%u)", 3300f74e101Schristos tlv_value == 1 ? "SRB" : "SRT", 331c74ad251Schristos tlv_value); 3320f74e101Schristos break; 3330f74e101Schristos 3340f74e101Schristos case VTP_VLAN_BACKUP_CRF_MODE: 335c74ad251Schristos ND_PRINT(", %s (%u)", 3360f74e101Schristos tlv_value == 1 ? "Backup" : "Not backup", 337c74ad251Schristos tlv_value); 3380f74e101Schristos break; 3390f74e101Schristos 3400f74e101Schristos /* 3410f74e101Schristos * FIXME those are the defined TLVs that lack a decoder 3420f74e101Schristos * you are welcome to contribute code ;-) 3430f74e101Schristos */ 3440f74e101Schristos 3450f74e101Schristos case VTP_VLAN_SOURCE_ROUTING_RING_NUMBER: 3460f74e101Schristos case VTP_VLAN_SOURCE_ROUTING_BRIDGE_NUMBER: 3470f74e101Schristos case VTP_VLAN_PARENT_VLAN: 3480f74e101Schristos case VTP_VLAN_TRANS_BRIDGED_VLAN: 3490f74e101Schristos case VTP_VLAN_ARP_HOP_COUNT: 3500f74e101Schristos default: 351c47fd378Schristos print_unknown_data(ndo, tptr, "\n\t\t ", 2 + tlv_len*2); 3520f74e101Schristos break; 3530f74e101Schristos } 35472c96ff3Schristos } 3550f74e101Schristos len -= 2 + tlv_len*2; 3560f74e101Schristos tptr += 2 + tlv_len*2; 3570f74e101Schristos } 3580f74e101Schristos } 3590f74e101Schristos break; 3600f74e101Schristos 3610f74e101Schristos case VTP_ADV_REQUEST: 3620f74e101Schristos 3630f74e101Schristos /* 3640f74e101Schristos * ADVERTISEMENT REQUEST 3650f74e101Schristos * 3660f74e101Schristos * 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 3670f74e101Schristos * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 368dc860a36Sspz * | Version | Code | Reserved | MgmtD Len | 3690f74e101Schristos * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 370784088dfSchristos * | Management Domain Name (zero-padded to 32 bytes) | 3710f74e101Schristos * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 3720f74e101Schristos * | Start value | 3730f74e101Schristos * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 3740f74e101Schristos * 3750f74e101Schristos */ 3760f74e101Schristos 377c74ad251Schristos ND_PRINT("\n\tStart value: %u", GET_BE_U_4(tptr)); 3780f74e101Schristos break; 3790f74e101Schristos 3800f74e101Schristos case VTP_JOIN_MESSAGE: 3810f74e101Schristos 3820f74e101Schristos /* FIXME - Could not find message format */ 3830f74e101Schristos break; 3840f74e101Schristos 3850f74e101Schristos default: 3860f74e101Schristos break; 3870f74e101Schristos } 3880f74e101Schristos 3890f74e101Schristos return; 3900f74e101Schristos 391c74ad251Schristos invalid: 392c74ad251Schristos nd_print_invalid(ndo); 393c74ad251Schristos tcheck_full_packet: 394c74ad251Schristos ND_TCHECK_LEN(pptr, length); 3950f74e101Schristos } 396