summaryrefslogtreecommitdiff
path: root/tcp.h
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2015-07-14 13:39:07 -0700
committerGuy Harris <guy@alum.mit.edu>2015-07-14 13:39:22 -0700
commit09533cc93e80af2b5e100455513968dab6585e1d (patch)
treee0ef06c9e4c87513a6e6e3048a22b7a778d3ac2e /tcp.h
parentbf88d85d00297bb537b7856afb5d06e13f4cbd0d (diff)
downloadtcpdump-09533cc93e80af2b5e100455513968dab6585e1d.tar.gz
Clean up the port definitions.
From Bill Parker: sort the port definitions, add some additional ports, and use #ifndef/#endif around all definitions. From me: use consistent indentation, add the RFCs for NetBIOS-over-TCP to the #defines for the NBT ports, and don't keep the IPv6 ports separate.
Diffstat (limited to 'tcp.h')
-rw-r--r--tcp.h59
1 files changed, 36 insertions, 23 deletions
diff --git a/tcp.h b/tcp.h
index 2e588016..716f986b 100644
--- a/tcp.h
+++ b/tcp.h
@@ -91,50 +91,63 @@ struct tcphdr {
#define TCPOPT_TSTAMP_HDR \
(TCPOPT_NOP<<24|TCPOPT_NOP<<16|TCPOPT_TIMESTAMP<<8|TCPOLEN_TIMESTAMP)
+#ifndef FTP_PORT
+#define FTP_PORT 21
+#endif
+#ifndef SSH_PORT
+#define SSH_PORT 22
+#endif
#ifndef TELNET_PORT
-#define TELNET_PORT 23
+#define TELNET_PORT 23
#endif
#ifndef SMTP_PORT
#define SMTP_PORT 25
#endif
#ifndef NAMESERVER_PORT
-#define NAMESERVER_PORT 53
+#define NAMESERVER_PORT 53
+#endif
+#ifndef HTTP_PORT
+#define HTTP_PORT 80
+#endif
+#ifndef NETBIOS_SSN_PORT
+#define NETBIOS_SSN_PORT 139 /* RFC 1001, RFC 1002 */
#endif
#ifndef BGP_PORT
-#define BGP_PORT 179
+#define BGP_PORT 179
#endif
-#define NETBIOS_SSN_PORT 139
-#ifndef OPENFLOW_PORT_OLD
-#define OPENFLOW_PORT_OLD 6633
+#ifndef RPKI_RTR_PORT
+#define RPKI_RTR_PORT 323
#endif
-#ifndef OPENFLOW_PORT_IANA
-#define OPENFLOW_PORT_IANA 6653
+#ifndef SMB_PORT
+#define SMB_PORT 445
+#endif
+#ifndef RTSP_PORT
+#define RTSP_PORT 554
+#endif
+#ifndef MSDP_PORT
+#define MSDP_PORT 639
+#endif
+#ifndef LDP_PORT
+#define LDP_PORT 646
#endif
#ifndef PPTP_PORT
-#define PPTP_PORT 1723
+#define PPTP_PORT 1723
#endif
-#define BEEP_PORT 10288
#ifndef NFS_PORT
-#define NFS_PORT 2049
+#define NFS_PORT 2049
#endif
-#define MSDP_PORT 639
-#define RPKI_RTR_PORT 323
-#define LDP_PORT 646
-#ifndef SMB_PORT
-#define SMB_PORT 445
+#ifndef OPENFLOW_PORT_OLD
+#define OPENFLOW_PORT_OLD 6633
#endif
-#ifndef HTTP_PORT
-#define HTTP_PORT 80
+#ifndef OPENFLOW_PORT_IANA
+#define OPENFLOW_PORT_IANA 6653
#endif
#ifndef HTTP_PORT_ALT
#define HTTP_PORT_ALT 8080
#endif
-#ifndef RTSP_PORT
-#define RTSP_PORT 554
-#endif
#ifndef RTSP_PORT_ALT
#define RTSP_PORT_ALT 8554
#endif
-#ifndef FTP_PORT
-#define FTP_PORT 21
+#ifndef BEEP_PORT
+#define BEEP_PORT 10288
#endif