]> The Tcpdump Group git mirrors - tcpdump/blobdiff - print-tcp.c
adopt MacOS deprecation workaround from FreeRADIUS
[tcpdump] / print-tcp.c
index 4675f9fc7138a4da227df910db7c09498fa28186..f8e0ee723518bac5bd0d2d8addbb4c816ad32cd9 100644 (file)
@@ -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 */
 
 /*