Lines Matching full:b1

927  * Merge the lists in b0 and b1, using the 'sense' field to indicate
931 merge(struct block *b0, struct block *b1) in merge() argument
940 *p = b1; in merge()
1001 gen_and(struct block *b0, struct block *b1) in gen_and() argument
1003 backpatch(b0, b1->head); in gen_and()
1005 b1->sense = !b1->sense; in gen_and()
1006 merge(b1, b0); in gen_and()
1007 b1->sense = !b1->sense; in gen_and()
1008 b1->head = b0->head; in gen_and()
1012 gen_or(struct block *b0, struct block *b1) in gen_or() argument
1015 backpatch(b0, b1->head); in gen_or()
1017 merge(b1, b0); in gen_or()
1018 b1->head = b0->head; in gen_or()
1965 struct block *b0, *b1; in gen_ether_linktype() local
1986 b1 = gen_cmp(cstate, OR_LLC, 0, BPF_H, (ll_proto << 8) | ll_proto); in gen_ether_linktype()
1987 gen_and(b0, b1); in gen_ether_linktype()
1988 return b1; in gen_ether_linktype()
2024 b1 = gen_cmp(cstate, OR_LLC, 0, BPF_H, 0xFFFF); in gen_ether_linktype()
2025 gen_or(b0, b1); in gen_ether_linktype()
2032 gen_or(b0, b1); in gen_ether_linktype()
2047 gen_and(b0, b1); in gen_ether_linktype()
2055 gen_or(b0, b1); in gen_ether_linktype()
2056 return b1; in gen_ether_linktype()
2085 b1 = gen_snap(cstate, 0x080007, ETHERTYPE_ATALK); in gen_ether_linktype()
2087 b1 = gen_snap(cstate, 0x000000, ETHERTYPE_AARP); in gen_ether_linktype()
2088 gen_and(b0, b1); in gen_ether_linktype()
2097 gen_or(b0, b1); in gen_ether_linktype()
2098 return b1; in gen_ether_linktype()
2112 b1 = gen_cmp(cstate, OR_LINKTYPE, 2, BPF_B, ll_proto); in gen_ether_linktype()
2113 gen_and(b0, b1); in gen_ether_linktype()
2114 return b1; in gen_ether_linktype()
2200 struct block *b0, *b1; in gen_linux_sll_linktype() local
2220 b1 = gen_cmp(cstate, OR_LLC, 0, BPF_H, (ll_proto << 8) | ll_proto); in gen_linux_sll_linktype()
2221 gen_and(b0, b1); in gen_linux_sll_linktype()
2222 return b1; in gen_linux_sll_linktype()
2251 b1 = gen_snap(cstate, 0x000000, ETHERTYPE_IPX); in gen_linux_sll_linktype()
2252 gen_or(b0, b1); in gen_linux_sll_linktype()
2254 gen_and(b0, b1); in gen_linux_sll_linktype()
2261 gen_or(b0, b1); in gen_linux_sll_linktype()
2269 gen_or(b0, b1); in gen_linux_sll_linktype()
2270 return b1; in gen_linux_sll_linktype()
2298 b1 = gen_snap(cstate, 0x080007, ETHERTYPE_ATALK); in gen_linux_sll_linktype()
2300 b1 = gen_snap(cstate, 0x000000, ETHERTYPE_AARP); in gen_linux_sll_linktype()
2301 gen_and(b0, b1); in gen_linux_sll_linktype()
2310 gen_or(b0, b1); in gen_linux_sll_linktype()
2311 return b1; in gen_linux_sll_linktype()
2323 b1 = gen_cmp(cstate, OR_LINKHDR, cstate->off_linkpl.constant_part, BPF_B, in gen_linux_sll_linktype()
2325 gen_and(b0, b1); in gen_linux_sll_linktype()
2326 return b1; in gen_linux_sll_linktype()
3195 struct block *b0, *b1, *b2; in gen_linktype() local
3214 b1 = gen_ether_linktype(cstate, ll_proto); in gen_linktype()
3216 gen_and(b0, b1); in gen_linktype()
3217 return b1; in gen_linktype()
3246 b1 = gen_llc_linktype(cstate, ll_proto); in gen_linktype()
3247 gen_and(b0, b1); in gen_linktype()
3248 return b1; in gen_linktype()
3280 b1 = gen_llc_linktype(cstate, ll_proto); in gen_linktype()
3281 gen_and(b0, b1); in gen_linktype()
3282 return b1; in gen_linktype()
3361 b1 = gen_cmp(cstate, OR_LINKTYPE, 0, BPF_H, PPP_VJC); in gen_linktype()
3362 gen_or(b0, b1); in gen_linktype()
3364 gen_or(b1, b0); in gen_linktype()
3410 b1 = gen_loopback_linktype(cstate, BSD_AFNUM_INET6_FREEBSD); in gen_linktype()
3411 gen_or(b0, b1); in gen_linktype()
3413 gen_or(b0, b1); in gen_linktype()
3414 return (b1); in gen_linktype()
3484 b1 = gen_cmp(cstate, OR_LINKTYPE, 0, BPF_B, in gen_linktype()
3486 gen_or(b0, b1); in gen_linktype()
3487 return (b1); in gen_linktype()
3492 b1 = gen_cmp(cstate, OR_LINKTYPE, 0, BPF_B, in gen_linktype()
3494 gen_or(b0, b1); in gen_linktype()
3495 return (b1); in gen_linktype()
3548 b1 = gen_cmp(cstate, OR_LINKHDR, 2, BPF_H, (0x03<<8) | ISO9542_ESIS); in gen_linktype()
3550 gen_or(b1, b2); in gen_linktype()
3719 struct block *b0, *b1; in gen_llc_internal() local
3735 b1 = gen_cmp(cstate, OR_LLC, 0, BPF_H, 0xFFFF); in gen_llc_internal()
3736 gen_not(b1); in gen_llc_internal()
3737 gen_and(b0, b1); in gen_llc_internal()
3738 return b1; in gen_llc_internal()
3804 struct block *b0, *b1; in gen_llc_i() local
3824 b1 = new_block(cstate, JMP(BPF_JSET)); in gen_llc_i()
3825 b1->s.k = 0x01; in gen_llc_i()
3826 b1->stmts = s; in gen_llc_i()
3827 gen_not(b1); in gen_llc_i()
3828 gen_and(b0, b1); in gen_llc_i()
3829 return b1; in gen_llc_i()
3835 struct block *b0, *b1; in gen_llc_s() local
3853 b1 = gen_mcmp(cstate, OR_LLC, 2, BPF_B, LLC_S_FMT, 0x03); in gen_llc_s()
3854 gen_and(b0, b1); in gen_llc_s()
3855 return b1; in gen_llc_s()
3861 struct block *b0, *b1; in gen_llc_u() local
3879 b1 = gen_mcmp(cstate, OR_LLC, 2, BPF_B, LLC_U_FMT, 0x03); in gen_llc_u()
3880 gen_and(b0, b1); in gen_llc_u()
3881 return b1; in gen_llc_u()
3887 struct block *b0, *b1; in gen_llc_s_subtype() local
3904 b1 = gen_mcmp(cstate, OR_LLC, 2, BPF_B, subtype, LLC_S_CMD_MASK); in gen_llc_s_subtype()
3905 gen_and(b0, b1); in gen_llc_s_subtype()
3906 return b1; in gen_llc_s_subtype()
3912 struct block *b0, *b1; in gen_llc_u_subtype() local
3929 b1 = gen_mcmp(cstate, OR_LLC, 2, BPF_B, subtype, LLC_U_CMD_MASK); in gen_llc_u_subtype()
3930 gen_and(b0, b1); in gen_llc_u_subtype()
3931 return b1; in gen_llc_u_subtype()
4024 struct block *b0, *b1; in gen_hostop() local
4039 b1 = gen_hostop(cstate, addr, mask, Q_DST, ll_proto, src_off, dst_off); in gen_hostop()
4040 gen_and(b0, b1); in gen_hostop()
4041 return b1; in gen_hostop()
4046 b1 = gen_hostop(cstate, addr, mask, Q_DST, ll_proto, src_off, dst_off); in gen_hostop()
4047 gen_or(b0, b1); in gen_hostop()
4048 return b1; in gen_hostop()
4079 b1 = gen_mcmp(cstate, OR_LINKPL, offset, BPF_W, addr, mask); in gen_hostop()
4080 gen_and(b0, b1); in gen_hostop()
4081 return b1; in gen_hostop()
4090 struct block *b0, *b1; in gen_hostop6() local
4115 b1 = gen_hostop6(cstate, addr, mask, Q_DST, ll_proto, src_off, dst_off); in gen_hostop6()
4116 gen_and(b0, b1); in gen_hostop6()
4117 return b1; in gen_hostop6()
4122 b1 = gen_hostop6(cstate, addr, mask, Q_DST, ll_proto, src_off, dst_off); in gen_hostop6()
4123 gen_or(b0, b1); in gen_hostop6()
4124 return b1; in gen_hostop6()
4157 b1 = gen_mcmp(cstate, OR_LINKPL, offset + 12, BPF_W, ntohl(a[3]), ntohl(m[3])); in gen_hostop6()
4159 gen_and(b0, b1); in gen_hostop6()
4161 gen_and(b0, b1); in gen_hostop6()
4163 gen_and(b0, b1); in gen_hostop6()
4165 gen_and(b0, b1); in gen_hostop6()
4166 return b1; in gen_hostop6()
4173 register struct block *b0, *b1; in gen_ehostop() local
4184 b1 = gen_ehostop(cstate, eaddr, Q_DST); in gen_ehostop()
4185 gen_and(b0, b1); in gen_ehostop()
4186 return b1; in gen_ehostop()
4191 b1 = gen_ehostop(cstate, eaddr, Q_DST); in gen_ehostop()
4192 gen_or(b0, b1); in gen_ehostop()
4193 return b1; in gen_ehostop()
4229 struct block *b0, *b1; in gen_fhostop() local
4240 b1 = gen_fhostop(cstate, eaddr, Q_DST); in gen_fhostop()
4241 gen_and(b0, b1); in gen_fhostop()
4242 return b1; in gen_fhostop()
4247 b1 = gen_fhostop(cstate, eaddr, Q_DST); in gen_fhostop()
4248 gen_or(b0, b1); in gen_fhostop()
4249 return b1; in gen_fhostop()
4285 register struct block *b0, *b1; in gen_thostop() local
4296 b1 = gen_thostop(cstate, eaddr, Q_DST); in gen_thostop()
4297 gen_and(b0, b1); in gen_thostop()
4298 return b1; in gen_thostop()
4303 b1 = gen_thostop(cstate, eaddr, Q_DST); in gen_thostop()
4304 gen_or(b0, b1); in gen_thostop()
4305 return b1; in gen_thostop()
4342 register struct block *b0, *b1, *b2; in gen_wlanhostop() local
4383 b1 = new_block(cstate, JMP(BPF_JSET)); in gen_wlanhostop()
4384 b1->s.k = 0x01; /* To DS */ in gen_wlanhostop()
4385 b1->stmts = s; in gen_wlanhostop()
4391 gen_and(b1, b0); in gen_wlanhostop()
4406 b1 = gen_bcmp(cstate, OR_LINKHDR, 16, 6, eaddr); in gen_wlanhostop()
4407 gen_and(b2, b1); in gen_wlanhostop()
4414 gen_or(b1, b0); in gen_wlanhostop()
4421 b1 = new_block(cstate, JMP(BPF_JSET)); in gen_wlanhostop()
4422 b1->s.k = 0x02; /* From DS */ in gen_wlanhostop()
4423 b1->stmts = s; in gen_wlanhostop()
4424 gen_and(b1, b0); in gen_wlanhostop()
4438 b1 = gen_bcmp(cstate, OR_LINKHDR, 10, 6, eaddr); in gen_wlanhostop()
4439 gen_and(b2, b1); in gen_wlanhostop()
4446 gen_or(b1, b0); in gen_wlanhostop()
4453 b1 = new_block(cstate, JMP(BPF_JSET)); in gen_wlanhostop()
4454 b1->s.k = 0x08; in gen_wlanhostop()
4455 b1->stmts = s; in gen_wlanhostop()
4460 gen_and(b1, b0); in gen_wlanhostop()
4476 b1 = gen_bcmp(cstate, OR_LINKHDR, 10, 6, eaddr); in gen_wlanhostop()
4477 gen_and(b2, b1); in gen_wlanhostop()
4484 gen_or(b1, b0); in gen_wlanhostop()
4495 b1 = new_block(cstate, JMP(BPF_JSET)); in gen_wlanhostop()
4496 b1->s.k = 0x04; in gen_wlanhostop()
4497 b1->stmts = s; in gen_wlanhostop()
4498 gen_not(b1); in gen_wlanhostop()
4504 gen_and(b1, b0); in gen_wlanhostop()
4530 b1 = new_block(cstate, JMP(BPF_JSET)); in gen_wlanhostop()
4531 b1->s.k = 0x01; /* To DS */ in gen_wlanhostop()
4532 b1->stmts = s; in gen_wlanhostop()
4538 gen_and(b1, b0); in gen_wlanhostop()
4553 b1 = gen_bcmp(cstate, OR_LINKHDR, 4, 6, eaddr); in gen_wlanhostop()
4554 gen_and(b2, b1); in gen_wlanhostop()
4560 gen_or(b1, b0); in gen_wlanhostop()
4567 b1 = new_block(cstate, JMP(BPF_JSET)); in gen_wlanhostop()
4568 b1->s.k = 0x08; in gen_wlanhostop()
4569 b1->stmts = s; in gen_wlanhostop()
4574 gen_and(b1, b0); in gen_wlanhostop()
4590 b1 = gen_bcmp(cstate, OR_LINKHDR, 4, 6, eaddr); in gen_wlanhostop()
4591 gen_and(b2, b1); in gen_wlanhostop()
4598 gen_or(b1, b0); in gen_wlanhostop()
4609 b1 = new_block(cstate, JMP(BPF_JSET)); in gen_wlanhostop()
4610 b1->s.k = 0x04; in gen_wlanhostop()
4611 b1->stmts = s; in gen_wlanhostop()
4612 gen_not(b1); in gen_wlanhostop()
4618 gen_and(b1, b0); in gen_wlanhostop()
4623 b1 = gen_wlanhostop(cstate, eaddr, Q_DST); in gen_wlanhostop()
4624 gen_and(b0, b1); in gen_wlanhostop()
4625 return b1; in gen_wlanhostop()
4630 b1 = gen_wlanhostop(cstate, eaddr, Q_DST); in gen_wlanhostop()
4631 gen_or(b0, b1); in gen_wlanhostop()
4632 return b1; in gen_wlanhostop()
4647 b1 = gen_mcmp(cstate, OR_LINKHDR, 0, BPF_B, IEEE80211_FC0_SUBTYPE_CTS, in gen_wlanhostop()
4649 gen_not(b1); in gen_wlanhostop()
4653 gen_and(b1, b2); in gen_wlanhostop()
4655 b1 = gen_bcmp(cstate, OR_LINKHDR, 10, 6, eaddr); in gen_wlanhostop()
4656 gen_and(b2, b1); in gen_wlanhostop()
4657 return b1; in gen_wlanhostop()
4666 b1 = gen_bcmp(cstate, OR_LINKHDR, 16, 6, eaddr); in gen_wlanhostop()
4667 gen_and(b0, b1); in gen_wlanhostop()
4668 return b1; in gen_wlanhostop()
4679 b1 = gen_bcmp(cstate, OR_LINKHDR, 24, 6, eaddr); in gen_wlanhostop()
4680 gen_and(b0, b1); in gen_wlanhostop()
4681 return b1; in gen_wlanhostop()
4695 b1 = new_block(cstate, JMP(BPF_JSET)); in gen_wlanhostop()
4696 b1->s.k = 0x08; in gen_wlanhostop()
4697 b1->stmts = s; in gen_wlanhostop()
4707 gen_and(b1, b0); in gen_wlanhostop()
4722 b1 = gen_mcmp(cstate, OR_LINKHDR, 0, BPF_B, IEEE80211_FC0_SUBTYPE_CTS, in gen_wlanhostop()
4724 gen_not(b1); in gen_wlanhostop()
4728 gen_and(b1, b2); in gen_wlanhostop()
4737 b1 = new_block(cstate, JMP(BPF_JSET)); in gen_wlanhostop()
4738 b1->s.k = 0x08; in gen_wlanhostop()
4739 b1->stmts = s; in gen_wlanhostop()
4745 gen_and(b1, b2); in gen_wlanhostop()
4750 b1 = gen_bcmp(cstate, OR_LINKHDR, 10, 6, eaddr); in gen_wlanhostop()
4751 gen_and(b2, b1); in gen_wlanhostop()
4752 return b1; in gen_wlanhostop()
4766 register struct block *b0, *b1; in gen_ipfchostop() local
4777 b1 = gen_ipfchostop(cstate, eaddr, Q_DST); in gen_ipfchostop()
4778 gen_and(b0, b1); in gen_ipfchostop()
4779 return b1; in gen_ipfchostop()
4784 b1 = gen_ipfchostop(cstate, eaddr, Q_DST); in gen_ipfchostop()
4785 gen_or(b0, b1); in gen_ipfchostop()
4786 return b1; in gen_ipfchostop()
4837 struct block *b0, *b1, *b2, *tmp; in gen_dnhostop() local
4856 b1 = gen_dnhostop(cstate, addr, Q_DST); in gen_dnhostop()
4857 gen_and(b0, b1); in gen_dnhostop()
4858 return b1; in gen_dnhostop()
4864 b1 = gen_dnhostop(cstate, addr, Q_DST); in gen_dnhostop()
4865 gen_or(b0, b1); in gen_dnhostop()
4866 return b1; in gen_dnhostop()
4900 b1 = gen_cmp(cstate, OR_LINKPL, 2 + 1 + offset_lh, in gen_dnhostop()
4902 gen_and(tmp, b1); in gen_dnhostop()
4909 gen_or(b2, b1); in gen_dnhostop()
4916 gen_or(b2, b1); in gen_dnhostop()
4923 gen_or(b2, b1); in gen_dnhostop()
4926 gen_and(b0, b1); in gen_dnhostop()
4927 return b1; in gen_dnhostop()
4938 struct block *b0, *b1; in gen_mpls_linktype() local
4946 b1 = gen_mcmp(cstate, OR_LINKPL, 0, BPF_B, 0x40, 0xf0); in gen_mpls_linktype()
4947 gen_and(b0, b1); in gen_mpls_linktype()
4948 return b1; in gen_mpls_linktype()
4954 b1 = gen_mcmp(cstate, OR_LINKPL, 0, BPF_B, 0x60, 0xf0); in gen_mpls_linktype()
4955 gen_and(b0, b1); in gen_mpls_linktype()
4956 return b1; in gen_mpls_linktype()
4969 struct block *b0, *b1; in gen_host() local
4986 b1 = gen_host(cstate, addr, mask, Q_ARP, dir, type); in gen_host()
4987 gen_or(b0, b1); in gen_host()
4989 gen_or(b1, b0); in gen_host()
5262 struct block *b0, *b1, *tmp; in gen_gateway() local
5278 b1 = gen_prevlinkhdr_check(cstate); in gen_gateway()
5280 if (b1 != NULL) in gen_gateway()
5281 gen_and(b1, b0); in gen_gateway()
5311 b1 = NULL; in gen_gateway()
5331 if (b1 == NULL) { in gen_gateway()
5335 b1 = tmp; in gen_gateway()
5342 gen_or(b1, tmp); in gen_gateway()
5343 b1 = tmp; in gen_gateway()
5348 if (b1 == NULL) { in gen_gateway()
5354 gen_not(b1); in gen_gateway()
5355 gen_and(b0, b1); in gen_gateway()
5356 return b1; in gen_gateway()
5367 struct block *b1; in gen_proto_abbrev_internal() local
5372 b1 = gen_proto(cstate, IPPROTO_SCTP, Q_DEFAULT, Q_DEFAULT); in gen_proto_abbrev_internal()
5376 b1 = gen_proto(cstate, IPPROTO_TCP, Q_DEFAULT, Q_DEFAULT); in gen_proto_abbrev_internal()
5380 b1 = gen_proto(cstate, IPPROTO_UDP, Q_DEFAULT, Q_DEFAULT); in gen_proto_abbrev_internal()
5384 b1 = gen_proto(cstate, IPPROTO_ICMP, Q_IP, Q_DEFAULT); in gen_proto_abbrev_internal()
5392 b1 = gen_proto(cstate, IPPROTO_IGMP, Q_IP, Q_DEFAULT); in gen_proto_abbrev_internal()
5399 b1 = gen_proto(cstate, IPPROTO_IGRP, Q_IP, Q_DEFAULT); in gen_proto_abbrev_internal()
5407 b1 = gen_proto(cstate, IPPROTO_PIM, Q_DEFAULT, Q_DEFAULT); in gen_proto_abbrev_internal()
5415 b1 = gen_proto(cstate, IPPROTO_VRRP, Q_IP, Q_DEFAULT); in gen_proto_abbrev_internal()
5423 b1 = gen_proto(cstate, IPPROTO_CARP, Q_IP, Q_DEFAULT); in gen_proto_abbrev_internal()
5427 b1 = gen_linktype(cstate, ETHERTYPE_IP); in gen_proto_abbrev_internal()
5431 b1 = gen_linktype(cstate, ETHERTYPE_ARP); in gen_proto_abbrev_internal()
5435 b1 = gen_linktype(cstate, ETHERTYPE_REVARP); in gen_proto_abbrev_internal()
5442 b1 = gen_linktype(cstate, ETHERTYPE_ATALK); in gen_proto_abbrev_internal()
5446 b1 = gen_linktype(cstate, ETHERTYPE_AARP); in gen_proto_abbrev_internal()
5450 b1 = gen_linktype(cstate, ETHERTYPE_DN); in gen_proto_abbrev_internal()
5454 b1 = gen_linktype(cstate, ETHERTYPE_SCA); in gen_proto_abbrev_internal()
5458 b1 = gen_linktype(cstate, ETHERTYPE_LAT); in gen_proto_abbrev_internal()
5462 b1 = gen_linktype(cstate, ETHERTYPE_MOPDL); in gen_proto_abbrev_internal()
5466 b1 = gen_linktype(cstate, ETHERTYPE_MOPRC); in gen_proto_abbrev_internal()
5470 b1 = gen_linktype(cstate, ETHERTYPE_IPV6); in gen_proto_abbrev_internal()
5477 b1 = gen_proto(cstate, IPPROTO_ICMPV6, Q_IPV6, Q_DEFAULT); in gen_proto_abbrev_internal()
5484 b1 = gen_proto(cstate, IPPROTO_AH, Q_DEFAULT, Q_DEFAULT); in gen_proto_abbrev_internal()
5491 b1 = gen_proto(cstate, IPPROTO_ESP, Q_DEFAULT, Q_DEFAULT); in gen_proto_abbrev_internal()
5495 b1 = gen_linktype(cstate, LLCSAP_ISONS); in gen_proto_abbrev_internal()
5499 b1 = gen_proto(cstate, ISO9542_ESIS, Q_ISO, Q_DEFAULT); in gen_proto_abbrev_internal()
5503 b1 = gen_proto(cstate, ISO10589_ISIS, Q_ISO, Q_DEFAULT); in gen_proto_abbrev_internal()
5508 b1 = gen_proto(cstate, ISIS_PTP_IIH, Q_ISIS, Q_DEFAULT); /* FIXME extract the circuit-type bits */ in gen_proto_abbrev_internal()
5509 gen_or(b0, b1); in gen_proto_abbrev_internal()
5511 gen_or(b0, b1); in gen_proto_abbrev_internal()
5513 gen_or(b0, b1); in gen_proto_abbrev_internal()
5515 gen_or(b0, b1); in gen_proto_abbrev_internal()
5520 b1 = gen_proto(cstate, ISIS_PTP_IIH, Q_ISIS, Q_DEFAULT); /* FIXME extract the circuit-type bits */ in gen_proto_abbrev_internal()
5521 gen_or(b0, b1); in gen_proto_abbrev_internal()
5523 gen_or(b0, b1); in gen_proto_abbrev_internal()
5525 gen_or(b0, b1); in gen_proto_abbrev_internal()
5527 gen_or(b0, b1); in gen_proto_abbrev_internal()
5532 b1 = gen_proto(cstate, ISIS_L2_LAN_IIH, Q_ISIS, Q_DEFAULT); in gen_proto_abbrev_internal()
5533 gen_or(b0, b1); in gen_proto_abbrev_internal()
5535 gen_or(b0, b1); in gen_proto_abbrev_internal()
5540 b1 = gen_proto(cstate, ISIS_L2_LSP, Q_ISIS, Q_DEFAULT); in gen_proto_abbrev_internal()
5541 gen_or(b0, b1); in gen_proto_abbrev_internal()
5546 b1 = gen_proto(cstate, ISIS_L2_CSNP, Q_ISIS, Q_DEFAULT); in gen_proto_abbrev_internal()
5547 gen_or(b0, b1); in gen_proto_abbrev_internal()
5549 gen_or(b0, b1); in gen_proto_abbrev_internal()
5551 gen_or(b0, b1); in gen_proto_abbrev_internal()
5556 b1 = gen_proto(cstate, ISIS_L2_CSNP, Q_ISIS, Q_DEFAULT); in gen_proto_abbrev_internal()
5557 gen_or(b0, b1); in gen_proto_abbrev_internal()
5562 b1 = gen_proto(cstate, ISIS_L2_PSNP, Q_ISIS, Q_DEFAULT); in gen_proto_abbrev_internal()
5563 gen_or(b0, b1); in gen_proto_abbrev_internal()
5567 b1 = gen_proto(cstate, ISO8473_CLNP, Q_ISO, Q_DEFAULT); in gen_proto_abbrev_internal()
5571 b1 = gen_linktype(cstate, LLCSAP_8021D); in gen_proto_abbrev_internal()
5575 b1 = gen_linktype(cstate, LLCSAP_IPX); in gen_proto_abbrev_internal()
5579 b1 = gen_linktype(cstate, LLCSAP_NETBEUI); in gen_proto_abbrev_internal()
5588 return b1; in gen_proto_abbrev_internal()
5644 struct block *b0, *b1, *tmp; in gen_portop() local
5653 b1 = gen_portatom(cstate, 0, port); in gen_portop()
5657 b1 = gen_portatom(cstate, 2, port); in gen_portop()
5662 b1 = gen_portatom(cstate, 2, port); in gen_portop()
5663 gen_and(tmp, b1); in gen_portop()
5669 b1 = gen_portatom(cstate, 2, port); in gen_portop()
5670 gen_or(tmp, b1); in gen_portop()
5701 gen_and(b0, b1); in gen_portop()
5703 return b1; in gen_portop()
5709 struct block *b0, *b1, *tmp; in gen_port() local
5734 b1 = gen_portop(cstate, port, (u_int)ip_proto, dir); in gen_port()
5739 b1 = gen_portop(cstate, port, IPPROTO_UDP, dir); in gen_port()
5740 gen_or(tmp, b1); in gen_port()
5742 gen_or(tmp, b1); in gen_port()
5748 gen_and(b0, b1); in gen_port()
5749 return b1; in gen_port()
5755 struct block *b0, *b1, *tmp; in gen_portop6() local
5763 b1 = gen_portatom6(cstate, 0, port); in gen_portop6()
5767 b1 = gen_portatom6(cstate, 2, port); in gen_portop6()
5772 b1 = gen_portatom6(cstate, 2, port); in gen_portop6()
5773 gen_and(tmp, b1); in gen_portop6()
5779 b1 = gen_portatom6(cstate, 2, port); in gen_portop6()
5780 gen_or(tmp, b1); in gen_portop6()
5786 gen_and(b0, b1); in gen_portop6()
5788 return b1; in gen_portop6()
5794 struct block *b0, *b1, *tmp; in gen_port6() local
5803 b1 = gen_portop6(cstate, port, (u_int)ip_proto, dir); in gen_port6()
5808 b1 = gen_portop6(cstate, port, IPPROTO_UDP, dir); in gen_port6()
5809 gen_or(tmp, b1); in gen_port6()
5811 gen_or(tmp, b1); in gen_port6()
5817 gen_and(b0, b1); in gen_port6()
5818 return b1; in gen_port6()
5826 struct block *b1, *b2; in gen_portrangeatom() local
5839 b1 = gen_cmp_ge(cstate, OR_TRAN_IPV4, off, BPF_H, v1); in gen_portrangeatom()
5842 gen_and(b1, b2); in gen_portrangeatom()
5851 struct block *b0, *b1, *tmp; in gen_portrangeop() local
5860 b1 = gen_portrangeatom(cstate, 0, port1, port2); in gen_portrangeop()
5864 b1 = gen_portrangeatom(cstate, 2, port1, port2); in gen_portrangeop()
5869 b1 = gen_portrangeatom(cstate, 2, port1, port2); in gen_portrangeop()
5870 gen_and(tmp, b1); in gen_portrangeop()
5876 b1 = gen_portrangeatom(cstate, 2, port1, port2); in gen_portrangeop()
5877 gen_or(tmp, b1); in gen_portrangeop()
5908 gen_and(b0, b1); in gen_portrangeop()
5910 return b1; in gen_portrangeop()
5917 struct block *b0, *b1, *tmp; in gen_portrange() local
5926 b1 = gen_portrangeop(cstate, port1, port2, (bpf_u_int32)ip_proto, in gen_portrange()
5932 b1 = gen_portrangeop(cstate, port1, port2, IPPROTO_UDP, dir); in gen_portrange()
5933 gen_or(tmp, b1); in gen_portrange()
5935 gen_or(tmp, b1); in gen_portrange()
5941 gen_and(b0, b1); in gen_portrange()
5942 return b1; in gen_portrange()
5949 struct block *b1, *b2; in gen_portrangeatom6() local
5962 b1 = gen_cmp_ge(cstate, OR_TRAN_IPV6, off, BPF_H, v1); in gen_portrangeatom6()
5965 gen_and(b1, b2); in gen_portrangeatom6()
5974 struct block *b0, *b1, *tmp; in gen_portrangeop6() local
5982 b1 = gen_portrangeatom6(cstate, 0, port1, port2); in gen_portrangeop6()
5986 b1 = gen_portrangeatom6(cstate, 2, port1, port2); in gen_portrangeop6()
5991 b1 = gen_portrangeatom6(cstate, 2, port1, port2); in gen_portrangeop6()
5992 gen_and(tmp, b1); in gen_portrangeop6()
5998 b1 = gen_portrangeatom6(cstate, 2, port1, port2); in gen_portrangeop6()
5999 gen_or(tmp, b1); in gen_portrangeop6()
6005 gen_and(b0, b1); in gen_portrangeop6()
6007 return b1; in gen_portrangeop6()
6014 struct block *b0, *b1, *tmp; in gen_portrange6() local
6023 b1 = gen_portrangeop6(cstate, port1, port2, (bpf_u_int32)ip_proto, in gen_portrange6()
6029 b1 = gen_portrangeop6(cstate, port1, port2, IPPROTO_UDP, dir); in gen_portrange6()
6030 gen_or(tmp, b1); in gen_portrange6()
6032 gen_or(tmp, b1); in gen_portrange6()
6038 gen_and(b0, b1); in gen_portrange6()
6039 return b1; in gen_portrange6()
6389 struct block *b0, *b1; in gen_check_802_11_data_frame() local
6401 b1 = new_block(cstate, JMP(BPF_JSET)); in gen_check_802_11_data_frame()
6402 b1->s.k = 0x04; in gen_check_802_11_data_frame()
6403 b1->stmts = s; in gen_check_802_11_data_frame()
6404 gen_not(b1); in gen_check_802_11_data_frame()
6406 gen_and(b1, b0); in gen_check_802_11_data_frame()
6423 struct block *b0, *b1; in gen_proto() local
6432 b1 = gen_proto(cstate, v, Q_IPV6, dir); in gen_proto()
6433 gen_or(b0, b1); in gen_proto()
6434 return b1; in gen_proto()
6456 b1 = gen_cmp(cstate, OR_LINKPL, 9, BPF_B, v); in gen_proto()
6457 gen_and(b0, b1); in gen_proto()
6458 return b1; in gen_proto()
6523 b1 = gen_cmp(cstate, OR_LINKPL, 40, BPF_B, v); in gen_proto()
6524 gen_and(b2, b1); in gen_proto()
6526 gen_or(b2, b1); in gen_proto()
6527 gen_and(b0, b1); in gen_proto()
6528 return b1; in gen_proto()
6587 b1 = gen_cmp(cstate, OR_LINKPL_NOSNAP, 1, BPF_B, v); in gen_proto()
6588 gen_and(b0, b1); in gen_proto()
6589 return b1; in gen_proto()
6593 b1 = gen_cmp(cstate, OR_LINKPL_NOSNAP, 0, BPF_B, v); in gen_proto()
6594 gen_and(b0, b1); in gen_proto()
6595 return b1; in gen_proto()
6608 b1 = gen_cmp(cstate, OR_LINKPL_NOSNAP, 4, BPF_B, v); in gen_proto()
6609 gen_and(b0, b1); in gen_proto()
6610 return b1; in gen_proto()
8221 struct block *b0, *b1, *b2; in gen_broadcast() local
8242 b1 = gen_prevlinkhdr_check(cstate); in gen_broadcast()
8244 if (b1 != NULL) in gen_broadcast()
8245 gen_and(b1, b0); in gen_broadcast()
8274 b1 = gen_mcmp(cstate, OR_LINKPL, 16, BPF_W, 0, hostmask); in gen_broadcast()
8277 gen_or(b1, b2); in gen_broadcast()
8306 register struct block *b0, *b1, *b2; in gen_multicast() local
8328 b1 = gen_prevlinkhdr_check(cstate); in gen_multicast()
8331 if (b1 != NULL) in gen_multicast()
8332 gen_and(b1, b0); in gen_multicast()
8372 b1 = new_block(cstate, JMP(BPF_JSET)); in gen_multicast()
8373 b1->s.k = 0x01; /* To DS */ in gen_multicast()
8374 b1->stmts = s; in gen_multicast()
8380 gen_and(b1, b0); in gen_multicast()
8395 b1 = gen_mac_multicast(cstate, 4); in gen_multicast()
8396 gen_and(b2, b1); in gen_multicast()
8402 gen_or(b1, b0); in gen_multicast()
8409 b1 = new_block(cstate, JMP(BPF_JSET)); in gen_multicast()
8410 b1->s.k = 0x08; in gen_multicast()
8411 b1->stmts = s; in gen_multicast()
8416 gen_and(b1, b0); in gen_multicast()
8432 b1 = gen_mac_multicast(cstate, 4); in gen_multicast()
8433 gen_and(b2, b1); in gen_multicast()
8440 gen_or(b1, b0); in gen_multicast()
8451 b1 = new_block(cstate, JMP(BPF_JSET)); in gen_multicast()
8452 b1->s.k = 0x04; in gen_multicast()
8453 b1->stmts = s; in gen_multicast()
8454 gen_not(b1); in gen_multicast()
8460 gen_and(b1, b0); in gen_multicast()
8473 b1 = gen_cmp_ge(cstate, OR_LINKPL, 16, BPF_B, 224); in gen_multicast()
8474 gen_and(b0, b1); in gen_multicast()
8475 return b1; in gen_multicast()
8479 b1 = gen_cmp(cstate, OR_LINKPL, 24, BPF_B, 255); in gen_multicast()
8480 gen_and(b0, b1); in gen_multicast()
8481 return b1; in gen_multicast()
8937 register struct block *b0, *b1; in gen_ahostop() local
8949 b1 = gen_ahostop(cstate, eaddr, Q_DST); in gen_ahostop()
8950 gen_and(b0, b1); in gen_ahostop()
8951 return b1; in gen_ahostop()
8956 b1 = gen_ahostop(cstate, eaddr, Q_DST); in gen_ahostop()
8957 gen_or(b0, b1); in gen_ahostop()
8958 return b1; in gen_ahostop()
8991 struct block *b0, *b1; in gen_vlan_tpid_test() local
8995 b1 = gen_linktype(cstate, ETHERTYPE_8021AD); in gen_vlan_tpid_test()
8996 gen_or(b0,b1); in gen_vlan_tpid_test()
8997 b0 = b1; in gen_vlan_tpid_test()
8998 b1 = gen_linktype(cstate, ETHERTYPE_8021QINQ); in gen_vlan_tpid_test()
8999 gen_or(b0,b1); in gen_vlan_tpid_test()
9001 return b1; in gen_vlan_tpid_test()
9018 struct block *b0, *b1; in gen_vlan_no_bpf_extensions() local
9023 b1 = gen_vlan_vid_test(cstate, vlan_num); in gen_vlan_no_bpf_extensions()
9024 gen_and(b0, b1); in gen_vlan_no_bpf_extensions()
9025 b0 = b1; in gen_vlan_no_bpf_extensions()
9280 struct block *b0, *b1; in gen_mpls() local
9329 b1 = gen_mcmp(cstate, OR_LINKPL, 0, BPF_W, label_num, in gen_mpls()
9331 gen_and(b0, b1); in gen_mpls()
9332 b0 = b1; in gen_mpls()
9375 struct block *b0, *b1; in gen_pppoes() local
9395 b1 = gen_mcmp(cstate, OR_LINKPL, 0, BPF_W, sess_num, 0x0000ffff); in gen_pppoes()
9396 gen_and(b0, b1); in gen_pppoes()
9397 b0 = b1; in gen_pppoes()
9438 struct block *b0, *b1; in gen_geneve_check() local
9445 b1 = gen_mcmp(cstate, offrel, 8, BPF_B, 0, 0xc0); in gen_geneve_check()
9446 gen_and(b0, b1); in gen_geneve_check()
9447 b0 = b1; in gen_geneve_check()
9455 b1 = gen_mcmp(cstate, offrel, 12, BPF_W, vni, 0xffffff00); in gen_geneve_check()
9456 gen_and(b0, b1); in gen_geneve_check()
9457 b0 = b1; in gen_geneve_check()
9471 struct block *b0, *b1; in gen_geneve4() local
9485 b1 = new_block(cstate, BPF_JMP|BPF_JEQ|BPF_X); in gen_geneve4()
9486 b1->stmts = s; in gen_geneve4()
9487 b1->s.k = 0; in gen_geneve4()
9489 gen_and(b0, b1); in gen_geneve4()
9491 return b1; in gen_geneve4()
9497 struct block *b0, *b1; in gen_geneve6() local
9524 b1 = new_block(cstate, BPF_JMP|BPF_JEQ|BPF_X); in gen_geneve6()
9525 b1->stmts = s; in gen_geneve6()
9526 b1->s.k = 0; in gen_geneve6()
9528 gen_and(b0, b1); in gen_geneve6()
9530 return b1; in gen_geneve6()
9675 struct block *b0, *b1; in gen_geneve() local
9686 b1 = gen_geneve6(cstate, vni, has_vni); in gen_geneve()
9688 gen_or(b0, b1); in gen_geneve()
9689 b0 = b1; in gen_geneve()
9696 b1 = gen_true(cstate); in gen_geneve()
9697 sappend(s, b1->stmts); in gen_geneve()
9698 b1->stmts = s; in gen_geneve()
9700 gen_and(b0, b1); in gen_geneve()
9704 return b1; in gen_geneve()
9794 struct block *b0, *b1; in gen_atmtype_metac() local
9797 b1 = gen_atmfield_code_internal(cstate, A_VCI, 1, BPF_JEQ, 0); in gen_atmtype_metac()
9798 gen_and(b0, b1); in gen_atmtype_metac()
9799 return b1; in gen_atmtype_metac()
9805 struct block *b0, *b1; in gen_atmtype_sc() local
9808 b1 = gen_atmfield_code_internal(cstate, A_VCI, 5, BPF_JEQ, 0); in gen_atmtype_sc()
9809 gen_and(b0, b1); in gen_atmtype_sc()
9810 return b1; in gen_atmtype_sc()
9841 struct block *b0, *b1; in gen_atmtype_abbrev() local
9856 b1 = gen_atmtype_metac(cstate); in gen_atmtype_abbrev()
9864 b1 = gen_atmfield_code_internal(cstate, A_VCI, 2, BPF_JEQ, 0); in gen_atmtype_abbrev()
9865 gen_and(b0, b1); in gen_atmtype_abbrev()
9873 b1 = gen_atmfield_code_internal(cstate, A_VCI, 3, BPF_JEQ, 0); in gen_atmtype_abbrev()
9874 gen_and(b0, b1); in gen_atmtype_abbrev()
9882 b1 = gen_atmfield_code_internal(cstate, A_VCI, 4, BPF_JEQ, 0); in gen_atmtype_abbrev()
9883 gen_and(b0, b1); in gen_atmtype_abbrev()
9890 b1 = gen_atmtype_sc(cstate); in gen_atmtype_abbrev()
9898 b1 = gen_atmfield_code_internal(cstate, A_VCI, 16, BPF_JEQ, 0); in gen_atmtype_abbrev()
9899 gen_and(b0, b1); in gen_atmtype_abbrev()
9906 b1 = gen_atmfield_code_internal(cstate, A_PROTOTYPE, PT_LANE, BPF_JEQ, 0); in gen_atmtype_abbrev()
9929 b1 = gen_atmtype_llc(cstate); in gen_atmtype_abbrev()
9935 return b1; in gen_atmtype_abbrev()
9948 struct block *b0, *b1; in gen_mtp2type_abbrev() local
9976 b1 = gen_ncmp(cstate, OR_PACKET, cstate->off_li, BPF_B, in gen_mtp2type_abbrev()
9978 gen_and(b1, b0); in gen_mtp2type_abbrev()
10007 b1 = gen_ncmp(cstate, OR_PACKET, cstate->off_li_hsl, BPF_H, in gen_mtp2type_abbrev()
10009 gen_and(b1, b0); in gen_mtp2type_abbrev()
10145 struct block *b1; in gen_msg_abbrev() local
10154 b1 = gen_atmfield_code_internal(cstate, A_MSGTYPE, SETUP, BPF_JEQ, 0); in gen_msg_abbrev()
10158 b1 = gen_atmfield_code_internal(cstate, A_MSGTYPE, CALL_PROCEED, BPF_JEQ, 0); in gen_msg_abbrev()
10162 b1 = gen_atmfield_code_internal(cstate, A_MSGTYPE, CONNECT, BPF_JEQ, 0); in gen_msg_abbrev()
10166 b1 = gen_atmfield_code_internal(cstate, A_MSGTYPE, CONNECT_ACK, BPF_JEQ, 0); in gen_msg_abbrev()
10170 b1 = gen_atmfield_code_internal(cstate, A_MSGTYPE, RELEASE, BPF_JEQ, 0); in gen_msg_abbrev()
10174 b1 = gen_atmfield_code_internal(cstate, A_MSGTYPE, RELEASE_DONE, BPF_JEQ, 0); in gen_msg_abbrev()
10180 return b1; in gen_msg_abbrev()
10186 struct block *b0, *b1; in gen_atmmulti_abbrev() local
10202 b1 = gen_atmfield_code_internal(cstate, A_VCI, 4, BPF_JEQ, 0); in gen_atmmulti_abbrev()
10203 gen_or(b0, b1); in gen_atmmulti_abbrev()
10205 gen_and(b0, b1); in gen_atmmulti_abbrev()
10213 b1 = gen_atmfield_code_internal(cstate, A_VCI, 4, BPF_JEQ, 0); in gen_atmmulti_abbrev()
10214 gen_or(b0, b1); in gen_atmmulti_abbrev()
10216 gen_and(b0, b1); in gen_atmmulti_abbrev()
10227 b1 = gen_msg_abbrev(cstate, A_CALLPROCEED); in gen_atmmulti_abbrev()
10228 gen_or(b0, b1); in gen_atmmulti_abbrev()
10230 gen_or(b0, b1); in gen_atmmulti_abbrev()
10232 gen_or(b0, b1); in gen_atmmulti_abbrev()
10234 gen_or(b0, b1); in gen_atmmulti_abbrev()
10236 gen_or(b0, b1); in gen_atmmulti_abbrev()
10238 gen_and(b0, b1); in gen_atmmulti_abbrev()
10245 b1 = gen_msg_abbrev(cstate, A_CALLPROCEED); in gen_atmmulti_abbrev()
10246 gen_or(b0, b1); in gen_atmmulti_abbrev()
10248 gen_or(b0, b1); in gen_atmmulti_abbrev()
10250 gen_or(b0, b1); in gen_atmmulti_abbrev()
10252 gen_or(b0, b1); in gen_atmmulti_abbrev()
10254 gen_and(b0, b1); in gen_atmmulti_abbrev()
10260 return b1; in gen_atmmulti_abbrev()