Lines Matching refs:b1
842 merge(struct block *b0, struct block *b1) in merge() argument
851 *p = b1; in merge()
904 gen_and(struct block *b0, struct block *b1) in gen_and() argument
906 backpatch(b0, b1->head); in gen_and()
908 b1->sense = !b1->sense; in gen_and()
909 merge(b1, b0); in gen_and()
910 b1->sense = !b1->sense; in gen_and()
911 b1->head = b0->head; in gen_and()
915 gen_or(struct block *b0, struct block *b1) in gen_or() argument
918 backpatch(b0, b1->head); in gen_or()
920 merge(b1, b0); in gen_or()
921 b1->head = b0->head; in gen_or()
1849 struct block *b0, *b1; in gen_ether_linktype() local
1870 b1 = gen_cmp(cstate, OR_LLC, 0, BPF_H, (bpf_int32) in gen_ether_linktype()
1872 gen_and(b0, b1); in gen_ether_linktype()
1873 return b1; in gen_ether_linktype()
1909 b1 = gen_cmp(cstate, OR_LLC, 0, BPF_H, (bpf_int32)0xFFFF); in gen_ether_linktype()
1910 gen_or(b0, b1); in gen_ether_linktype()
1917 gen_or(b0, b1); in gen_ether_linktype()
1932 gen_and(b0, b1); in gen_ether_linktype()
1940 gen_or(b0, b1); in gen_ether_linktype()
1941 return b1; in gen_ether_linktype()
1970 b1 = gen_snap(cstate, 0x080007, ETHERTYPE_ATALK); in gen_ether_linktype()
1972 b1 = gen_snap(cstate, 0x000000, ETHERTYPE_AARP); in gen_ether_linktype()
1973 gen_and(b0, b1); in gen_ether_linktype()
1982 gen_or(b0, b1); in gen_ether_linktype()
1983 return b1; in gen_ether_linktype()
1997 b1 = gen_cmp(cstate, OR_LINKTYPE, 2, BPF_B, (bpf_int32)proto); in gen_ether_linktype()
1998 gen_and(b0, b1); in gen_ether_linktype()
1999 return b1; in gen_ether_linktype()
2087 struct block *b0, *b1; in gen_linux_sll_linktype() local
2107 b1 = gen_cmp(cstate, OR_LLC, 0, BPF_H, (bpf_int32) in gen_linux_sll_linktype()
2109 gen_and(b0, b1); in gen_linux_sll_linktype()
2110 return b1; in gen_linux_sll_linktype()
2139 b1 = gen_snap(cstate, 0x000000, ETHERTYPE_IPX); in gen_linux_sll_linktype()
2140 gen_or(b0, b1); in gen_linux_sll_linktype()
2142 gen_and(b0, b1); in gen_linux_sll_linktype()
2149 gen_or(b0, b1); in gen_linux_sll_linktype()
2157 gen_or(b0, b1); in gen_linux_sll_linktype()
2158 return b1; in gen_linux_sll_linktype()
2186 b1 = gen_snap(cstate, 0x080007, ETHERTYPE_ATALK); in gen_linux_sll_linktype()
2188 b1 = gen_snap(cstate, 0x000000, ETHERTYPE_AARP); in gen_linux_sll_linktype()
2189 gen_and(b0, b1); in gen_linux_sll_linktype()
2198 gen_or(b0, b1); in gen_linux_sll_linktype()
2199 return b1; in gen_linux_sll_linktype()
2211 b1 = gen_cmp(cstate, OR_LINKHDR, cstate->off_linkpl.constant_part, BPF_B, in gen_linux_sll_linktype()
2213 gen_and(b0, b1); in gen_linux_sll_linktype()
2214 return b1; in gen_linux_sll_linktype()
3026 struct block *b0, *b1, *b2; in gen_linktype() local
3060 b1 = gen_ether_linktype(cstate, proto); in gen_linktype()
3062 gen_and(b0, b1); in gen_linktype()
3063 return b1; in gen_linktype()
3094 b1 = gen_llc_linktype(cstate, proto); in gen_linktype()
3095 gen_and(b0, b1); in gen_linktype()
3096 return b1; in gen_linktype()
3132 b1 = gen_llc_linktype(cstate, proto); in gen_linktype()
3133 gen_and(b0, b1); in gen_linktype()
3134 return b1; in gen_linktype()
3219 b1 = gen_cmp(cstate, OR_LINKTYPE, 0, BPF_H, PPP_VJC); in gen_linktype()
3220 gen_or(b0, b1); in gen_linktype()
3222 gen_or(b1, b0); in gen_linktype()
3270 b1 = gen_loopback_linktype(cstate, BSD_AFNUM_INET6_FREEBSD); in gen_linktype()
3271 gen_or(b0, b1); in gen_linktype()
3273 gen_or(b0, b1); in gen_linktype()
3274 return (b1); in gen_linktype()
3347 b1 = gen_cmp(cstate, OR_LINKTYPE, 0, BPF_B, in gen_linktype()
3349 gen_or(b0, b1); in gen_linktype()
3350 return (b1); in gen_linktype()
3355 b1 = gen_cmp(cstate, OR_LINKTYPE, 0, BPF_B, in gen_linktype()
3357 gen_or(b0, b1); in gen_linktype()
3358 return (b1); in gen_linktype()
3413 b1 = gen_cmp(cstate, OR_LINKHDR, 2, BPF_H, (0x03<<8) | ISO9542_ESIS); in gen_linktype()
3415 gen_or(b1, b2); in gen_linktype()
3587 struct block *b0, *b1; in gen_llc() local
3603 b1 = gen_cmp(cstate, OR_LLC, 0, BPF_H, (bpf_int32)0xFFFF); in gen_llc()
3604 gen_not(b1); in gen_llc()
3605 gen_and(b0, b1); in gen_llc()
3606 return b1; in gen_llc()
3658 struct block *b0, *b1; in gen_llc_i() local
3671 b1 = new_block(cstate, JMP(BPF_JSET)); in gen_llc_i()
3672 b1->s.k = 0x01; in gen_llc_i()
3673 b1->stmts = s; in gen_llc_i()
3674 gen_not(b1); in gen_llc_i()
3675 gen_and(b0, b1); in gen_llc_i()
3676 return b1; in gen_llc_i()
3682 struct block *b0, *b1; in gen_llc_s() local
3693 b1 = gen_mcmp(cstate, OR_LLC, 2, BPF_B, LLC_S_FMT, 0x03); in gen_llc_s()
3694 gen_and(b0, b1); in gen_llc_s()
3695 return b1; in gen_llc_s()
3701 struct block *b0, *b1; in gen_llc_u() local
3712 b1 = gen_mcmp(cstate, OR_LLC, 2, BPF_B, LLC_U_FMT, 0x03); in gen_llc_u()
3713 gen_and(b0, b1); in gen_llc_u()
3714 return b1; in gen_llc_u()
3720 struct block *b0, *b1; in gen_llc_s_subtype() local
3730 b1 = gen_mcmp(cstate, OR_LLC, 2, BPF_B, subtype, LLC_S_CMD_MASK); in gen_llc_s_subtype()
3731 gen_and(b0, b1); in gen_llc_s_subtype()
3732 return b1; in gen_llc_s_subtype()
3738 struct block *b0, *b1; in gen_llc_u_subtype() local
3748 b1 = gen_mcmp(cstate, OR_LLC, 2, BPF_B, subtype, LLC_U_CMD_MASK); in gen_llc_u_subtype()
3749 gen_and(b0, b1); in gen_llc_u_subtype()
3750 return b1; in gen_llc_u_subtype()
3844 struct block *b0, *b1; in gen_hostop() local
3859 b1 = gen_hostop(cstate, addr, mask, Q_DST, proto, src_off, dst_off); in gen_hostop()
3860 gen_and(b0, b1); in gen_hostop()
3861 return b1; in gen_hostop()
3866 b1 = gen_hostop(cstate, addr, mask, Q_DST, proto, src_off, dst_off); in gen_hostop()
3867 gen_or(b0, b1); in gen_hostop()
3868 return b1; in gen_hostop()
3898 b1 = gen_mcmp(cstate, OR_LINKPL, offset, BPF_W, (bpf_int32)addr, mask); in gen_hostop()
3899 gen_and(b0, b1); in gen_hostop()
3900 return b1; in gen_hostop()
3908 struct block *b0, *b1; in gen_hostop6() local
3924 b1 = gen_hostop6(cstate, addr, mask, Q_DST, proto, src_off, dst_off); in gen_hostop6()
3925 gen_and(b0, b1); in gen_hostop6()
3926 return b1; in gen_hostop6()
3931 b1 = gen_hostop6(cstate, addr, mask, Q_DST, proto, src_off, dst_off); in gen_hostop6()
3932 gen_or(b0, b1); in gen_hostop6()
3933 return b1; in gen_hostop6()
3965 b1 = gen_mcmp(cstate, OR_LINKPL, offset + 12, BPF_W, ntohl(a[3]), ntohl(m[3])); in gen_hostop6()
3967 gen_and(b0, b1); in gen_hostop6()
3969 gen_and(b0, b1); in gen_hostop6()
3971 gen_and(b0, b1); in gen_hostop6()
3973 gen_and(b0, b1); in gen_hostop6()
3974 return b1; in gen_hostop6()
3981 register struct block *b0, *b1; in gen_ehostop() local
3992 b1 = gen_ehostop(cstate, eaddr, Q_DST); in gen_ehostop()
3993 gen_and(b0, b1); in gen_ehostop()
3994 return b1; in gen_ehostop()
3999 b1 = gen_ehostop(cstate, eaddr, Q_DST); in gen_ehostop()
4000 gen_or(b0, b1); in gen_ehostop()
4001 return b1; in gen_ehostop()
4037 struct block *b0, *b1; in gen_fhostop() local
4048 b1 = gen_fhostop(cstate, eaddr, Q_DST); in gen_fhostop()
4049 gen_and(b0, b1); in gen_fhostop()
4050 return b1; in gen_fhostop()
4055 b1 = gen_fhostop(cstate, eaddr, Q_DST); in gen_fhostop()
4056 gen_or(b0, b1); in gen_fhostop()
4057 return b1; in gen_fhostop()
4093 register struct block *b0, *b1; in gen_thostop() local
4104 b1 = gen_thostop(cstate, eaddr, Q_DST); in gen_thostop()
4105 gen_and(b0, b1); in gen_thostop()
4106 return b1; in gen_thostop()
4111 b1 = gen_thostop(cstate, eaddr, Q_DST); in gen_thostop()
4112 gen_or(b0, b1); in gen_thostop()
4113 return b1; in gen_thostop()
4150 register struct block *b0, *b1, *b2; in gen_wlanhostop() local
4191 b1 = new_block(cstate, JMP(BPF_JSET)); in gen_wlanhostop()
4192 b1->s.k = 0x01; /* To DS */ in gen_wlanhostop()
4193 b1->stmts = s; in gen_wlanhostop()
4199 gen_and(b1, b0); in gen_wlanhostop()
4214 b1 = gen_bcmp(cstate, OR_LINKHDR, 16, 6, eaddr); in gen_wlanhostop()
4215 gen_and(b2, b1); in gen_wlanhostop()
4222 gen_or(b1, b0); in gen_wlanhostop()
4229 b1 = new_block(cstate, JMP(BPF_JSET)); in gen_wlanhostop()
4230 b1->s.k = 0x02; /* From DS */ in gen_wlanhostop()
4231 b1->stmts = s; in gen_wlanhostop()
4232 gen_and(b1, b0); in gen_wlanhostop()
4246 b1 = gen_bcmp(cstate, OR_LINKHDR, 10, 6, eaddr); in gen_wlanhostop()
4247 gen_and(b2, b1); in gen_wlanhostop()
4254 gen_or(b1, b0); in gen_wlanhostop()
4261 b1 = new_block(cstate, JMP(BPF_JSET)); in gen_wlanhostop()
4262 b1->s.k = 0x08; in gen_wlanhostop()
4263 b1->stmts = s; in gen_wlanhostop()
4268 gen_and(b1, b0); in gen_wlanhostop()
4284 b1 = gen_bcmp(cstate, OR_LINKHDR, 10, 6, eaddr); in gen_wlanhostop()
4285 gen_and(b2, b1); in gen_wlanhostop()
4292 gen_or(b1, b0); in gen_wlanhostop()
4303 b1 = new_block(cstate, JMP(BPF_JSET)); in gen_wlanhostop()
4304 b1->s.k = 0x04; in gen_wlanhostop()
4305 b1->stmts = s; in gen_wlanhostop()
4306 gen_not(b1); in gen_wlanhostop()
4312 gen_and(b1, b0); in gen_wlanhostop()
4338 b1 = new_block(cstate, JMP(BPF_JSET)); in gen_wlanhostop()
4339 b1->s.k = 0x01; /* To DS */ in gen_wlanhostop()
4340 b1->stmts = s; in gen_wlanhostop()
4346 gen_and(b1, b0); in gen_wlanhostop()
4361 b1 = gen_bcmp(cstate, OR_LINKHDR, 4, 6, eaddr); in gen_wlanhostop()
4362 gen_and(b2, b1); in gen_wlanhostop()
4368 gen_or(b1, b0); in gen_wlanhostop()
4375 b1 = new_block(cstate, JMP(BPF_JSET)); in gen_wlanhostop()
4376 b1->s.k = 0x08; in gen_wlanhostop()
4377 b1->stmts = s; in gen_wlanhostop()
4382 gen_and(b1, b0); in gen_wlanhostop()
4398 b1 = gen_bcmp(cstate, OR_LINKHDR, 4, 6, eaddr); in gen_wlanhostop()
4399 gen_and(b2, b1); in gen_wlanhostop()
4406 gen_or(b1, b0); in gen_wlanhostop()
4417 b1 = new_block(cstate, JMP(BPF_JSET)); in gen_wlanhostop()
4418 b1->s.k = 0x04; in gen_wlanhostop()
4419 b1->stmts = s; in gen_wlanhostop()
4420 gen_not(b1); in gen_wlanhostop()
4426 gen_and(b1, b0); in gen_wlanhostop()
4441 b1 = new_block(cstate, JMP(BPF_JSET)); in gen_wlanhostop()
4442 b1->s.k = 0x08; in gen_wlanhostop()
4443 b1->stmts = s; in gen_wlanhostop()
4453 gen_and(b1, b0); in gen_wlanhostop()
4468 b1 = gen_mcmp(cstate, OR_LINKHDR, 0, BPF_B, IEEE80211_FC0_SUBTYPE_CTS, in gen_wlanhostop()
4470 gen_not(b1); in gen_wlanhostop()
4474 gen_and(b1, b2); in gen_wlanhostop()
4483 b1 = new_block(cstate, JMP(BPF_JSET)); in gen_wlanhostop()
4484 b1->s.k = 0x08; in gen_wlanhostop()
4485 b1->stmts = s; in gen_wlanhostop()
4491 gen_and(b1, b2); in gen_wlanhostop()
4496 b1 = gen_bcmp(cstate, OR_LINKHDR, 10, 6, eaddr); in gen_wlanhostop()
4497 gen_and(b2, b1); in gen_wlanhostop()
4498 return b1; in gen_wlanhostop()
4513 b1 = gen_mcmp(cstate, OR_LINKHDR, 0, BPF_B, IEEE80211_FC0_SUBTYPE_CTS, in gen_wlanhostop()
4515 gen_not(b1); in gen_wlanhostop()
4519 gen_and(b1, b2); in gen_wlanhostop()
4521 b1 = gen_bcmp(cstate, OR_LINKHDR, 10, 6, eaddr); in gen_wlanhostop()
4522 gen_and(b2, b1); in gen_wlanhostop()
4523 return b1; in gen_wlanhostop()
4532 b1 = gen_bcmp(cstate, OR_LINKHDR, 16, 6, eaddr); in gen_wlanhostop()
4533 gen_and(b0, b1); in gen_wlanhostop()
4534 return b1; in gen_wlanhostop()
4545 b1 = gen_bcmp(cstate, OR_LINKHDR, 24, 6, eaddr); in gen_wlanhostop()
4546 gen_and(b0, b1); in gen_wlanhostop()
4547 return b1; in gen_wlanhostop()
4551 b1 = gen_wlanhostop(cstate, eaddr, Q_DST); in gen_wlanhostop()
4552 gen_and(b0, b1); in gen_wlanhostop()
4553 return b1; in gen_wlanhostop()
4558 b1 = gen_wlanhostop(cstate, eaddr, Q_DST); in gen_wlanhostop()
4559 gen_or(b0, b1); in gen_wlanhostop()
4560 return b1; in gen_wlanhostop()
4574 register struct block *b0, *b1; in gen_ipfchostop() local
4585 b1 = gen_ipfchostop(cstate, eaddr, Q_DST); in gen_ipfchostop()
4586 gen_and(b0, b1); in gen_ipfchostop()
4587 return b1; in gen_ipfchostop()
4592 b1 = gen_ipfchostop(cstate, eaddr, Q_DST); in gen_ipfchostop()
4593 gen_or(b0, b1); in gen_ipfchostop()
4594 return b1; in gen_ipfchostop()
4645 struct block *b0, *b1, *b2, *tmp; in gen_dnhostop() local
4664 b1 = gen_dnhostop(cstate, addr, Q_DST); in gen_dnhostop()
4665 gen_and(b0, b1); in gen_dnhostop()
4666 return b1; in gen_dnhostop()
4672 b1 = gen_dnhostop(cstate, addr, Q_DST); in gen_dnhostop()
4673 gen_or(b0, b1); in gen_dnhostop()
4674 return b1; in gen_dnhostop()
4686 b1 = gen_cmp(cstate, OR_LINKPL, 2 + 1 + offset_lh, in gen_dnhostop()
4688 gen_and(tmp, b1); in gen_dnhostop()
4693 gen_or(b2, b1); in gen_dnhostop()
4699 gen_or(b2, b1); in gen_dnhostop()
4704 gen_or(b2, b1); in gen_dnhostop()
4707 gen_and(b0, b1); in gen_dnhostop()
4708 return b1; in gen_dnhostop()
4719 struct block *b0, *b1; in gen_mpls_linktype() local
4727 b1 = gen_mcmp(cstate, OR_LINKPL, 0, BPF_B, 0x40, 0xf0); in gen_mpls_linktype()
4728 gen_and(b0, b1); in gen_mpls_linktype()
4729 return b1; in gen_mpls_linktype()
4735 b1 = gen_mcmp(cstate, OR_LINKPL, 0, BPF_B, 0x60, 0xf0); in gen_mpls_linktype()
4736 gen_and(b0, b1); in gen_mpls_linktype()
4737 return b1; in gen_mpls_linktype()
4748 struct block *b0, *b1; in gen_host() local
4765 b1 = gen_host(cstate, addr, mask, Q_ARP, dir, type); in gen_host()
4766 gen_or(b0, b1); in gen_host()
4768 gen_or(b1, b0); in gen_host()
4996 struct block *b0, *b1, *tmp; in gen_gateway() local
5012 b1 = gen_prevlinkhdr_check(cstate); in gen_gateway()
5014 if (b1 != NULL) in gen_gateway()
5015 gen_and(b1, b0); in gen_gateway()
5046 b1 = NULL; in gen_gateway()
5066 if (b1 == NULL) { in gen_gateway()
5070 b1 = tmp; in gen_gateway()
5077 gen_or(b1, tmp); in gen_gateway()
5078 b1 = tmp; in gen_gateway()
5083 if (b1 == NULL) { in gen_gateway()
5089 gen_not(b1); in gen_gateway()
5090 gen_and(b0, b1); in gen_gateway()
5091 return b1; in gen_gateway()
5102 struct block *b1; in gen_proto_abbrev() local
5107 b1 = gen_proto(cstate, IPPROTO_SCTP, Q_IP, Q_DEFAULT); in gen_proto_abbrev()
5109 gen_or(b0, b1); in gen_proto_abbrev()
5113 b1 = gen_proto(cstate, IPPROTO_TCP, Q_IP, Q_DEFAULT); in gen_proto_abbrev()
5115 gen_or(b0, b1); in gen_proto_abbrev()
5119 b1 = gen_proto(cstate, IPPROTO_UDP, Q_IP, Q_DEFAULT); in gen_proto_abbrev()
5121 gen_or(b0, b1); in gen_proto_abbrev()
5125 b1 = gen_proto(cstate, IPPROTO_ICMP, Q_IP, Q_DEFAULT); in gen_proto_abbrev()
5133 b1 = gen_proto(cstate, IPPROTO_IGMP, Q_IP, Q_DEFAULT); in gen_proto_abbrev()
5140 b1 = gen_proto(cstate, IPPROTO_IGRP, Q_IP, Q_DEFAULT); in gen_proto_abbrev()
5148 b1 = gen_proto(cstate, IPPROTO_PIM, Q_IP, Q_DEFAULT); in gen_proto_abbrev()
5150 gen_or(b0, b1); in gen_proto_abbrev()
5158 b1 = gen_proto(cstate, IPPROTO_VRRP, Q_IP, Q_DEFAULT); in gen_proto_abbrev()
5166 b1 = gen_proto(cstate, IPPROTO_CARP, Q_IP, Q_DEFAULT); in gen_proto_abbrev()
5170 b1 = gen_linktype(cstate, ETHERTYPE_IP); in gen_proto_abbrev()
5174 b1 = gen_linktype(cstate, ETHERTYPE_ARP); in gen_proto_abbrev()
5178 b1 = gen_linktype(cstate, ETHERTYPE_REVARP); in gen_proto_abbrev()
5185 b1 = gen_linktype(cstate, ETHERTYPE_ATALK); in gen_proto_abbrev()
5189 b1 = gen_linktype(cstate, ETHERTYPE_AARP); in gen_proto_abbrev()
5193 b1 = gen_linktype(cstate, ETHERTYPE_DN); in gen_proto_abbrev()
5197 b1 = gen_linktype(cstate, ETHERTYPE_SCA); in gen_proto_abbrev()
5201 b1 = gen_linktype(cstate, ETHERTYPE_LAT); in gen_proto_abbrev()
5205 b1 = gen_linktype(cstate, ETHERTYPE_MOPDL); in gen_proto_abbrev()
5209 b1 = gen_linktype(cstate, ETHERTYPE_MOPRC); in gen_proto_abbrev()
5213 b1 = gen_linktype(cstate, ETHERTYPE_IPV6); in gen_proto_abbrev()
5220 b1 = gen_proto(cstate, IPPROTO_ICMPV6, Q_IPV6, Q_DEFAULT); in gen_proto_abbrev()
5227 b1 = gen_proto(cstate, IPPROTO_AH, Q_IP, Q_DEFAULT); in gen_proto_abbrev()
5229 gen_or(b0, b1); in gen_proto_abbrev()
5236 b1 = gen_proto(cstate, IPPROTO_ESP, Q_IP, Q_DEFAULT); in gen_proto_abbrev()
5238 gen_or(b0, b1); in gen_proto_abbrev()
5242 b1 = gen_linktype(cstate, LLCSAP_ISONS); in gen_proto_abbrev()
5246 b1 = gen_proto(cstate, ISO9542_ESIS, Q_ISO, Q_DEFAULT); in gen_proto_abbrev()
5250 b1 = gen_proto(cstate, ISO10589_ISIS, Q_ISO, Q_DEFAULT); in gen_proto_abbrev()
5255 b1 = gen_proto(cstate, ISIS_PTP_IIH, Q_ISIS, Q_DEFAULT); /* FIXME extract the circuit-type bits */ in gen_proto_abbrev()
5256 gen_or(b0, b1); in gen_proto_abbrev()
5258 gen_or(b0, b1); in gen_proto_abbrev()
5260 gen_or(b0, b1); in gen_proto_abbrev()
5262 gen_or(b0, b1); in gen_proto_abbrev()
5267 b1 = gen_proto(cstate, ISIS_PTP_IIH, Q_ISIS, Q_DEFAULT); /* FIXME extract the circuit-type bits */ in gen_proto_abbrev()
5268 gen_or(b0, b1); in gen_proto_abbrev()
5270 gen_or(b0, b1); in gen_proto_abbrev()
5272 gen_or(b0, b1); in gen_proto_abbrev()
5274 gen_or(b0, b1); in gen_proto_abbrev()
5279 b1 = gen_proto(cstate, ISIS_L2_LAN_IIH, Q_ISIS, Q_DEFAULT); in gen_proto_abbrev()
5280 gen_or(b0, b1); in gen_proto_abbrev()
5282 gen_or(b0, b1); in gen_proto_abbrev()
5287 b1 = gen_proto(cstate, ISIS_L2_LSP, Q_ISIS, Q_DEFAULT); in gen_proto_abbrev()
5288 gen_or(b0, b1); in gen_proto_abbrev()
5293 b1 = gen_proto(cstate, ISIS_L2_CSNP, Q_ISIS, Q_DEFAULT); in gen_proto_abbrev()
5294 gen_or(b0, b1); in gen_proto_abbrev()
5296 gen_or(b0, b1); in gen_proto_abbrev()
5298 gen_or(b0, b1); in gen_proto_abbrev()
5303 b1 = gen_proto(cstate, ISIS_L2_CSNP, Q_ISIS, Q_DEFAULT); in gen_proto_abbrev()
5304 gen_or(b0, b1); in gen_proto_abbrev()
5309 b1 = gen_proto(cstate, ISIS_L2_PSNP, Q_ISIS, Q_DEFAULT); in gen_proto_abbrev()
5310 gen_or(b0, b1); in gen_proto_abbrev()
5314 b1 = gen_proto(cstate, ISO8473_CLNP, Q_ISO, Q_DEFAULT); in gen_proto_abbrev()
5318 b1 = gen_linktype(cstate, LLCSAP_8021D); in gen_proto_abbrev()
5322 b1 = gen_linktype(cstate, LLCSAP_IPX); in gen_proto_abbrev()
5326 b1 = gen_linktype(cstate, LLCSAP_NETBEUI); in gen_proto_abbrev()
5335 return b1; in gen_proto_abbrev()
5378 struct block *b0, *b1, *tmp; in gen_portop() local
5387 b1 = gen_portatom(cstate, 0, (bpf_int32)port); in gen_portop()
5391 b1 = gen_portatom(cstate, 2, (bpf_int32)port); in gen_portop()
5397 b1 = gen_portatom(cstate, 2, (bpf_int32)port); in gen_portop()
5398 gen_or(tmp, b1); in gen_portop()
5403 b1 = gen_portatom(cstate, 2, (bpf_int32)port); in gen_portop()
5404 gen_and(tmp, b1); in gen_portop()
5410 gen_and(b0, b1); in gen_portop()
5412 return b1; in gen_portop()
5418 struct block *b0, *b1, *tmp; in gen_port() local
5443 b1 = gen_portop(cstate, port, ip_proto, dir); in gen_port()
5448 b1 = gen_portop(cstate, port, IPPROTO_UDP, dir); in gen_port()
5449 gen_or(tmp, b1); in gen_port()
5451 gen_or(tmp, b1); in gen_port()
5457 gen_and(b0, b1); in gen_port()
5458 return b1; in gen_port()
5464 struct block *b0, *b1, *tmp; in gen_portop6() local
5472 b1 = gen_portatom6(cstate, 0, (bpf_int32)port); in gen_portop6()
5476 b1 = gen_portatom6(cstate, 2, (bpf_int32)port); in gen_portop6()
5482 b1 = gen_portatom6(cstate, 2, (bpf_int32)port); in gen_portop6()
5483 gen_or(tmp, b1); in gen_portop6()
5488 b1 = gen_portatom6(cstate, 2, (bpf_int32)port); in gen_portop6()
5489 gen_and(tmp, b1); in gen_portop6()
5495 gen_and(b0, b1); in gen_portop6()
5497 return b1; in gen_portop6()
5503 struct block *b0, *b1, *tmp; in gen_port6() local
5512 b1 = gen_portop6(cstate, port, ip_proto, dir); in gen_port6()
5517 b1 = gen_portop6(cstate, port, IPPROTO_UDP, dir); in gen_port6()
5518 gen_or(tmp, b1); in gen_port6()
5520 gen_or(tmp, b1); in gen_port6()
5526 gen_and(b0, b1); in gen_port6()
5527 return b1; in gen_port6()
5535 struct block *b1, *b2; in gen_portrangeatom() local
5548 b1 = gen_cmp_ge(cstate, OR_TRAN_IPV4, off, BPF_H, v1); in gen_portrangeatom()
5551 gen_and(b1, b2); in gen_portrangeatom()
5560 struct block *b0, *b1, *tmp; in gen_portrangeop() local
5569 b1 = gen_portrangeatom(cstate, 0, (bpf_int32)port1, (bpf_int32)port2); in gen_portrangeop()
5573 b1 = gen_portrangeatom(cstate, 2, (bpf_int32)port1, (bpf_int32)port2); in gen_portrangeop()
5579 b1 = gen_portrangeatom(cstate, 2, (bpf_int32)port1, (bpf_int32)port2); in gen_portrangeop()
5580 gen_or(tmp, b1); in gen_portrangeop()
5585 b1 = gen_portrangeatom(cstate, 2, (bpf_int32)port1, (bpf_int32)port2); in gen_portrangeop()
5586 gen_and(tmp, b1); in gen_portrangeop()
5592 gen_and(b0, b1); in gen_portrangeop()
5594 return b1; in gen_portrangeop()
5601 struct block *b0, *b1, *tmp; in gen_portrange() local
5610 b1 = gen_portrangeop(cstate, port1, port2, ip_proto, dir); in gen_portrange()
5615 b1 = gen_portrangeop(cstate, port1, port2, IPPROTO_UDP, dir); in gen_portrange()
5616 gen_or(tmp, b1); in gen_portrange()
5618 gen_or(tmp, b1); in gen_portrange()
5624 gen_and(b0, b1); in gen_portrange()
5625 return b1; in gen_portrange()
5632 struct block *b1, *b2; in gen_portrangeatom6() local
5645 b1 = gen_cmp_ge(cstate, OR_TRAN_IPV6, off, BPF_H, v1); in gen_portrangeatom6()
5648 gen_and(b1, b2); in gen_portrangeatom6()
5657 struct block *b0, *b1, *tmp; in gen_portrangeop6() local
5665 b1 = gen_portrangeatom6(cstate, 0, (bpf_int32)port1, (bpf_int32)port2); in gen_portrangeop6()
5669 b1 = gen_portrangeatom6(cstate, 2, (bpf_int32)port1, (bpf_int32)port2); in gen_portrangeop6()
5675 b1 = gen_portrangeatom6(cstate, 2, (bpf_int32)port1, (bpf_int32)port2); in gen_portrangeop6()
5676 gen_or(tmp, b1); in gen_portrangeop6()
5681 b1 = gen_portrangeatom6(cstate, 2, (bpf_int32)port1, (bpf_int32)port2); in gen_portrangeop6()
5682 gen_and(tmp, b1); in gen_portrangeop6()
5688 gen_and(b0, b1); in gen_portrangeop6()
5690 return b1; in gen_portrangeop6()
5697 struct block *b0, *b1, *tmp; in gen_portrange6() local
5706 b1 = gen_portrangeop6(cstate, port1, port2, ip_proto, dir); in gen_portrange6()
5711 b1 = gen_portrangeop6(cstate, port1, port2, IPPROTO_UDP, dir); in gen_portrange6()
5712 gen_or(tmp, b1); in gen_portrange6()
5714 gen_or(tmp, b1); in gen_portrange6()
5720 gen_and(b0, b1); in gen_portrange6()
5721 return b1; in gen_portrange6()
6070 struct block *b0, *b1; in gen_check_802_11_data_frame() local
6082 b1 = new_block(cstate, JMP(BPF_JSET)); in gen_check_802_11_data_frame()
6083 b1->s.k = 0x04; in gen_check_802_11_data_frame()
6084 b1->stmts = s; in gen_check_802_11_data_frame()
6085 gen_not(b1); in gen_check_802_11_data_frame()
6087 gen_and(b1, b0); in gen_check_802_11_data_frame()
6104 struct block *b0, *b1; in gen_proto() local
6115 b1 = gen_proto(cstate, v, Q_IPV6, dir); in gen_proto()
6116 gen_or(b0, b1); in gen_proto()
6117 return b1; in gen_proto()
6137 b1 = gen_cmp(cstate, OR_LINKPL, 9, BPF_B, (bpf_int32)v); in gen_proto()
6139 b1 = gen_protochain(cstate, v, Q_IP); in gen_proto()
6141 gen_and(b0, b1); in gen_proto()
6142 return b1; in gen_proto()
6177 b1 = gen_cmp(cstate, OR_LINKPL_NOSNAP, 1, BPF_B, (long)v); in gen_proto()
6178 gen_and(b0, b1); in gen_proto()
6179 return b1; in gen_proto()
6183 b1 = gen_cmp(cstate, OR_LINKPL_NOSNAP, 0, BPF_B, (long)v); in gen_proto()
6184 gen_and(b0, b1); in gen_proto()
6185 return b1; in gen_proto()
6194 b1 = gen_cmp(cstate, OR_LINKPL_NOSNAP, 4, BPF_B, (long)v); in gen_proto()
6195 gen_and(b0, b1); in gen_proto()
6196 return b1; in gen_proto()
6277 b1 = gen_cmp(cstate, OR_LINKPL, 40, BPF_B, (bpf_int32)v); in gen_proto()
6278 gen_and(b2, b1); in gen_proto()
6280 gen_or(b2, b1); in gen_proto()
6282 b1 = gen_protochain(cstate, v, Q_IPV6); in gen_proto()
6284 gen_and(b0, b1); in gen_proto()
6285 return b1; in gen_proto()
7440 struct block *b0, *b1, *b2; in gen_broadcast() local
7454 b1 = gen_prevlinkhdr_check(cstate); in gen_broadcast()
7456 if (b1 != NULL) in gen_broadcast()
7457 gen_and(b1, b0); in gen_broadcast()
7486 b1 = gen_mcmp(cstate, OR_LINKPL, 16, BPF_W, (bpf_int32)0, hostmask); in gen_broadcast()
7489 gen_or(b1, b2); in gen_broadcast()
7518 register struct block *b0, *b1, *b2; in gen_multicast() local
7533 b1 = gen_prevlinkhdr_check(cstate); in gen_multicast()
7536 if (b1 != NULL) in gen_multicast()
7537 gen_and(b1, b0); in gen_multicast()
7577 b1 = new_block(cstate, JMP(BPF_JSET)); in gen_multicast()
7578 b1->s.k = 0x01; /* To DS */ in gen_multicast()
7579 b1->stmts = s; in gen_multicast()
7585 gen_and(b1, b0); in gen_multicast()
7600 b1 = gen_mac_multicast(cstate, 4); in gen_multicast()
7601 gen_and(b2, b1); in gen_multicast()
7607 gen_or(b1, b0); in gen_multicast()
7614 b1 = new_block(cstate, JMP(BPF_JSET)); in gen_multicast()
7615 b1->s.k = 0x08; in gen_multicast()
7616 b1->stmts = s; in gen_multicast()
7621 gen_and(b1, b0); in gen_multicast()
7637 b1 = gen_mac_multicast(cstate, 4); in gen_multicast()
7638 gen_and(b2, b1); in gen_multicast()
7645 gen_or(b1, b0); in gen_multicast()
7656 b1 = new_block(cstate, JMP(BPF_JSET)); in gen_multicast()
7657 b1->s.k = 0x04; in gen_multicast()
7658 b1->stmts = s; in gen_multicast()
7659 gen_not(b1); in gen_multicast()
7665 gen_and(b1, b0); in gen_multicast()
7678 b1 = gen_cmp_ge(cstate, OR_LINKPL, 16, BPF_B, (bpf_int32)224); in gen_multicast()
7679 gen_and(b0, b1); in gen_multicast()
7680 return b1; in gen_multicast()
7684 b1 = gen_cmp(cstate, OR_LINKPL, 24, BPF_B, (bpf_int32)255); in gen_multicast()
7685 gen_and(b0, b1); in gen_multicast()
7686 return b1; in gen_multicast()
8058 register struct block *b0, *b1; in gen_ahostop() local
8070 b1 = gen_ahostop(cstate, eaddr, Q_DST); in gen_ahostop()
8071 gen_and(b0, b1); in gen_ahostop()
8072 return b1; in gen_ahostop()
8077 b1 = gen_ahostop(cstate, eaddr, Q_DST); in gen_ahostop()
8078 gen_or(b0, b1); in gen_ahostop()
8079 return b1; in gen_ahostop()
8112 struct block *b0, *b1; in gen_vlan_tpid_test() local
8116 b1 = gen_linktype(cstate, ETHERTYPE_8021AD); in gen_vlan_tpid_test()
8117 gen_or(b0,b1); in gen_vlan_tpid_test()
8118 b0 = b1; in gen_vlan_tpid_test()
8119 b1 = gen_linktype(cstate, ETHERTYPE_8021QINQ); in gen_vlan_tpid_test()
8120 gen_or(b0,b1); in gen_vlan_tpid_test()
8122 return b1; in gen_vlan_tpid_test()
8134 struct block *b0, *b1; in gen_vlan_no_bpf_extensions() local
8139 b1 = gen_vlan_vid_test(cstate, vlan_num); in gen_vlan_no_bpf_extensions()
8140 gen_and(b0, b1); in gen_vlan_no_bpf_extensions()
8141 b0 = b1; in gen_vlan_no_bpf_extensions()
8375 struct block *b0, *b1; in gen_mpls() local
8413 b1 = gen_mcmp(cstate, OR_LINKPL, 0, BPF_W, (bpf_int32)label_num, in gen_mpls()
8415 gen_and(b0, b1); in gen_mpls()
8416 b0 = b1; in gen_mpls()
8452 struct block *b0, *b1; in gen_pppoes() local
8461 b1 = gen_mcmp(cstate, OR_LINKPL, 0, BPF_W, in gen_pppoes()
8463 gen_and(b0, b1); in gen_pppoes()
8464 b0 = b1; in gen_pppoes()
8526 struct block *b0, *b1; in gen_geneve_check() local
8533 b1 = gen_mcmp(cstate, offrel, 8, BPF_B, (bpf_int32)0, 0xc0); in gen_geneve_check()
8534 gen_and(b0, b1); in gen_geneve_check()
8535 b0 = b1; in gen_geneve_check()
8539 b1 = gen_mcmp(cstate, offrel, 12, BPF_W, (bpf_int32)vni, in gen_geneve_check()
8541 gen_and(b0, b1); in gen_geneve_check()
8542 b0 = b1; in gen_geneve_check()
8556 struct block *b0, *b1; in gen_geneve4() local
8570 b1 = new_block(cstate, BPF_JMP|BPF_JEQ|BPF_X); in gen_geneve4()
8571 b1->stmts = s; in gen_geneve4()
8572 b1->s.k = 0; in gen_geneve4()
8574 gen_and(b0, b1); in gen_geneve4()
8576 return b1; in gen_geneve4()
8582 struct block *b0, *b1; in gen_geneve6() local
8609 b1 = new_block(cstate, BPF_JMP|BPF_JEQ|BPF_X); in gen_geneve6()
8610 b1->stmts = s; in gen_geneve6()
8611 b1->s.k = 0; in gen_geneve6()
8613 gen_and(b0, b1); in gen_geneve6()
8615 return b1; in gen_geneve6()
8760 struct block *b0, *b1; in gen_geneve() local
8764 b1 = gen_geneve6(cstate, vni); in gen_geneve()
8766 gen_or(b0, b1); in gen_geneve()
8767 b0 = b1; in gen_geneve()
8774 b1 = gen_true(cstate); in gen_geneve()
8775 sappend(s, b1->stmts); in gen_geneve()
8776 b1->stmts = s; in gen_geneve()
8778 gen_and(b0, b1); in gen_geneve()
8782 return b1; in gen_geneve()
8872 struct block *b0, *b1; in gen_atmtype_abbrev() local
8881 b1 = gen_atmfield_code(cstate, A_VCI, 1, BPF_JEQ, 0); in gen_atmtype_abbrev()
8882 gen_and(b0, b1); in gen_atmtype_abbrev()
8890 b1 = gen_atmfield_code(cstate, A_VCI, 2, BPF_JEQ, 0); in gen_atmtype_abbrev()
8891 gen_and(b0, b1); in gen_atmtype_abbrev()
8899 b1 = gen_atmfield_code(cstate, A_VCI, 3, BPF_JEQ, 0); in gen_atmtype_abbrev()
8900 gen_and(b0, b1); in gen_atmtype_abbrev()
8908 b1 = gen_atmfield_code(cstate, A_VCI, 4, BPF_JEQ, 0); in gen_atmtype_abbrev()
8909 gen_and(b0, b1); in gen_atmtype_abbrev()
8917 b1 = gen_atmfield_code(cstate, A_VCI, 5, BPF_JEQ, 0); in gen_atmtype_abbrev()
8918 gen_and(b0, b1); in gen_atmtype_abbrev()
8926 b1 = gen_atmfield_code(cstate, A_VCI, 16, BPF_JEQ, 0); in gen_atmtype_abbrev()
8927 gen_and(b0, b1); in gen_atmtype_abbrev()
8934 b1 = gen_atmfield_code(cstate, A_PROTOTYPE, PT_LANE, BPF_JEQ, 0); in gen_atmtype_abbrev()
8957 b1 = gen_atmfield_code(cstate, A_PROTOTYPE, PT_LLC, BPF_JEQ, 0); in gen_atmtype_abbrev()
8964 return b1; in gen_atmtype_abbrev()
8977 struct block *b0, *b1; in gen_mtp2type_abbrev() local
8996 b1 = gen_ncmp(cstate, OR_PACKET, cstate->off_li, BPF_B, 0x3f, BPF_JGT, 0, 0); in gen_mtp2type_abbrev()
8997 gen_and(b1, b0); in gen_mtp2type_abbrev()
9023 b1 = gen_ncmp(cstate, OR_PACKET, cstate->off_li_hsl, BPF_H, 0xff80, BPF_JGT, 0, 0); in gen_mtp2type_abbrev()
9024 gen_and(b1, b0); in gen_mtp2type_abbrev()
9138 struct block *b1; in gen_msg_abbrev() local
9147 b1 = gen_atmfield_code(cstate, A_MSGTYPE, SETUP, BPF_JEQ, 0); in gen_msg_abbrev()
9151 b1 = gen_atmfield_code(cstate, A_MSGTYPE, CALL_PROCEED, BPF_JEQ, 0); in gen_msg_abbrev()
9155 b1 = gen_atmfield_code(cstate, A_MSGTYPE, CONNECT, BPF_JEQ, 0); in gen_msg_abbrev()
9159 b1 = gen_atmfield_code(cstate, A_MSGTYPE, CONNECT_ACK, BPF_JEQ, 0); in gen_msg_abbrev()
9163 b1 = gen_atmfield_code(cstate, A_MSGTYPE, RELEASE, BPF_JEQ, 0); in gen_msg_abbrev()
9167 b1 = gen_atmfield_code(cstate, A_MSGTYPE, RELEASE_DONE, BPF_JEQ, 0); in gen_msg_abbrev()
9173 return b1; in gen_msg_abbrev()
9179 struct block *b0, *b1; in gen_atmmulti_abbrev() local
9186 b1 = gen_atmmulti_abbrev(cstate, A_OAMF4); in gen_atmmulti_abbrev()
9194 b1 = gen_atmfield_code(cstate, A_VCI, 4, BPF_JEQ, 0); in gen_atmmulti_abbrev()
9195 gen_or(b0, b1); in gen_atmmulti_abbrev()
9197 gen_and(b0, b1); in gen_atmmulti_abbrev()
9208 b1 = gen_msg_abbrev(cstate, A_CALLPROCEED); in gen_atmmulti_abbrev()
9209 gen_or(b0, b1); in gen_atmmulti_abbrev()
9211 gen_or(b0, b1); in gen_atmmulti_abbrev()
9213 gen_or(b0, b1); in gen_atmmulti_abbrev()
9215 gen_or(b0, b1); in gen_atmmulti_abbrev()
9217 gen_or(b0, b1); in gen_atmmulti_abbrev()
9219 gen_and(b0, b1); in gen_atmmulti_abbrev()
9226 b1 = gen_msg_abbrev(cstate, A_CALLPROCEED); in gen_atmmulti_abbrev()
9227 gen_or(b0, b1); in gen_atmmulti_abbrev()
9229 gen_or(b0, b1); in gen_atmmulti_abbrev()
9231 gen_or(b0, b1); in gen_atmmulti_abbrev()
9233 gen_or(b0, b1); in gen_atmmulti_abbrev()
9235 gen_and(b0, b1); in gen_atmmulti_abbrev()
9241 return b1; in gen_atmmulti_abbrev()