Home | History | Annotate | Download | only in server

Lines Matching defs:header

56             struct tcphdr header;
57 if (extract(payload, header) < sizeof(struct tcphdr)) {
60 args.srcPort = ntohs(header.th_sport);
61 args.dstPort = ntohs(header.th_dport);
65 struct udphdr header;
66 if (extract(payload, header) < sizeof(struct udphdr)) {
69 args.srcPort = ntohs(header.uh_sport);
70 args.dstPort = ntohs(header.uh_dport);
81 struct iphdr header;
82 if (extract(payload, header) < sizeof(struct iphdr)) {
85 args.ipNextHeader = header.protocol;
87 inet_ntop(AF_INET, &header.saddr, addr, sizeof(addr));
89 inet_ntop(AF_INET, &header.daddr, addr, sizeof(addr));
91 extractIpPorts(args, drop(payload, header.ihl * 4)); // ipv4 IHL counts 32 bit words.
95 struct ip6_hdr header;
96 if (extract(payload, header) < sizeof(struct ip6_hdr)) {
99 args.ipNextHeader = header.ip6_nxt;
101 inet_ntop(AF_INET6, &header.ip6_src, addr, sizeof(addr));
103 inet_ntop(AF_INET6, &header.ip6_dst, addr, sizeof(addr));
107 extractIpPorts(args, drop(payload, sizeof(header)));