]> The Tcpdump Group git mirrors - tcpdump/commitdiff
OpenFlow: add IANA-allocated TCP port
authorDenis Ovsienko <[email protected]>
Tue, 25 Mar 2014 12:26:25 +0000 (16:26 +0400)
committerDenis Ovsienko <[email protected]>
Tue, 25 Mar 2014 19:27:23 +0000 (23:27 +0400)
OF specifications 1.0.2 and 1.3.3 use a different port number. That
said, the old port is still likely to be seen in the wild after 4 years
of deployment. Let tcpdump recognize both for a while.

print-tcp.c
tcp.h

index 9668ef4c9375e293e7324bbe0e30e682346169b8..3adfb323b3fea9fe8a0f9507165d68ea919b379f 100644 (file)
@@ -684,7 +684,8 @@ tcp_print(register const u_char *bp, register u_int length,
 #endif
         else if (sport == BEEP_PORT || dport == BEEP_PORT)
                 beep_print(gndo, bp, length);
-        else if (sport == OPENFLOW_PORT || dport == OPENFLOW_PORT)
+        else if (sport == OPENFLOW_PORT_OLD || dport == OPENFLOW_PORT_OLD ||
+                 sport == OPENFLOW_PORT_IANA || dport == OPENFLOW_PORT_IANA)
                 openflow_print(gndo, bp, length);
         else if (length > 2 &&
                  (sport == NAMESERVER_PORT || dport == NAMESERVER_PORT ||
diff --git a/tcp.h b/tcp.h
index fbd2f452dc0c53590fc6e995122c331c2e96c482..9d10c6cd2dda571ed1ab61b5bec7a7b51f6c0bcf 100644 (file)
--- a/tcp.h
+++ b/tcp.h
@@ -97,8 +97,11 @@ struct tcphdr {
 #define BGP_PORT                179
 #endif
 #define NETBIOS_SSN_PORT        139
-#ifndef OPENFLOW_PORT
-#define OPENFLOW_PORT           6633
+#ifndef OPENFLOW_PORT_OLD
+#define OPENFLOW_PORT_OLD       6633
+#endif
+#ifndef OPENFLOW_PORT_IANA
+#define OPENFLOW_PORT_IANA      6653
 #endif
 #ifndef PPTP_PORT
 #define PPTP_PORT              1723