• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-R7000-V1.0.7.12_1.2.5/ap/gpl/tcpdump-4.4.0/

Lines Matching refs:ip

49 #include "ip.h"
63 static int tcp_verify_signature(const struct ip *ip, const struct tcphdr *tp,
128 static int tcp_cksum(register const struct ip *ip,
132 return (nextproto4_cksum(ip, (const u_int8_t *)tp, len,
141 register const struct ip *ip;
154 ip = (struct ip *)bp2;
156 if (IP_V(ip) == 6)
164 ipaddr_string(&ip->ip_src),
165 ipaddr_string(&ip->ip_dst));
198 (u_char *)ip);
204 (u_char *)ip);
225 if (ip->ip_p == IPPROTO_TCP) {
227 ipaddr_string(&ip->ip_src),
229 ipaddr_string(&ip->ip_dst),
315 src = &ip->ip_src;
316 dst = &ip->ip_dst;
320 if (memcmp(src, dst, sizeof ip->ip_dst) > 0)
324 memcpy(&tha.src, dst, sizeof ip->ip_dst);
325 memcpy(&tha.dst, src, sizeof ip->ip_src);
328 memcpy(&tha.dst, dst, sizeof ip->ip_dst);
329 memcpy(&tha.src, src, sizeof ip->ip_src);
335 src = &ip->ip_src;
336 dst = &ip->ip_dst;
340 if (memcmp(src, dst, sizeof ip->ip_dst) > 0)
344 memcpy(&tha.src, dst, sizeof ip->ip_dst);
345 memcpy(&tha.dst, src, sizeof ip->ip_src);
348 memcpy(&tha.dst, dst, sizeof ip->ip_dst);
349 memcpy(&tha.src, src, sizeof ip->ip_src);
397 if (IP_V(ip) == 4) {
399 sum = tcp_cksum(ip, tp, length);
411 else if (IP_V(ip) == 6 && ip6->ip6_plen) {
545 switch (tcp_verify_signature(ip, tp,
733 tcp_verify_signature(const struct ip *ip, const struct tcphdr *tp,
763 if (IP_V(ip) == 4) {
764 MD5_Update(&ctx, (char *)&ip->ip_src, sizeof(ip->ip_src));
765 MD5_Update(&ctx, (char *)&ip->ip_dst, sizeof(ip->ip_dst));
767 MD5_Update(&ctx, (char *)&ip->ip_p, sizeof(ip->ip_p));
768 tlen = EXTRACT_16BITS(&ip->ip_len) - IP_HL(ip) * 4;
772 } else if (IP_V(ip) == 6) {
773 ip6 = (struct ip6_hdr *)ip;