Lines Matching refs:ofs
2 * Compares a (Q)NAME starting at udp[*ofs] with the target name.
9 * @param ofs - non-NULL - pointer to the offset of the beginning of the (Q)NAME.
19 u32* const ofs)) {
20 u32 first_unread_offset = *ofs;
27 if (*ofs >= udp_len) return error_packet;
28 v = udp[(*ofs)++];
32 if (*ofs >= udp_len) return error_packet;
33 w = udp[(*ofs)++];
34 if (*ofs > first_unread_offset) first_unread_offset = *ofs;
36 if (new_ofs >= *ofs) return error_packet; /* RFC 1035 4.1.4 allows only backward pointers */
37 *ofs = new_ofs;
42 if (*ofs + label_size > udp_len) return error_packet;
49 u8 w = udp[(*ofs)++];
54 *ofs += label_size;
58 *ofs += label_size;
61 if (first_unread_offset > *ofs) *ofs = first_unread_offset;
95 u32 i, ofs = 12; /* dns header is 12 bytes */
100 match_result_type m = match_single_name(needles, needle_bound, udp, udp_len, &ofs);
103 if (ofs + 2 > udp_len) return error_packet;
104 qtype = (int)read_be16(udp + ofs);
105 ofs += 4; /* skip be16 qtype & qclass */
112 match_result_type m = match_single_name(needles, needle_bound, udp, udp_len, &ofs);
114 ofs += 8; /* skip be16 type, class & be32 ttl */
115 if (ofs + 2 > udp_len) return error_packet;
116 ofs += 2 + read_be16(udp + ofs); /* skip be16 rdata length field, plus length bytes */