Lines Matching defs:iphdr
201 static INLINING bool pkt_skip_ipv4_options(buf_t *buf, const struct iphdr *ipv4)
210 static INLINING bool ipv4_is_fragment(const struct iphdr *ip)
216 static __always_inline struct iphdr *pkt_parse_ipv4(buf_t *pkt, struct iphdr *scratch)
218 struct iphdr *ipv4 = buf_assign(pkt, sizeof(*ipv4), scratch);
260 static INLINING void pkt_ipv4_checksum(struct iphdr *iph)
269 _Static_assert(sizeof(struct iphdr) == 20, "iphdr must be 20 bytes");
274 for (size_t i = 0; i < sizeof(struct iphdr) / 2; i++) {
411 payload_off - sizeof(struct ethhdr) - sizeof(struct iphdr);
453 skb, payload_off + offsetof(struct iphdr, ttl), &ttl,
470 skb, payload_off + offsetof(struct iphdr, check), ttl,
479 skb, payload_off + offsetof(struct iphdr, ttl), &ttl, 1,
614 * fill_tuple(&t, foo, sizeof(struct iphdr), 123, 321)
625 case sizeof(struct iphdr): {
626 struct iphdr *ipv4 = (struct iphdr *)iph;
667 uint64_t iphlen = sizeof(struct iphdr);
741 struct iphdr _ip4;
742 const struct iphdr *ipv4 = pkt_parse_ipv4(pkt, &_ip4);
861 struct iphdr _ip4;
862 struct iphdr *ipv4 = pkt_parse_ipv4(pkt, &_ip4);