diff options
author | itojun <itojun> | 1999-12-22 06:27:19 +0000 |
---|---|---|
committer | itojun <itojun> | 1999-12-22 06:27:19 +0000 |
commit | c4521bbf470420aa57fa5f252bcf3576318ace87 (patch) | |
tree | 9bc5ba9d670fe15c237003cfd6640716c0debbcd /print-tcp.c | |
parent | 95be1abb3574f6fc9bdd5c90ff7073295ee07de7 (diff) | |
download | tcpdump-c4521bbf470420aa57fa5f252bcf3576318ace87.tar.gz |
* print-rt6.c: make IPv6 routing header printing work with new 2292bis
API.
* print-bgp.c: improve options printing. ugly code exists for
unaligned option parsing (need some fix).
* const poisoning in SMB decoder.
* make dump format back to original. someone may want to add an
option to do ascii printing, but keep the default behavior as is
for scripts used in many places.
* -Wall -Werror clean checks.
Diffstat (limited to 'print-tcp.c')
-rw-r--r-- | print-tcp.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/print-tcp.c b/print-tcp.c index 895be3bf..1561cdc3 100644 --- a/print-tcp.c +++ b/print-tcp.c @@ -21,7 +21,7 @@ #ifndef lint static const char rcsid[] = - "@(#) $Header: /tcpdump/master/tcpdump/print-tcp.c,v 1.61 1999-11-22 04:27:10 fenner Exp $ (LBL)"; + "@(#) $Header: /tcpdump/master/tcpdump/print-tcp.c,v 1.62 1999-12-22 06:27:23 itojun Exp $ (LBL)"; #endif #ifdef HAVE_CONFIG_H @@ -108,6 +108,9 @@ struct tcp_seq_hash { static struct tcp_seq_hash tcp_seq_hash[TSEQ_HASHSIZE]; +#ifndef BGP_PORT +#define BGP_PORT 179 +#endif #define NETBIOS_SSN_PORT 139 void @@ -184,10 +187,11 @@ tcp_print(register const u_char *bp, register u_int length, return; } #ifdef TH_ECN - if ((flags = tp->th_flags) & (TH_SYN|TH_FIN|TH_RST|TH_PUSH|TH_ECN)) { + if ((flags = tp->th_flags) & (TH_SYN|TH_FIN|TH_RST|TH_PUSH|TH_ECN)) #else - if ((flags = tp->th_flags) & (TH_SYN|TH_FIN|TH_RST|TH_PUSH)) { + if ((flags = tp->th_flags) & (TH_SYN|TH_FIN|TH_RST|TH_PUSH)) #endif + { if (flags & TH_SYN) putchar('S'); if (flags & TH_FIN) @@ -487,7 +491,7 @@ tcp_print(register const u_char *bp, register u_int length, * Decode payload if necessary. */ bp += (tp->th_off * 4); - if (sport == 179 || dport == 179) + if (sport == BGP_PORT || dport == BGP_PORT) bgp_print(bp, length); if (sport == NETBIOS_SSN_PORT || dport == NETBIOS_SSN_PORT) nbt_tcp_print(bp, length); |