Lines Matching refs:ofs
406 u32* const ofs)) { in FUNC() argument
407 u32 first_unread_offset = *ofs; in FUNC()
414 if (*ofs >= udp_len) return error_packet; in FUNC()
415 v = udp[(*ofs)++]; in FUNC()
419 if (*ofs >= udp_len) return error_packet; in FUNC()
420 w = udp[(*ofs)++]; in FUNC()
421 if (*ofs > first_unread_offset) first_unread_offset = *ofs; in FUNC()
423 … if (new_ofs >= *ofs) return error_packet; /* RFC 1035 4.1.4 allows only backward pointers */ in FUNC()
424 *ofs = new_ofs; in FUNC()
429 if (*ofs + label_size > udp_len) return error_packet; in FUNC()
436 u8 w = udp[(*ofs)++]; in FUNC()
441 *ofs += label_size; in FUNC()
445 *ofs += label_size; in FUNC()
448 if (first_unread_offset > *ofs) *ofs = first_unread_offset; in FUNC()
482 u32 i, ofs = 12; /* dns header is 12 bytes */ in FUNC() local
487 … match_result_type m = apf_internal_match_single_name(needles, needle_bound, udp, udp_len, &ofs); in FUNC()
490 if (ofs + 2 > udp_len) return error_packet; in FUNC()
491 qtype = (int)read_be16(udp + ofs); in FUNC()
492 ofs += 4; /* skip be16 qtype & qclass */ in FUNC()
499 … match_result_type m = apf_internal_match_single_name(needles, needle_bound, udp, udp_len, &ofs); in FUNC()
501 ofs += 8; /* skip be16 type, class & be32 ttl */ in FUNC()
502 if (ofs + 2 > udp_len) return error_packet; in FUNC()
503 ofs += 2 + read_be16(udp + ofs); /* skip be16 rdata length field, plus length bytes */ in FUNC()
667 static u8 read_packet_u8(apf_context* ctx, u32 ofs) { in read_packet_u8() argument
668 return ctx->packet[ofs]; in read_packet_u8()