Lines Matching refs:off
118 int off, int offmask) in pack_key() argument
126 if (sel->keys[i].off == off && sel->keys[i].offmask == offmask) { in pack_key()
139 if (off % 4) in pack_key()
143 sel->keys[hwm].off = off; in pack_key()
150 int off, int offmask) in pack_key32() argument
154 return pack_key(sel, key, mask, off, offmask); in pack_key32()
158 int off, int offmask) in pack_key16() argument
163 if ((off & 3) == 0) { in pack_key16()
167 off &= ~3; in pack_key16()
171 return pack_key(sel, key, mask, off, offmask); in pack_key16()
174 static int pack_key8(struct tc_u32_sel *sel, __u32 key, __u32 mask, int off, int offmask) in pack_key8() argument
179 if ((off & 3) == 0) { in pack_key8()
182 } else if ((off & 3) == 1) { in pack_key8()
185 } else if ((off & 3) == 2) { in pack_key8()
189 off &= ~3; in pack_key8()
193 return pack_key(sel, key, mask, off, offmask); in pack_key8()
197 static int parse_at(int *argc_p, char ***argv_p, int *off, int *offmask) in parse_at() argument
216 if (get_integer(off, p, 0)) in parse_at()
227 int off, int offmask) in parse_u32() argument
248 if (parse_at(&argc, &argv, &off, &offmask)) in parse_u32()
252 res = pack_key32(sel, key, mask, off, offmask); in parse_u32()
259 int off, int offmask) in parse_u16() argument
280 if (parse_at(&argc, &argv, &off, &offmask)) in parse_u16()
283 res = pack_key16(sel, key, mask, off, offmask); in parse_u16()
290 int off, int offmask) in parse_u8() argument
314 if (parse_at(&argc, &argv, &off, &offmask)) in parse_u8()
318 res = pack_key8(sel, key, mask, off, offmask); in parse_u8()
325 int off) in parse_ip_addr() argument
343 if (parse_at(&argc, &argv, &off, &offmask)) in parse_ip_addr()
350 if (pack_key(sel, addr.data[0], mask, off, offmask) < 0) in parse_ip_addr()
360 struct tc_u32_sel *sel, int off) in parse_ip6_addr() argument
379 if (parse_at(&argc, &argv, &off, &offmask)) in parse_ip6_addr()
388 0xFFFFFFFF, off + 4 * (i / 32), offmask); in parse_ip6_addr()
394 mask, off + 4 * (i / 32), offmask); in parse_ip6_addr()
413 int off = 0; in parse_ip6_class() local
435 res = pack_key(sel, key, mask, off, offmask); in parse_ip6_class()
445 struct tc_u32_sel *sel, int off) in parse_ether_addr() argument
468 if (parse_at(&argc, &argv, &off, &offmask)) in parse_ether_addr()
473 res = pack_key8(sel, addr[i], 0xFF, off + i, offmask); in parse_ether_addr()
748 int off; in parse_offset() local
750 if (get_integer(&off, *argv, 0)) in parse_offset()
752 sel->off = off; in parse_offset()
755 int off; in parse_offset() local
757 if (get_integer(&off, *argv, 0)) in parse_offset()
759 sel->offoff = off; in parse_offset()
760 if (off%2) { in parse_offset()
827 switch (key->off) { in print_ipv4()
849 key->off == 12 ? "match IP src" : "match IP dst", in print_ipv4()
883 switch (key->off) { in print_ipv6()
905 key->off == 12 ? "match IP src" : "match IP dst", in print_ipv6()
941 key->off); in print_raw()
1261 if (sel->off) in u32_print_opt()
1262 fprintf(f, "plus %d ", sel->off); in u32_print_opt()