]> The Tcpdump Group git mirrors - tcpdump/commitdiff
use macros for VAT and WB port numbers
authorDenis Ovsienko <[email protected]>
Wed, 3 Apr 2013 11:08:17 +0000 (15:08 +0400)
committerGuy Harris <[email protected]>
Sun, 14 Apr 2013 23:58:51 +0000 (16:58 -0700)
print-udp.c
udp.h

index 3c5ed8bcc47bc9f1381de6cd404b036706578d25..1f265c273b291cc9e8a89c475d7f02991dc801bf 100644 (file)
@@ -602,7 +602,7 @@ udp_print(register const u_char *bp, u_int length,
                else if (ISPORT(NETBIOS_DGRAM_PORT))
                        nbt_udp138_print((const u_char *)(up + 1), length);
 #endif
-               else if (dport == 3456)
+               else if (dport == VAT_PORT)
                        vat_print((const void *)(up + 1), up);
                else if (ISPORT(ZEPHYR_SRV_PORT) || ISPORT(ZEPHYR_CLT_PORT))
                        zephyr_print((const void *)(up + 1), length);
@@ -625,7 +625,7 @@ udp_print(register const u_char *bp, u_int length,
                /*
                 * Kludge in test for whiteboard packets.
                 */
-               else if (dport == 4567)
+               else if (dport == WB_PORT)
                        wb_print((const void *)(up + 1), length);
                else if (ISPORT(CISCO_AUTORP_PORT))
                        cisco_autorp_print((const void *)(up + 1), length);
diff --git a/udp.h b/udp.h
index b07cdd4331f6698408f4cf298556a93a4b179f27..4705dc9e9bde86e92e929094c3d058785df8ca87 100644 (file)
--- a/udp.h
+++ b/udp.h
@@ -79,9 +79,11 @@ struct udphdr {
 #define VQP_PORT               1589
 #define ZEPHYR_SRV_PORT                2103
 #define ZEPHYR_CLT_PORT                2104
+#define VAT_PORT               3456
 #define MPLS_LSP_PING_PORT      3503 /* draft-ietf-mpls-lsp-ping-02.txt */
 #define BFD_CONTROL_PORT        3784 /* draft-katz-ward-bfd-v4v6-1hop-00.txt */
 #define BFD_ECHO_PORT           3785 /* draft-katz-ward-bfd-v4v6-1hop-00.txt */
+#define WB_PORT                        4567
 #define SFLOW_PORT              6343 /* http://www.sflow.org/developers/specifications.php */
 #define LWAPP_DATA_PORT         12222 /* draft-ohara-capwap-lwapp-04.txt */
 #define LWAPP_CONTROL_PORT      12223 /* draft-ohara-capwap-lwapp-04.txt */