• Home
  • Raw
  • Download

Lines Matching refs:b1

825 merge(b0, b1)  in merge()  argument
826 struct block *b0, *b1; in merge()
835 *p = b1;
888 gen_and(b0, b1) in gen_and() argument
889 struct block *b0, *b1; in gen_and()
891 backpatch(b0, b1->head);
893 b1->sense = !b1->sense;
894 merge(b1, b0);
895 b1->sense = !b1->sense;
896 b1->head = b0->head;
900 gen_or(b0, b1) in gen_or() argument
901 struct block *b0, *b1; in gen_or()
904 backpatch(b0, b1->head);
906 merge(b1, b0);
907 b1->head = b0->head;
1830 struct block *b0, *b1; in gen_ether_linktype() local
1851 b1 = gen_cmp(cstate, OR_LLC, 0, BPF_H, (bpf_int32) in gen_ether_linktype()
1853 gen_and(b0, b1); in gen_ether_linktype()
1854 return b1; in gen_ether_linktype()
1890 b1 = gen_cmp(cstate, OR_LLC, 0, BPF_H, (bpf_int32)0xFFFF); in gen_ether_linktype()
1891 gen_or(b0, b1); in gen_ether_linktype()
1898 gen_or(b0, b1); in gen_ether_linktype()
1913 gen_and(b0, b1); in gen_ether_linktype()
1921 gen_or(b0, b1); in gen_ether_linktype()
1922 return b1; in gen_ether_linktype()
1951 b1 = gen_snap(cstate, 0x080007, ETHERTYPE_ATALK); in gen_ether_linktype()
1953 b1 = gen_snap(cstate, 0x000000, ETHERTYPE_AARP); in gen_ether_linktype()
1954 gen_and(b0, b1); in gen_ether_linktype()
1963 gen_or(b0, b1); in gen_ether_linktype()
1964 return b1; in gen_ether_linktype()
1978 b1 = gen_cmp(cstate, OR_LINKTYPE, 2, BPF_B, (bpf_int32)proto); in gen_ether_linktype()
1979 gen_and(b0, b1); in gen_ether_linktype()
1980 return b1; in gen_ether_linktype()
2068 struct block *b0, *b1; in gen_linux_sll_linktype() local
2088 b1 = gen_cmp(cstate, OR_LLC, 0, BPF_H, (bpf_int32) in gen_linux_sll_linktype()
2090 gen_and(b0, b1); in gen_linux_sll_linktype()
2091 return b1; in gen_linux_sll_linktype()
2120 b1 = gen_snap(cstate, 0x000000, ETHERTYPE_IPX); in gen_linux_sll_linktype()
2121 gen_or(b0, b1); in gen_linux_sll_linktype()
2123 gen_and(b0, b1); in gen_linux_sll_linktype()
2130 gen_or(b0, b1); in gen_linux_sll_linktype()
2138 gen_or(b0, b1); in gen_linux_sll_linktype()
2139 return b1; in gen_linux_sll_linktype()
2167 b1 = gen_snap(cstate, 0x080007, ETHERTYPE_ATALK); in gen_linux_sll_linktype()
2169 b1 = gen_snap(cstate, 0x000000, ETHERTYPE_AARP); in gen_linux_sll_linktype()
2170 gen_and(b0, b1); in gen_linux_sll_linktype()
2179 gen_or(b0, b1); in gen_linux_sll_linktype()
2180 return b1; in gen_linux_sll_linktype()
2192 b1 = gen_cmp(cstate, OR_LINKHDR, cstate->off_linkpl.constant_part, BPF_B, in gen_linux_sll_linktype()
2194 gen_and(b0, b1); in gen_linux_sll_linktype()
2195 return b1; in gen_linux_sll_linktype()
2986 struct block *b0, *b1, *b2; in gen_linktype() local
3020 b1 = gen_ether_linktype(cstate, proto); in gen_linktype()
3022 gen_and(b0, b1); in gen_linktype()
3023 return b1; in gen_linktype()
3054 b1 = gen_llc_linktype(cstate, proto); in gen_linktype()
3055 gen_and(b0, b1); in gen_linktype()
3056 return b1; in gen_linktype()
3092 b1 = gen_llc_linktype(cstate, proto); in gen_linktype()
3093 gen_and(b0, b1); in gen_linktype()
3094 return b1; in gen_linktype()
3179 b1 = gen_cmp(cstate, OR_LINKTYPE, 0, BPF_H, PPP_VJC); in gen_linktype()
3180 gen_or(b0, b1); in gen_linktype()
3182 gen_or(b1, b0); in gen_linktype()
3230 b1 = gen_loopback_linktype(cstate, BSD_AFNUM_INET6_FREEBSD); in gen_linktype()
3231 gen_or(b0, b1); in gen_linktype()
3233 gen_or(b0, b1); in gen_linktype()
3234 return (b1); in gen_linktype()
3307 b1 = gen_cmp(cstate, OR_LINKTYPE, 0, BPF_B, in gen_linktype()
3309 gen_or(b0, b1); in gen_linktype()
3310 return (b1); in gen_linktype()
3315 b1 = gen_cmp(cstate, OR_LINKTYPE, 0, BPF_B, in gen_linktype()
3317 gen_or(b0, b1); in gen_linktype()
3318 return (b1); in gen_linktype()
3373 b1 = gen_cmp(cstate, OR_LINKHDR, 2, BPF_H, (0x03<<8) | ISO9542_ESIS); in gen_linktype()
3375 gen_or(b1, b2); in gen_linktype()
3547 struct block *b0, *b1; in gen_llc() local
3563 b1 = gen_cmp(cstate, OR_LLC, 0, BPF_H, (bpf_int32)0xFFFF); in gen_llc()
3564 gen_not(b1); in gen_llc()
3565 gen_and(b0, b1); in gen_llc()
3566 return b1; in gen_llc()
3618 struct block *b0, *b1; in gen_llc_i() local
3631 b1 = new_block(cstate, JMP(BPF_JSET)); in gen_llc_i()
3632 b1->s.k = 0x01; in gen_llc_i()
3633 b1->stmts = s; in gen_llc_i()
3634 gen_not(b1); in gen_llc_i()
3635 gen_and(b0, b1); in gen_llc_i()
3636 return b1; in gen_llc_i()
3642 struct block *b0, *b1; in gen_llc_s() local
3653 b1 = gen_mcmp(cstate, OR_LLC, 2, BPF_B, LLC_S_FMT, 0x03); in gen_llc_s()
3654 gen_and(b0, b1); in gen_llc_s()
3655 return b1; in gen_llc_s()
3661 struct block *b0, *b1; in gen_llc_u() local
3672 b1 = gen_mcmp(cstate, OR_LLC, 2, BPF_B, LLC_U_FMT, 0x03); in gen_llc_u()
3673 gen_and(b0, b1); in gen_llc_u()
3674 return b1; in gen_llc_u()
3680 struct block *b0, *b1; in gen_llc_s_subtype() local
3690 b1 = gen_mcmp(cstate, OR_LLC, 2, BPF_B, subtype, LLC_S_CMD_MASK); in gen_llc_s_subtype()
3691 gen_and(b0, b1); in gen_llc_s_subtype()
3692 return b1; in gen_llc_s_subtype()
3698 struct block *b0, *b1; in gen_llc_u_subtype() local
3708 b1 = gen_mcmp(cstate, OR_LLC, 2, BPF_B, subtype, LLC_U_CMD_MASK); in gen_llc_u_subtype()
3709 gen_and(b0, b1); in gen_llc_u_subtype()
3710 return b1; in gen_llc_u_subtype()
3804 struct block *b0, *b1; in gen_hostop() local
3819 b1 = gen_hostop(cstate, addr, mask, Q_DST, proto, src_off, dst_off); in gen_hostop()
3820 gen_and(b0, b1); in gen_hostop()
3821 return b1; in gen_hostop()
3826 b1 = gen_hostop(cstate, addr, mask, Q_DST, proto, src_off, dst_off); in gen_hostop()
3827 gen_or(b0, b1); in gen_hostop()
3828 return b1; in gen_hostop()
3834 b1 = gen_mcmp(cstate, OR_LINKPL, offset, BPF_W, (bpf_int32)addr, mask); in gen_hostop()
3835 gen_and(b0, b1); in gen_hostop()
3836 return b1; in gen_hostop()
3844 struct block *b0, *b1; in gen_hostop6() local
3860 b1 = gen_hostop6(cstate, addr, mask, Q_DST, proto, src_off, dst_off); in gen_hostop6()
3861 gen_and(b0, b1); in gen_hostop6()
3862 return b1; in gen_hostop6()
3867 b1 = gen_hostop6(cstate, addr, mask, Q_DST, proto, src_off, dst_off); in gen_hostop6()
3868 gen_or(b0, b1); in gen_hostop6()
3869 return b1; in gen_hostop6()
3877 b1 = gen_mcmp(cstate, OR_LINKPL, offset + 12, BPF_W, ntohl(a[3]), ntohl(m[3])); in gen_hostop6()
3879 gen_and(b0, b1); in gen_hostop6()
3881 gen_and(b0, b1); in gen_hostop6()
3883 gen_and(b0, b1); in gen_hostop6()
3885 gen_and(b0, b1); in gen_hostop6()
3886 return b1; in gen_hostop6()
3893 register struct block *b0, *b1; in gen_ehostop() local
3904 b1 = gen_ehostop(cstate, eaddr, Q_DST); in gen_ehostop()
3905 gen_and(b0, b1); in gen_ehostop()
3906 return b1; in gen_ehostop()
3911 b1 = gen_ehostop(cstate, eaddr, Q_DST); in gen_ehostop()
3912 gen_or(b0, b1); in gen_ehostop()
3913 return b1; in gen_ehostop()
3949 struct block *b0, *b1; in gen_fhostop() local
3960 b1 = gen_fhostop(cstate, eaddr, Q_DST); in gen_fhostop()
3961 gen_and(b0, b1); in gen_fhostop()
3962 return b1; in gen_fhostop()
3967 b1 = gen_fhostop(cstate, eaddr, Q_DST); in gen_fhostop()
3968 gen_or(b0, b1); in gen_fhostop()
3969 return b1; in gen_fhostop()
4005 register struct block *b0, *b1; in gen_thostop() local
4016 b1 = gen_thostop(cstate, eaddr, Q_DST); in gen_thostop()
4017 gen_and(b0, b1); in gen_thostop()
4018 return b1; in gen_thostop()
4023 b1 = gen_thostop(cstate, eaddr, Q_DST); in gen_thostop()
4024 gen_or(b0, b1); in gen_thostop()
4025 return b1; in gen_thostop()
4062 register struct block *b0, *b1, *b2; in gen_wlanhostop() local
4103 b1 = new_block(cstate, JMP(BPF_JSET)); in gen_wlanhostop()
4104 b1->s.k = 0x01; /* To DS */ in gen_wlanhostop()
4105 b1->stmts = s; in gen_wlanhostop()
4111 gen_and(b1, b0); in gen_wlanhostop()
4126 b1 = gen_bcmp(cstate, OR_LINKHDR, 16, 6, eaddr); in gen_wlanhostop()
4127 gen_and(b2, b1); in gen_wlanhostop()
4134 gen_or(b1, b0); in gen_wlanhostop()
4141 b1 = new_block(cstate, JMP(BPF_JSET)); in gen_wlanhostop()
4142 b1->s.k = 0x02; /* From DS */ in gen_wlanhostop()
4143 b1->stmts = s; in gen_wlanhostop()
4144 gen_and(b1, b0); in gen_wlanhostop()
4158 b1 = gen_bcmp(cstate, OR_LINKHDR, 10, 6, eaddr); in gen_wlanhostop()
4159 gen_and(b2, b1); in gen_wlanhostop()
4166 gen_or(b1, b0); in gen_wlanhostop()
4173 b1 = new_block(cstate, JMP(BPF_JSET)); in gen_wlanhostop()
4174 b1->s.k = 0x08; in gen_wlanhostop()
4175 b1->stmts = s; in gen_wlanhostop()
4180 gen_and(b1, b0); in gen_wlanhostop()
4196 b1 = gen_bcmp(cstate, OR_LINKHDR, 10, 6, eaddr); in gen_wlanhostop()
4197 gen_and(b2, b1); in gen_wlanhostop()
4204 gen_or(b1, b0); in gen_wlanhostop()
4215 b1 = new_block(cstate, JMP(BPF_JSET)); in gen_wlanhostop()
4216 b1->s.k = 0x04; in gen_wlanhostop()
4217 b1->stmts = s; in gen_wlanhostop()
4218 gen_not(b1); in gen_wlanhostop()
4224 gen_and(b1, b0); in gen_wlanhostop()
4250 b1 = new_block(cstate, JMP(BPF_JSET)); in gen_wlanhostop()
4251 b1->s.k = 0x01; /* To DS */ in gen_wlanhostop()
4252 b1->stmts = s; in gen_wlanhostop()
4258 gen_and(b1, b0); in gen_wlanhostop()
4273 b1 = gen_bcmp(cstate, OR_LINKHDR, 4, 6, eaddr); in gen_wlanhostop()
4274 gen_and(b2, b1); in gen_wlanhostop()
4280 gen_or(b1, b0); in gen_wlanhostop()
4287 b1 = new_block(cstate, JMP(BPF_JSET)); in gen_wlanhostop()
4288 b1->s.k = 0x08; in gen_wlanhostop()
4289 b1->stmts = s; in gen_wlanhostop()
4294 gen_and(b1, b0); in gen_wlanhostop()
4310 b1 = gen_bcmp(cstate, OR_LINKHDR, 4, 6, eaddr); in gen_wlanhostop()
4311 gen_and(b2, b1); in gen_wlanhostop()
4318 gen_or(b1, b0); in gen_wlanhostop()
4329 b1 = new_block(cstate, JMP(BPF_JSET)); in gen_wlanhostop()
4330 b1->s.k = 0x04; in gen_wlanhostop()
4331 b1->stmts = s; in gen_wlanhostop()
4332 gen_not(b1); in gen_wlanhostop()
4338 gen_and(b1, b0); in gen_wlanhostop()
4353 b1 = new_block(cstate, JMP(BPF_JSET)); in gen_wlanhostop()
4354 b1->s.k = 0x08; in gen_wlanhostop()
4355 b1->stmts = s; in gen_wlanhostop()
4365 gen_and(b1, b0); in gen_wlanhostop()
4380 b1 = gen_mcmp(cstate, OR_LINKHDR, 0, BPF_B, IEEE80211_FC0_SUBTYPE_CTS, in gen_wlanhostop()
4382 gen_not(b1); in gen_wlanhostop()
4386 gen_and(b1, b2); in gen_wlanhostop()
4395 b1 = new_block(cstate, JMP(BPF_JSET)); in gen_wlanhostop()
4396 b1->s.k = 0x08; in gen_wlanhostop()
4397 b1->stmts = s; in gen_wlanhostop()
4403 gen_and(b1, b2); in gen_wlanhostop()
4408 b1 = gen_bcmp(cstate, OR_LINKHDR, 10, 6, eaddr); in gen_wlanhostop()
4409 gen_and(b2, b1); in gen_wlanhostop()
4410 return b1; in gen_wlanhostop()
4425 b1 = gen_mcmp(cstate, OR_LINKHDR, 0, BPF_B, IEEE80211_FC0_SUBTYPE_CTS, in gen_wlanhostop()
4427 gen_not(b1); in gen_wlanhostop()
4431 gen_and(b1, b2); in gen_wlanhostop()
4433 b1 = gen_bcmp(cstate, OR_LINKHDR, 10, 6, eaddr); in gen_wlanhostop()
4434 gen_and(b2, b1); in gen_wlanhostop()
4435 return b1; in gen_wlanhostop()
4444 b1 = gen_bcmp(cstate, OR_LINKHDR, 16, 6, eaddr); in gen_wlanhostop()
4445 gen_and(b0, b1); in gen_wlanhostop()
4446 return b1; in gen_wlanhostop()
4457 b1 = gen_bcmp(cstate, OR_LINKHDR, 24, 6, eaddr); in gen_wlanhostop()
4458 gen_and(b0, b1); in gen_wlanhostop()
4459 return b1; in gen_wlanhostop()
4463 b1 = gen_wlanhostop(cstate, eaddr, Q_DST); in gen_wlanhostop()
4464 gen_and(b0, b1); in gen_wlanhostop()
4465 return b1; in gen_wlanhostop()
4470 b1 = gen_wlanhostop(cstate, eaddr, Q_DST); in gen_wlanhostop()
4471 gen_or(b0, b1); in gen_wlanhostop()
4472 return b1; in gen_wlanhostop()
4486 register struct block *b0, *b1; in gen_ipfchostop() local
4497 b1 = gen_ipfchostop(cstate, eaddr, Q_DST); in gen_ipfchostop()
4498 gen_and(b0, b1); in gen_ipfchostop()
4499 return b1; in gen_ipfchostop()
4504 b1 = gen_ipfchostop(cstate, eaddr, Q_DST); in gen_ipfchostop()
4505 gen_or(b0, b1); in gen_ipfchostop()
4506 return b1; in gen_ipfchostop()
4557 struct block *b0, *b1, *b2, *tmp; in gen_dnhostop() local
4576 b1 = gen_dnhostop(cstate, addr, Q_DST); in gen_dnhostop()
4577 gen_and(b0, b1); in gen_dnhostop()
4578 return b1; in gen_dnhostop()
4584 b1 = gen_dnhostop(cstate, addr, Q_DST); in gen_dnhostop()
4585 gen_or(b0, b1); in gen_dnhostop()
4586 return b1; in gen_dnhostop()
4598 b1 = gen_cmp(cstate, OR_LINKPL, 2 + 1 + offset_lh, in gen_dnhostop()
4600 gen_and(tmp, b1); in gen_dnhostop()
4605 gen_or(b2, b1); in gen_dnhostop()
4611 gen_or(b2, b1); in gen_dnhostop()
4616 gen_or(b2, b1); in gen_dnhostop()
4619 gen_and(b0, b1); in gen_dnhostop()
4620 return b1; in gen_dnhostop()
4631 struct block *b0, *b1; in gen_mpls_linktype() local
4639 b1 = gen_mcmp(cstate, OR_LINKPL, 0, BPF_B, 0x40, 0xf0); in gen_mpls_linktype()
4640 gen_and(b0, b1); in gen_mpls_linktype()
4641 return b1; in gen_mpls_linktype()
4647 b1 = gen_mcmp(cstate, OR_LINKPL, 0, BPF_B, 0x60, 0xf0); in gen_mpls_linktype()
4648 gen_and(b0, b1); in gen_mpls_linktype()
4649 return b1; in gen_mpls_linktype()
4660 struct block *b0, *b1; in gen_host() local
4677 b1 = gen_host(cstate, addr, mask, Q_ARP, dir, type); in gen_host()
4678 gen_or(b0, b1); in gen_host()
4680 gen_or(b1, b0); in gen_host()
4911 struct block *b0, *b1, *tmp; local
4925 b1 = gen_prevlinkhdr_check(cstate);
4927 if (b1 != NULL)
4928 gen_and(b1, b0);
4959 b1 = gen_host(cstate, **alist++, 0xffffffff, proto, Q_OR, Q_HOST);
4963 gen_or(b1, tmp);
4964 b1 = tmp;
4966 gen_not(b1);
4967 gen_and(b0, b1);
4968 return b1;
4979 struct block *b1; in gen_proto_abbrev() local
4984 b1 = gen_proto(cstate, IPPROTO_SCTP, Q_IP, Q_DEFAULT); in gen_proto_abbrev()
4986 gen_or(b0, b1); in gen_proto_abbrev()
4990 b1 = gen_proto(cstate, IPPROTO_TCP, Q_IP, Q_DEFAULT); in gen_proto_abbrev()
4992 gen_or(b0, b1); in gen_proto_abbrev()
4996 b1 = gen_proto(cstate, IPPROTO_UDP, Q_IP, Q_DEFAULT); in gen_proto_abbrev()
4998 gen_or(b0, b1); in gen_proto_abbrev()
5002 b1 = gen_proto(cstate, IPPROTO_ICMP, Q_IP, Q_DEFAULT); in gen_proto_abbrev()
5010 b1 = gen_proto(cstate, IPPROTO_IGMP, Q_IP, Q_DEFAULT); in gen_proto_abbrev()
5017 b1 = gen_proto(cstate, IPPROTO_IGRP, Q_IP, Q_DEFAULT); in gen_proto_abbrev()
5025 b1 = gen_proto(cstate, IPPROTO_PIM, Q_IP, Q_DEFAULT); in gen_proto_abbrev()
5027 gen_or(b0, b1); in gen_proto_abbrev()
5035 b1 = gen_proto(cstate, IPPROTO_VRRP, Q_IP, Q_DEFAULT); in gen_proto_abbrev()
5043 b1 = gen_proto(cstate, IPPROTO_CARP, Q_IP, Q_DEFAULT); in gen_proto_abbrev()
5047 b1 = gen_linktype(cstate, ETHERTYPE_IP); in gen_proto_abbrev()
5051 b1 = gen_linktype(cstate, ETHERTYPE_ARP); in gen_proto_abbrev()
5055 b1 = gen_linktype(cstate, ETHERTYPE_REVARP); in gen_proto_abbrev()
5062 b1 = gen_linktype(cstate, ETHERTYPE_ATALK); in gen_proto_abbrev()
5066 b1 = gen_linktype(cstate, ETHERTYPE_AARP); in gen_proto_abbrev()
5070 b1 = gen_linktype(cstate, ETHERTYPE_DN); in gen_proto_abbrev()
5074 b1 = gen_linktype(cstate, ETHERTYPE_SCA); in gen_proto_abbrev()
5078 b1 = gen_linktype(cstate, ETHERTYPE_LAT); in gen_proto_abbrev()
5082 b1 = gen_linktype(cstate, ETHERTYPE_MOPDL); in gen_proto_abbrev()
5086 b1 = gen_linktype(cstate, ETHERTYPE_MOPRC); in gen_proto_abbrev()
5090 b1 = gen_linktype(cstate, ETHERTYPE_IPV6); in gen_proto_abbrev()
5097 b1 = gen_proto(cstate, IPPROTO_ICMPV6, Q_IPV6, Q_DEFAULT); in gen_proto_abbrev()
5104 b1 = gen_proto(cstate, IPPROTO_AH, Q_IP, Q_DEFAULT); in gen_proto_abbrev()
5106 gen_or(b0, b1); in gen_proto_abbrev()
5113 b1 = gen_proto(cstate, IPPROTO_ESP, Q_IP, Q_DEFAULT); in gen_proto_abbrev()
5115 gen_or(b0, b1); in gen_proto_abbrev()
5119 b1 = gen_linktype(cstate, LLCSAP_ISONS); in gen_proto_abbrev()
5123 b1 = gen_proto(cstate, ISO9542_ESIS, Q_ISO, Q_DEFAULT); in gen_proto_abbrev()
5127 b1 = gen_proto(cstate, ISO10589_ISIS, Q_ISO, Q_DEFAULT); in gen_proto_abbrev()
5132 b1 = gen_proto(cstate, ISIS_PTP_IIH, Q_ISIS, Q_DEFAULT); /* FIXME extract the circuit-type bits */ in gen_proto_abbrev()
5133 gen_or(b0, b1); in gen_proto_abbrev()
5135 gen_or(b0, b1); in gen_proto_abbrev()
5137 gen_or(b0, b1); in gen_proto_abbrev()
5139 gen_or(b0, b1); in gen_proto_abbrev()
5144 b1 = gen_proto(cstate, ISIS_PTP_IIH, Q_ISIS, Q_DEFAULT); /* FIXME extract the circuit-type bits */ in gen_proto_abbrev()
5145 gen_or(b0, b1); in gen_proto_abbrev()
5147 gen_or(b0, b1); in gen_proto_abbrev()
5149 gen_or(b0, b1); in gen_proto_abbrev()
5151 gen_or(b0, b1); in gen_proto_abbrev()
5156 b1 = gen_proto(cstate, ISIS_L2_LAN_IIH, Q_ISIS, Q_DEFAULT); in gen_proto_abbrev()
5157 gen_or(b0, b1); in gen_proto_abbrev()
5159 gen_or(b0, b1); in gen_proto_abbrev()
5164 b1 = gen_proto(cstate, ISIS_L2_LSP, Q_ISIS, Q_DEFAULT); in gen_proto_abbrev()
5165 gen_or(b0, b1); in gen_proto_abbrev()
5170 b1 = gen_proto(cstate, ISIS_L2_CSNP, Q_ISIS, Q_DEFAULT); in gen_proto_abbrev()
5171 gen_or(b0, b1); in gen_proto_abbrev()
5173 gen_or(b0, b1); in gen_proto_abbrev()
5175 gen_or(b0, b1); in gen_proto_abbrev()
5180 b1 = gen_proto(cstate, ISIS_L2_CSNP, Q_ISIS, Q_DEFAULT); in gen_proto_abbrev()
5181 gen_or(b0, b1); in gen_proto_abbrev()
5186 b1 = gen_proto(cstate, ISIS_L2_PSNP, Q_ISIS, Q_DEFAULT); in gen_proto_abbrev()
5187 gen_or(b0, b1); in gen_proto_abbrev()
5191 b1 = gen_proto(cstate, ISO8473_CLNP, Q_ISO, Q_DEFAULT); in gen_proto_abbrev()
5195 b1 = gen_linktype(cstate, LLCSAP_8021D); in gen_proto_abbrev()
5199 b1 = gen_linktype(cstate, LLCSAP_IPX); in gen_proto_abbrev()
5203 b1 = gen_linktype(cstate, LLCSAP_NETBEUI); in gen_proto_abbrev()
5212 return b1; in gen_proto_abbrev()
5255 struct block *b0, *b1, *tmp; in gen_portop() local
5264 b1 = gen_portatom(cstate, 0, (bpf_int32)port); in gen_portop()
5268 b1 = gen_portatom(cstate, 2, (bpf_int32)port); in gen_portop()
5274 b1 = gen_portatom(cstate, 2, (bpf_int32)port); in gen_portop()
5275 gen_or(tmp, b1); in gen_portop()
5280 b1 = gen_portatom(cstate, 2, (bpf_int32)port); in gen_portop()
5281 gen_and(tmp, b1); in gen_portop()
5287 gen_and(b0, b1); in gen_portop()
5289 return b1; in gen_portop()
5295 struct block *b0, *b1, *tmp; in gen_port() local
5320 b1 = gen_portop(cstate, port, ip_proto, dir); in gen_port()
5325 b1 = gen_portop(cstate, port, IPPROTO_UDP, dir); in gen_port()
5326 gen_or(tmp, b1); in gen_port()
5328 gen_or(tmp, b1); in gen_port()
5334 gen_and(b0, b1); in gen_port()
5335 return b1; in gen_port()
5341 struct block *b0, *b1, *tmp; in gen_portop6() local
5349 b1 = gen_portatom6(cstate, 0, (bpf_int32)port); in gen_portop6()
5353 b1 = gen_portatom6(cstate, 2, (bpf_int32)port); in gen_portop6()
5359 b1 = gen_portatom6(cstate, 2, (bpf_int32)port); in gen_portop6()
5360 gen_or(tmp, b1); in gen_portop6()
5365 b1 = gen_portatom6(cstate, 2, (bpf_int32)port); in gen_portop6()
5366 gen_and(tmp, b1); in gen_portop6()
5372 gen_and(b0, b1); in gen_portop6()
5374 return b1; in gen_portop6()
5380 struct block *b0, *b1, *tmp; in gen_port6() local
5389 b1 = gen_portop6(cstate, port, ip_proto, dir); in gen_port6()
5394 b1 = gen_portop6(cstate, port, IPPROTO_UDP, dir); in gen_port6()
5395 gen_or(tmp, b1); in gen_port6()
5397 gen_or(tmp, b1); in gen_port6()
5403 gen_and(b0, b1); in gen_port6()
5404 return b1; in gen_port6()
5412 struct block *b1, *b2; in gen_portrangeatom() local
5425 b1 = gen_cmp_ge(cstate, OR_TRAN_IPV4, off, BPF_H, v1); in gen_portrangeatom()
5428 gen_and(b1, b2); in gen_portrangeatom()
5437 struct block *b0, *b1, *tmp; in gen_portrangeop() local
5446 b1 = gen_portrangeatom(cstate, 0, (bpf_int32)port1, (bpf_int32)port2); in gen_portrangeop()
5450 b1 = gen_portrangeatom(cstate, 2, (bpf_int32)port1, (bpf_int32)port2); in gen_portrangeop()
5456 b1 = gen_portrangeatom(cstate, 2, (bpf_int32)port1, (bpf_int32)port2); in gen_portrangeop()
5457 gen_or(tmp, b1); in gen_portrangeop()
5462 b1 = gen_portrangeatom(cstate, 2, (bpf_int32)port1, (bpf_int32)port2); in gen_portrangeop()
5463 gen_and(tmp, b1); in gen_portrangeop()
5469 gen_and(b0, b1); in gen_portrangeop()
5471 return b1; in gen_portrangeop()
5478 struct block *b0, *b1, *tmp; in gen_portrange() local
5487 b1 = gen_portrangeop(cstate, port1, port2, ip_proto, dir); in gen_portrange()
5492 b1 = gen_portrangeop(cstate, port1, port2, IPPROTO_UDP, dir); in gen_portrange()
5493 gen_or(tmp, b1); in gen_portrange()
5495 gen_or(tmp, b1); in gen_portrange()
5501 gen_and(b0, b1); in gen_portrange()
5502 return b1; in gen_portrange()
5509 struct block *b1, *b2; in gen_portrangeatom6() local
5522 b1 = gen_cmp_ge(cstate, OR_TRAN_IPV6, off, BPF_H, v1); in gen_portrangeatom6()
5525 gen_and(b1, b2); in gen_portrangeatom6()
5534 struct block *b0, *b1, *tmp; in gen_portrangeop6() local
5542 b1 = gen_portrangeatom6(cstate, 0, (bpf_int32)port1, (bpf_int32)port2); in gen_portrangeop6()
5546 b1 = gen_portrangeatom6(cstate, 2, (bpf_int32)port1, (bpf_int32)port2); in gen_portrangeop6()
5552 b1 = gen_portrangeatom6(cstate, 2, (bpf_int32)port1, (bpf_int32)port2); in gen_portrangeop6()
5553 gen_or(tmp, b1); in gen_portrangeop6()
5558 b1 = gen_portrangeatom6(cstate, 2, (bpf_int32)port1, (bpf_int32)port2); in gen_portrangeop6()
5559 gen_and(tmp, b1); in gen_portrangeop6()
5565 gen_and(b0, b1); in gen_portrangeop6()
5567 return b1; in gen_portrangeop6()
5574 struct block *b0, *b1, *tmp; in gen_portrange6() local
5583 b1 = gen_portrangeop6(cstate, port1, port2, ip_proto, dir); in gen_portrange6()
5588 b1 = gen_portrangeop6(cstate, port1, port2, IPPROTO_UDP, dir); in gen_portrange6()
5589 gen_or(tmp, b1); in gen_portrange6()
5591 gen_or(tmp, b1); in gen_portrange6()
5597 gen_and(b0, b1); in gen_portrange6()
5598 return b1; in gen_portrange6()
5949 struct block *b0, *b1; in gen_check_802_11_data_frame() local
5961 b1 = new_block(cstate, JMP(BPF_JSET)); in gen_check_802_11_data_frame()
5962 b1->s.k = 0x04; in gen_check_802_11_data_frame()
5963 b1->stmts = s; in gen_check_802_11_data_frame()
5964 gen_not(b1); in gen_check_802_11_data_frame()
5966 gen_and(b1, b0); in gen_check_802_11_data_frame()
5983 struct block *b0, *b1; in gen_proto() local
5994 b1 = gen_proto(cstate, v, Q_IPV6, dir); in gen_proto()
5995 gen_or(b0, b1); in gen_proto()
5996 return b1; in gen_proto()
6016 b1 = gen_cmp(cstate, OR_LINKPL, 9, BPF_B, (bpf_int32)v); in gen_proto()
6018 b1 = gen_protochain(cstate, v, Q_IP); in gen_proto()
6020 gen_and(b0, b1); in gen_proto()
6021 return b1; in gen_proto()
6056 b1 = gen_cmp(cstate, OR_LINKPL_NOSNAP, 1, BPF_B, (long)v); in gen_proto()
6057 gen_and(b0, b1); in gen_proto()
6058 return b1; in gen_proto()
6062 b1 = gen_cmp(cstate, OR_LINKPL_NOSNAP, 0, BPF_B, (long)v); in gen_proto()
6063 gen_and(b0, b1); in gen_proto()
6064 return b1; in gen_proto()
6073 b1 = gen_cmp(cstate, OR_LINKPL_NOSNAP, 4, BPF_B, (long)v); in gen_proto()
6074 gen_and(b0, b1); in gen_proto()
6075 return b1; in gen_proto()
6156 b1 = gen_cmp(cstate, OR_LINKPL, 40, BPF_B, (bpf_int32)v); in gen_proto()
6157 gen_and(b2, b1); in gen_proto()
6159 gen_or(b2, b1); in gen_proto()
6161 b1 = gen_protochain(cstate, v, Q_IPV6); in gen_proto()
6163 gen_and(b0, b1); in gen_proto()
6164 return b1; in gen_proto()
7279 struct block *b0, *b1, *b2; in gen_broadcast() local
7293 b1 = gen_prevlinkhdr_check(cstate); in gen_broadcast()
7295 if (b1 != NULL) in gen_broadcast()
7296 gen_and(b1, b0); in gen_broadcast()
7325 b1 = gen_mcmp(cstate, OR_LINKPL, 16, BPF_W, (bpf_int32)0, hostmask); in gen_broadcast()
7328 gen_or(b1, b2); in gen_broadcast()
7358 register struct block *b0, *b1, *b2; in gen_multicast() local
7373 b1 = gen_prevlinkhdr_check(cstate); in gen_multicast()
7376 if (b1 != NULL) in gen_multicast()
7377 gen_and(b1, b0); in gen_multicast()
7417 b1 = new_block(cstate, JMP(BPF_JSET)); in gen_multicast()
7418 b1->s.k = 0x01; /* To DS */ in gen_multicast()
7419 b1->stmts = s; in gen_multicast()
7425 gen_and(b1, b0); in gen_multicast()
7440 b1 = gen_mac_multicast(cstate, 4); in gen_multicast()
7441 gen_and(b2, b1); in gen_multicast()
7447 gen_or(b1, b0); in gen_multicast()
7454 b1 = new_block(cstate, JMP(BPF_JSET)); in gen_multicast()
7455 b1->s.k = 0x08; in gen_multicast()
7456 b1->stmts = s; in gen_multicast()
7461 gen_and(b1, b0); in gen_multicast()
7477 b1 = gen_mac_multicast(cstate, 4); in gen_multicast()
7478 gen_and(b2, b1); in gen_multicast()
7485 gen_or(b1, b0); in gen_multicast()
7496 b1 = new_block(cstate, JMP(BPF_JSET)); in gen_multicast()
7497 b1->s.k = 0x04; in gen_multicast()
7498 b1->stmts = s; in gen_multicast()
7499 gen_not(b1); in gen_multicast()
7505 gen_and(b1, b0); in gen_multicast()
7518 b1 = gen_cmp_ge(cstate, OR_LINKPL, 16, BPF_B, (bpf_int32)224); in gen_multicast()
7519 gen_and(b0, b1); in gen_multicast()
7520 return b1; in gen_multicast()
7524 b1 = gen_cmp(cstate, OR_LINKPL, 24, BPF_B, (bpf_int32)255); in gen_multicast()
7525 gen_and(b0, b1); in gen_multicast()
7526 return b1; in gen_multicast()
7899 register struct block *b0, *b1; in gen_ahostop() local
7911 b1 = gen_ahostop(cstate, eaddr, Q_DST); in gen_ahostop()
7912 gen_and(b0, b1); in gen_ahostop()
7913 return b1; in gen_ahostop()
7918 b1 = gen_ahostop(cstate, eaddr, Q_DST); in gen_ahostop()
7919 gen_or(b0, b1); in gen_ahostop()
7920 return b1; in gen_ahostop()
7954 struct block *b0, *b1; in gen_vlan_bpf_extensions() local
7970 b1 = new_block(cstate, JMP(BPF_JEQ)); in gen_vlan_bpf_extensions()
7971 b1->stmts = s; in gen_vlan_bpf_extensions()
7972 b1->s.k = (bpf_int32) vlan_num; in gen_vlan_bpf_extensions()
7974 gen_and(b0,b1); in gen_vlan_bpf_extensions()
7975 b0 = b1; in gen_vlan_bpf_extensions()
7985 struct block *b0, *b1; in gen_vlan_no_bpf_extensions() local
7989 b1 = gen_linktype(cstate, ETHERTYPE_8021AD); in gen_vlan_no_bpf_extensions()
7990 gen_or(b0,b1); in gen_vlan_no_bpf_extensions()
7991 b0 = b1; in gen_vlan_no_bpf_extensions()
7992 b1 = gen_linktype(cstate, ETHERTYPE_8021QINQ); in gen_vlan_no_bpf_extensions()
7993 gen_or(b0,b1); in gen_vlan_no_bpf_extensions()
7994 b0 = b1; in gen_vlan_no_bpf_extensions()
7998 b1 = gen_mcmp(cstate, OR_LINKPL, 0, BPF_H, in gen_vlan_no_bpf_extensions()
8000 gen_and(b0, b1); in gen_vlan_no_bpf_extensions()
8001 b0 = b1; in gen_vlan_no_bpf_extensions()
8109 struct block *b0, *b1; in gen_mpls() local
8148 b1 = gen_mcmp(cstate, OR_LINKPL, 0, BPF_W, (bpf_int32)label_num, in gen_mpls()
8150 gen_and(b0, b1); in gen_mpls()
8151 b0 = b1; in gen_mpls()
8187 struct block *b0, *b1; in gen_pppoes() local
8196 b1 = gen_mcmp(cstate, OR_LINKPL, 0, BPF_W, in gen_pppoes()
8198 gen_and(b0, b1); in gen_pppoes()
8199 b0 = b1; in gen_pppoes()
8261 struct block *b0, *b1; in gen_geneve_check() local
8268 b1 = gen_mcmp(cstate, offrel, 8, BPF_B, (bpf_int32)0, 0xc0); in gen_geneve_check()
8269 gen_and(b0, b1); in gen_geneve_check()
8270 b0 = b1; in gen_geneve_check()
8274 b1 = gen_mcmp(cstate, offrel, 12, BPF_W, (bpf_int32)vni, in gen_geneve_check()
8276 gen_and(b0, b1); in gen_geneve_check()
8277 b0 = b1; in gen_geneve_check()
8291 struct block *b0, *b1; in gen_geneve4() local
8305 b1 = new_block(cstate, BPF_JMP|BPF_JEQ|BPF_X); in gen_geneve4()
8306 b1->stmts = s; in gen_geneve4()
8307 b1->s.k = 0; in gen_geneve4()
8309 gen_and(b0, b1); in gen_geneve4()
8311 return b1; in gen_geneve4()
8317 struct block *b0, *b1; in gen_geneve6() local
8344 b1 = new_block(cstate, BPF_JMP|BPF_JEQ|BPF_X); in gen_geneve6()
8345 b1->stmts = s; in gen_geneve6()
8346 b1->s.k = 0; in gen_geneve6()
8348 gen_and(b0, b1); in gen_geneve6()
8350 return b1; in gen_geneve6()
8495 struct block *b0, *b1; in gen_geneve() local
8499 b1 = gen_geneve6(cstate, vni); in gen_geneve()
8501 gen_or(b0, b1); in gen_geneve()
8502 b0 = b1; in gen_geneve()
8509 b1 = gen_true(cstate); in gen_geneve()
8510 sappend(s, b1->stmts); in gen_geneve()
8511 b1->stmts = s; in gen_geneve()
8513 gen_and(b0, b1); in gen_geneve()
8517 return b1; in gen_geneve()
8607 struct block *b0, *b1; in gen_atmtype_abbrev() local
8616 b1 = gen_atmfield_code(cstate, A_VCI, 1, BPF_JEQ, 0); in gen_atmtype_abbrev()
8617 gen_and(b0, b1); in gen_atmtype_abbrev()
8625 b1 = gen_atmfield_code(cstate, A_VCI, 2, BPF_JEQ, 0); in gen_atmtype_abbrev()
8626 gen_and(b0, b1); in gen_atmtype_abbrev()
8634 b1 = gen_atmfield_code(cstate, A_VCI, 3, BPF_JEQ, 0); in gen_atmtype_abbrev()
8635 gen_and(b0, b1); in gen_atmtype_abbrev()
8643 b1 = gen_atmfield_code(cstate, A_VCI, 4, BPF_JEQ, 0); in gen_atmtype_abbrev()
8644 gen_and(b0, b1); in gen_atmtype_abbrev()
8652 b1 = gen_atmfield_code(cstate, A_VCI, 5, BPF_JEQ, 0); in gen_atmtype_abbrev()
8653 gen_and(b0, b1); in gen_atmtype_abbrev()
8661 b1 = gen_atmfield_code(cstate, A_VCI, 16, BPF_JEQ, 0); in gen_atmtype_abbrev()
8662 gen_and(b0, b1); in gen_atmtype_abbrev()
8669 b1 = gen_atmfield_code(cstate, A_PROTOTYPE, PT_LANE, BPF_JEQ, 0); in gen_atmtype_abbrev()
8692 b1 = gen_atmfield_code(cstate, A_PROTOTYPE, PT_LLC, BPF_JEQ, 0); in gen_atmtype_abbrev()
8699 return b1; in gen_atmtype_abbrev()
8712 struct block *b0, *b1; in gen_mtp2type_abbrev() local
8731 b1 = gen_ncmp(cstate, OR_PACKET, cstate->off_li, BPF_B, 0x3f, BPF_JGT, 0, 0); in gen_mtp2type_abbrev()
8732 gen_and(b1, b0); in gen_mtp2type_abbrev()
8758 b1 = gen_ncmp(cstate, OR_PACKET, cstate->off_li_hsl, BPF_H, 0xff80, BPF_JGT, 0, 0); in gen_mtp2type_abbrev()
8759 gen_and(b1, b0); in gen_mtp2type_abbrev()
8873 struct block *b1; in gen_msg_abbrev() local
8882 b1 = gen_atmfield_code(cstate, A_MSGTYPE, SETUP, BPF_JEQ, 0); in gen_msg_abbrev()
8886 b1 = gen_atmfield_code(cstate, A_MSGTYPE, CALL_PROCEED, BPF_JEQ, 0); in gen_msg_abbrev()
8890 b1 = gen_atmfield_code(cstate, A_MSGTYPE, CONNECT, BPF_JEQ, 0); in gen_msg_abbrev()
8894 b1 = gen_atmfield_code(cstate, A_MSGTYPE, CONNECT_ACK, BPF_JEQ, 0); in gen_msg_abbrev()
8898 b1 = gen_atmfield_code(cstate, A_MSGTYPE, RELEASE, BPF_JEQ, 0); in gen_msg_abbrev()
8902 b1 = gen_atmfield_code(cstate, A_MSGTYPE, RELEASE_DONE, BPF_JEQ, 0); in gen_msg_abbrev()
8908 return b1; in gen_msg_abbrev()
8914 struct block *b0, *b1; in gen_atmmulti_abbrev() local
8921 b1 = gen_atmmulti_abbrev(cstate, A_OAMF4); in gen_atmmulti_abbrev()
8929 b1 = gen_atmfield_code(cstate, A_VCI, 4, BPF_JEQ, 0); in gen_atmmulti_abbrev()
8930 gen_or(b0, b1); in gen_atmmulti_abbrev()
8932 gen_and(b0, b1); in gen_atmmulti_abbrev()
8943 b1 = gen_msg_abbrev(cstate, A_CALLPROCEED); in gen_atmmulti_abbrev()
8944 gen_or(b0, b1); in gen_atmmulti_abbrev()
8946 gen_or(b0, b1); in gen_atmmulti_abbrev()
8948 gen_or(b0, b1); in gen_atmmulti_abbrev()
8950 gen_or(b0, b1); in gen_atmmulti_abbrev()
8952 gen_or(b0, b1); in gen_atmmulti_abbrev()
8954 gen_and(b0, b1); in gen_atmmulti_abbrev()
8961 b1 = gen_msg_abbrev(cstate, A_CALLPROCEED); in gen_atmmulti_abbrev()
8962 gen_or(b0, b1); in gen_atmmulti_abbrev()
8964 gen_or(b0, b1); in gen_atmmulti_abbrev()
8966 gen_or(b0, b1); in gen_atmmulti_abbrev()
8968 gen_or(b0, b1); in gen_atmmulti_abbrev()
8970 gen_and(b0, b1); in gen_atmmulti_abbrev()
8976 return b1; in gen_atmmulti_abbrev()