X-Git-Url: https://git.tcpdump.org/tcpdump/blobdiff_plain/1a90fd99d279d63242419a30ba3e0720872bff75..0f328b4aa16b0b47f05a85c440ce1d07719e3cac:/print-tcp.c diff --git a/print-tcp.c b/print-tcp.c index 59e343ae..67c15edd 100644 --- a/print-tcp.c +++ b/print-tcp.c @@ -76,8 +76,8 @@ struct tha { struct tcp_seq_hash { struct tcp_seq_hash *nxt; struct tha addr; - tcp_seq seq; - tcp_seq ack; + uint32_t seq; + uint32_t ack; }; struct tha6 { @@ -89,8 +89,8 @@ struct tha6 { struct tcp_seq_hash6 { struct tcp_seq_hash6 *nxt; struct tha6 addr; - tcp_seq seq; - tcp_seq ack; + uint32_t seq; + uint32_t ack; }; #define TSEQ_HASHSIZE 919 @@ -202,7 +202,7 @@ tcp_print(netdissect_options *ndo, tcpport_string(ndo, sport), tcpport_string(ndo, dport))); } } else { - if (ip->ip_p == IPPROTO_TCP) { + if (EXTRACT_U_1(ip->ip_p) == IPPROTO_TCP) { ND_PRINT((ndo, "%s.%s > %s.%s: ", ipaddr_string(ndo, &ip->ip_src), tcpport_string(ndo, sport), @@ -238,7 +238,7 @@ tcp_print(netdissect_options *ndo, return; } - flags = tp->th_flags; + flags = EXTRACT_U_1(tp->th_flags); ND_PRINT((ndo, "Flags [%s]", bittok2str_nosep(tcp_flag_values, "none", flags))); if (!ndo->ndo_Sflag && (flags & TH_ACK)) { @@ -428,13 +428,13 @@ tcp_print(netdissect_options *ndo, while (hlen > 0) { if (ch != '\0') ND_PRINT((ndo, "%c", ch)); - ND_TCHECK(*cp); + ND_TCHECK_1(cp); opt = EXTRACT_U_1(cp); cp++; if (ZEROLENOPT(opt)) len = 1; else { - ND_TCHECK(*cp); + ND_TCHECK_1(cp); len = EXTRACT_U_1(cp); cp++; /* total including type, len */ if (len < 2 || len > hlen) @@ -461,7 +461,7 @@ tcp_print(netdissect_options *ndo, case TCPOPT_WSCALE: datalen = 1; LENCHECK(datalen); - ND_PRINT((ndo, " %u", *cp)); + ND_PRINT((ndo, " %u", EXTRACT_U_1(cp))); break; case TCPOPT_SACK: