D | dump.c | 136 void dump_udp_generic(const struct udphdr *udp, uint32_t temp_checksum, const uint8_t *payload, in dump_udp_generic() argument 140 temp_checksum = ip_checksum_add(temp_checksum, udp, sizeof(struct udphdr)); in dump_udp_generic() 145 printf("source = %x\n", ntohs(udp->source)); in dump_udp_generic() 146 printf("dest = %x\n", ntohs(udp->dest)); in dump_udp_generic() 147 printf("len = %x\n", ntohs(udp->len)); in dump_udp_generic() 148 printf("check = %x (mine %x)\n", udp->check, my_checksum); in dump_udp_generic() 152 void dump_udp(const struct udphdr *udp, const struct iphdr *ip, const uint8_t *payload, in dump_udp() argument 155 temp_checksum = ipv4_pseudo_header_checksum(ip, sizeof(*udp) + payload_size); in dump_udp() 156 dump_udp_generic(udp, temp_checksum, payload, payload_size); in dump_udp() 160 void dump_udp6(const struct udphdr *udp, const struct ip6_hdr *ip6, const uint8_t *payload, in dump_udp6() argument [all …]
|