X-Git-Url: https://git.tcpdump.org/tcpdump/blobdiff_plain/459869a95bb27cef9438a939bb6478978cff3ddf..f53e36817312f87f7f41463b70fe320aeb21e02e:/print-tcp.c?ds=sidebyside diff --git a/print-tcp.c b/print-tcp.c index 4675f9fc..f8e0ee72 100644 --- a/print-tcp.c +++ b/print-tcp.c @@ -148,7 +148,7 @@ tcp_print(register const u_char *bp, register u_int length, u_int32_t seq, ack, thseq, thack; u_int utoval; u_int16_t magic; - int threv; + register int rev; #ifdef INET6 register const struct ip6_hdr *ip6; #endif @@ -265,7 +265,6 @@ tcp_print(register const u_char *bp, register u_int length, if (!Sflag && (flags & TH_ACK)) { register struct tcp_seq_hash *th; const void *src, *dst; - register int rev; struct tha tha; /* * Find (or record) the initial sequence numbers for @@ -354,7 +353,6 @@ tcp_print(register const u_char *bp, register u_int length, } #endif - threv = rev; for (th = &tcp_seq_hash[tha.port % TSEQ_HASHSIZE]; th->nxt; th = th->nxt) if (memcmp((char *)&tha, (char *)&th->addr, @@ -385,7 +383,7 @@ tcp_print(register const u_char *bp, register u_int length, thack = th->ack; } else { /*fool gcc*/ - thseq = thack = threv = 0; + thseq = thack = rev = 0; } if (hlen > length) { (void)printf(" [bad hdr length %u - too long, > %u]", @@ -506,7 +504,7 @@ tcp_print(register const u_char *bp, register u_int length, s = EXTRACT_32BITS(cp + i); LENCHECK(i + 8); e = EXTRACT_32BITS(cp + i + 4); - if (threv) { + if (rev) { s -= thseq; e -= thseq; } else { @@ -776,6 +774,7 @@ print_tcp_rst_data(register const u_char *sp, u_int length) } #ifdef HAVE_LIBCRYPTO +USES_APPLE_DEPRECATED_API static int tcp_verify_signature(const struct ip *ip, const struct tcphdr *tp, const u_char *data, int length, const u_char *rcvsig) @@ -862,6 +861,7 @@ tcp_verify_signature(const struct ip *ip, const struct tcphdr *tp, else return (SIGNATURE_INVALID); } +USES_APPLE_RST #endif /* HAVE_LIBCRYPTO */ /*