-static void print_tcp_rst_data(netdissect_options *, register const u_char *sp, u_int length);
-static void print_tcp_fastopen_option(netdissect_options *ndo, register const u_char *cp,
+static void print_tcp_rst_data(netdissect_options *, const u_char *sp, u_int length);
+static void print_tcp_fastopen_option(netdissect_options *ndo, const u_char *cp,
{
return nextproto4_cksum(ndo, ip, (const uint8_t *)tp, len, len,
IPPROTO_TCP);
{
return nextproto4_cksum(ndo, ip, (const uint8_t *)tp, len, len,
IPPROTO_TCP);
- register const struct ip6_hdr *ip6,
- register const struct tcphdr *tp,
- register u_int len)
+ const struct ip6_hdr *ip6,
+ const struct tcphdr *tp,
+ u_int len)
{
return nextproto6_cksum(ndo, ip6, (const uint8_t *)tp, len, len,
IPPROTO_TCP);
{
return nextproto6_cksum(ndo, ip6, (const uint8_t *)tp, len, len,
IPPROTO_TCP);
- register const u_char *bp, register u_int length,
- register const u_char *bp2, int fragmented)
+ const u_char *bp, u_int length,
+ const u_char *bp2, int fragmented)
uint16_t sport, dport, win, urp;
uint32_t seq, ack, thseq, thack;
u_int utoval;
uint16_t magic;
uint16_t sport, dport, win, urp;
uint32_t seq, ack, thseq, thack;
u_int utoval;
uint16_t magic;
ND_PRINT((ndo, "%s.%s > %s.%s: ",
ip6addr_string(ndo, &ip6->ip6_src),
tcpport_string(ndo, sport),
ND_PRINT((ndo, "%s.%s > %s.%s: ",
ip6addr_string(ndo, &ip6->ip6_src),
tcpport_string(ndo, sport),
- seq = EXTRACT_BE_U_4(&tp->th_seq);
- ack = EXTRACT_BE_U_4(&tp->th_ack);
- win = EXTRACT_BE_U_2(&tp->th_win);
- urp = EXTRACT_BE_U_2(&tp->th_urp);
+ seq = EXTRACT_BE_U_4(tp->th_seq);
+ ack = EXTRACT_BE_U_4(tp->th_ack);
+ win = EXTRACT_BE_U_2(tp->th_win);
+ urp = EXTRACT_BE_U_2(tp->th_urp);
sum = tcp_cksum(ndo, ip, tp, length);
sum = tcp_cksum(ndo, ip, tp, length);
ND_PRINT((ndo, ", cksum 0x%04x", tcp_sum));
if (sum != 0)
ND_PRINT((ndo, ", cksum 0x%04x", tcp_sum));
if (sum != 0)
ND_PRINT((ndo, " (correct)"));
}
} else if (IP_V(ip) == 6 && ip6->ip6_plen) {
ND_PRINT((ndo, " (correct)"));
}
} else if (IP_V(ip) == 6 && ip6->ip6_plen) {
sum = tcp6_cksum(ndo, ip6, tp, length);
sum = tcp6_cksum(ndo, ip6, tp, length);
ND_PRINT((ndo, ", cksum 0x%04x", tcp_sum));
if (sum != 0)
ND_PRINT((ndo, ", cksum 0x%04x", tcp_sum));
if (sum != 0)
MD5_Update(&ctx, (const char *)&ip->ip_dst, sizeof(ip->ip_dst));
MD5_Update(&ctx, (const char *)&zero_proto, sizeof(zero_proto));
MD5_Update(&ctx, (const char *)&ip->ip_p, sizeof(ip->ip_p));
MD5_Update(&ctx, (const char *)&ip->ip_dst, sizeof(ip->ip_dst));
MD5_Update(&ctx, (const char *)&zero_proto, sizeof(zero_proto));
MD5_Update(&ctx, (const char *)&ip->ip_p, sizeof(ip->ip_p));
tlen = htons(tlen);
MD5_Update(&ctx, (const char *)&tlen, sizeof(tlen));
} else if (IP_V(ip) == 6) {
ip6 = (const struct ip6_hdr *)ip;
MD5_Update(&ctx, (const char *)&ip6->ip6_src, sizeof(ip6->ip6_src));
MD5_Update(&ctx, (const char *)&ip6->ip6_dst, sizeof(ip6->ip6_dst));
tlen = htons(tlen);
MD5_Update(&ctx, (const char *)&tlen, sizeof(tlen));
} else if (IP_V(ip) == 6) {
ip6 = (const struct ip6_hdr *)ip;
MD5_Update(&ctx, (const char *)&ip6->ip6_src, sizeof(ip6->ip6_src));
MD5_Update(&ctx, (const char *)&ip6->ip6_dst, sizeof(ip6->ip6_dst));
MD5_Update(&ctx, (const char *)&len32, sizeof(len32));
nxt = 0;
MD5_Update(&ctx, (const char *)&nxt, sizeof(nxt));
MD5_Update(&ctx, (const char *)&len32, sizeof(len32));
nxt = 0;
MD5_Update(&ctx, (const char *)&nxt, sizeof(nxt));