diff options
author | pkelsey <pkelsey@FreeBSD.org> | 2015-07-08 16:19:32 +0000 |
---|---|---|
committer | pkelsey <pkelsey@FreeBSD.org> | 2015-07-08 16:19:32 +0000 |
commit | 7e965066ede451d7a551dd68d6c59acf32e4846e (patch) | |
tree | f0c2243cc0a2a59f3eb1354ba3987d4cbcb788bc /contrib/tcpdump/print-tcp.c | |
parent | 732211dc794db586649eabfc1d517b8a477440f5 (diff) | |
parent | c2704d8ede887d9fe69a9a11fe0755b09ec6895d (diff) | |
download | FreeBSD-src-7e965066ede451d7a551dd68d6c59acf32e4846e.zip FreeBSD-src-7e965066ede451d7a551dd68d6c59acf32e4846e.tar.gz |
MFV r285191: tcpdump 4.7.4.
Also, the changes made in r272451 and r272653 that were lost in the
merge of 4.6.2 (r276788) have been restored.
PR: 199568
Differential Revision: https://reviews.freebsd.org/D3007
Reviewed by: brooks, hiren
Approved by: jmallett (mentor)
MFC after: 1 month
Diffstat (limited to 'contrib/tcpdump/print-tcp.c')
-rw-r--r-- | contrib/tcpdump/print-tcp.c | 21 |
1 files changed, 17 insertions, 4 deletions
diff --git a/contrib/tcpdump/print-tcp.c b/contrib/tcpdump/print-tcp.c index 5b1133a..bc200e2 100644 --- a/contrib/tcpdump/print-tcp.c +++ b/contrib/tcpdump/print-tcp.c @@ -596,7 +596,7 @@ tcp_print(netdissect_options *ndo, switch(magic) { case 0xf989: - /* TCP Fast Open: draft-ietf-tcpm-fastopen-04 */ + /* TCP Fast Open: RFC 7413 */ if (datalen == 2) { /* Fast Open Cookie Request */ ND_PRINT((ndo, "tfo cookiereq")); @@ -674,8 +674,10 @@ tcp_print(netdissect_options *ndo, } if (sport == TELNET_PORT || dport == TELNET_PORT) { - if (!ndo->ndo_qflag && ndo->ndo_vflag) - telnet_print(ndo, bp, length); + telnet_print(ndo, bp, length); + } else if (sport == SMTP_PORT || dport == SMTP_PORT) { + ND_PRINT((ndo, ": ")); + smtp_print(ndo, bp, length); } else if (sport == BGP_PORT || dport == BGP_PORT) bgp_print(ndo, bp, length); else if (sport == PPTP_PORT || dport == PPTP_PORT) @@ -691,7 +693,18 @@ tcp_print(netdissect_options *ndo, else if (sport == OPENFLOW_PORT_OLD || dport == OPENFLOW_PORT_OLD || sport == OPENFLOW_PORT_IANA || dport == OPENFLOW_PORT_IANA) openflow_print(ndo, bp, length); - else if (length > 2 && + else if (sport == FTP_PORT || dport == FTP_PORT) { + ND_PRINT((ndo, ": ")); + ftp_print(ndo, bp, length); + } else if (sport == HTTP_PORT || dport == HTTP_PORT || + sport == HTTP_PORT_ALT || dport == HTTP_PORT_ALT) { + ND_PRINT((ndo, ": ")); + http_print(ndo, bp, length); + } else if (sport == RTSP_PORT || dport == RTSP_PORT || + sport == RTSP_PORT_ALT || dport == RTSP_PORT_ALT) { + ND_PRINT((ndo, ": ")); + rtsp_print(ndo, bp, length); + } else if (length > 2 && (sport == NAMESERVER_PORT || dport == NAMESERVER_PORT || sport == MULTICASTDNS_PORT || dport == MULTICASTDNS_PORT)) { /* |