• Home
  • Raw
  • Download

Lines Matching refs:b1

930 merge(struct block *b0, struct block *b1)  in merge()  argument
939 *p = b1; in merge()
1000 gen_and(struct block *b0, struct block *b1) in gen_and() argument
1002 backpatch(b0, b1->head); in gen_and()
1004 b1->sense = !b1->sense; in gen_and()
1005 merge(b1, b0); in gen_and()
1006 b1->sense = !b1->sense; in gen_and()
1007 b1->head = b0->head; in gen_and()
1011 gen_or(struct block *b0, struct block *b1) in gen_or() argument
1014 backpatch(b0, b1->head); in gen_or()
1016 merge(b1, b0); in gen_or()
1017 b1->head = b0->head; in gen_or()
1963 struct block *b0, *b1; in gen_ether_linktype() local
1984 b1 = gen_cmp(cstate, OR_LLC, 0, BPF_H, (ll_proto << 8) | ll_proto); in gen_ether_linktype()
1985 gen_and(b0, b1); in gen_ether_linktype()
1986 return b1; in gen_ether_linktype()
2022 b1 = gen_cmp(cstate, OR_LLC, 0, BPF_H, 0xFFFF); in gen_ether_linktype()
2023 gen_or(b0, b1); in gen_ether_linktype()
2030 gen_or(b0, b1); in gen_ether_linktype()
2045 gen_and(b0, b1); in gen_ether_linktype()
2053 gen_or(b0, b1); in gen_ether_linktype()
2054 return b1; in gen_ether_linktype()
2083 b1 = gen_snap(cstate, 0x080007, ETHERTYPE_ATALK); in gen_ether_linktype()
2085 b1 = gen_snap(cstate, 0x000000, ETHERTYPE_AARP); in gen_ether_linktype()
2086 gen_and(b0, b1); in gen_ether_linktype()
2095 gen_or(b0, b1); in gen_ether_linktype()
2096 return b1; in gen_ether_linktype()
2110 b1 = gen_cmp(cstate, OR_LINKTYPE, 2, BPF_B, ll_proto); in gen_ether_linktype()
2111 gen_and(b0, b1); in gen_ether_linktype()
2112 return b1; in gen_ether_linktype()
2198 struct block *b0, *b1; in gen_linux_sll_linktype() local
2218 b1 = gen_cmp(cstate, OR_LLC, 0, BPF_H, (ll_proto << 8) | ll_proto); in gen_linux_sll_linktype()
2219 gen_and(b0, b1); in gen_linux_sll_linktype()
2220 return b1; in gen_linux_sll_linktype()
2249 b1 = gen_snap(cstate, 0x000000, ETHERTYPE_IPX); in gen_linux_sll_linktype()
2250 gen_or(b0, b1); in gen_linux_sll_linktype()
2252 gen_and(b0, b1); in gen_linux_sll_linktype()
2259 gen_or(b0, b1); in gen_linux_sll_linktype()
2267 gen_or(b0, b1); in gen_linux_sll_linktype()
2268 return b1; in gen_linux_sll_linktype()
2296 b1 = gen_snap(cstate, 0x080007, ETHERTYPE_ATALK); in gen_linux_sll_linktype()
2298 b1 = gen_snap(cstate, 0x000000, ETHERTYPE_AARP); in gen_linux_sll_linktype()
2299 gen_and(b0, b1); in gen_linux_sll_linktype()
2308 gen_or(b0, b1); in gen_linux_sll_linktype()
2309 return b1; in gen_linux_sll_linktype()
2321 b1 = gen_cmp(cstate, OR_LINKHDR, cstate->off_linkpl.constant_part, BPF_B, in gen_linux_sll_linktype()
2323 gen_and(b0, b1); in gen_linux_sll_linktype()
2324 return b1; in gen_linux_sll_linktype()
3136 struct block *b0, *b1, *b2; in gen_linktype() local
3155 b1 = gen_ether_linktype(cstate, ll_proto); in gen_linktype()
3157 gen_and(b0, b1); in gen_linktype()
3158 return b1; in gen_linktype()
3186 b1 = gen_llc_linktype(cstate, ll_proto); in gen_linktype()
3187 gen_and(b0, b1); in gen_linktype()
3188 return b1; in gen_linktype()
3220 b1 = gen_llc_linktype(cstate, ll_proto); in gen_linktype()
3221 gen_and(b0, b1); in gen_linktype()
3222 return b1; in gen_linktype()
3301 b1 = gen_cmp(cstate, OR_LINKTYPE, 0, BPF_H, PPP_VJC); in gen_linktype()
3302 gen_or(b0, b1); in gen_linktype()
3304 gen_or(b1, b0); in gen_linktype()
3350 b1 = gen_loopback_linktype(cstate, BSD_AFNUM_INET6_FREEBSD); in gen_linktype()
3351 gen_or(b0, b1); in gen_linktype()
3353 gen_or(b0, b1); in gen_linktype()
3354 return (b1); in gen_linktype()
3426 b1 = gen_cmp(cstate, OR_LINKTYPE, 0, BPF_B, in gen_linktype()
3428 gen_or(b0, b1); in gen_linktype()
3429 return (b1); in gen_linktype()
3434 b1 = gen_cmp(cstate, OR_LINKTYPE, 0, BPF_B, in gen_linktype()
3436 gen_or(b0, b1); in gen_linktype()
3437 return (b1); in gen_linktype()
3490 b1 = gen_cmp(cstate, OR_LINKHDR, 2, BPF_H, (0x03<<8) | ISO9542_ESIS); in gen_linktype()
3492 gen_or(b1, b2); in gen_linktype()
3661 struct block *b0, *b1; in gen_llc_internal() local
3677 b1 = gen_cmp(cstate, OR_LLC, 0, BPF_H, 0xFFFF); in gen_llc_internal()
3678 gen_not(b1); in gen_llc_internal()
3679 gen_and(b0, b1); in gen_llc_internal()
3680 return b1; in gen_llc_internal()
3746 struct block *b0, *b1; in gen_llc_i() local
3766 b1 = new_block(cstate, JMP(BPF_JSET)); in gen_llc_i()
3767 b1->s.k = 0x01; in gen_llc_i()
3768 b1->stmts = s; in gen_llc_i()
3769 gen_not(b1); in gen_llc_i()
3770 gen_and(b0, b1); in gen_llc_i()
3771 return b1; in gen_llc_i()
3777 struct block *b0, *b1; in gen_llc_s() local
3795 b1 = gen_mcmp(cstate, OR_LLC, 2, BPF_B, LLC_S_FMT, 0x03); in gen_llc_s()
3796 gen_and(b0, b1); in gen_llc_s()
3797 return b1; in gen_llc_s()
3803 struct block *b0, *b1; in gen_llc_u() local
3821 b1 = gen_mcmp(cstate, OR_LLC, 2, BPF_B, LLC_U_FMT, 0x03); in gen_llc_u()
3822 gen_and(b0, b1); in gen_llc_u()
3823 return b1; in gen_llc_u()
3829 struct block *b0, *b1; in gen_llc_s_subtype() local
3846 b1 = gen_mcmp(cstate, OR_LLC, 2, BPF_B, subtype, LLC_S_CMD_MASK); in gen_llc_s_subtype()
3847 gen_and(b0, b1); in gen_llc_s_subtype()
3848 return b1; in gen_llc_s_subtype()
3854 struct block *b0, *b1; in gen_llc_u_subtype() local
3871 b1 = gen_mcmp(cstate, OR_LLC, 2, BPF_B, subtype, LLC_U_CMD_MASK); in gen_llc_u_subtype()
3872 gen_and(b0, b1); in gen_llc_u_subtype()
3873 return b1; in gen_llc_u_subtype()
3966 struct block *b0, *b1; in gen_hostop() local
3981 b1 = gen_hostop(cstate, addr, mask, Q_DST, ll_proto, src_off, dst_off); in gen_hostop()
3982 gen_and(b0, b1); in gen_hostop()
3983 return b1; in gen_hostop()
3988 b1 = gen_hostop(cstate, addr, mask, Q_DST, ll_proto, src_off, dst_off); in gen_hostop()
3989 gen_or(b0, b1); in gen_hostop()
3990 return b1; in gen_hostop()
4021 b1 = gen_mcmp(cstate, OR_LINKPL, offset, BPF_W, addr, mask); in gen_hostop()
4022 gen_and(b0, b1); in gen_hostop()
4023 return b1; in gen_hostop()
4032 struct block *b0, *b1; in gen_hostop6() local
4048 b1 = gen_hostop6(cstate, addr, mask, Q_DST, ll_proto, src_off, dst_off); in gen_hostop6()
4049 gen_and(b0, b1); in gen_hostop6()
4050 return b1; in gen_hostop6()
4055 b1 = gen_hostop6(cstate, addr, mask, Q_DST, ll_proto, src_off, dst_off); in gen_hostop6()
4056 gen_or(b0, b1); in gen_hostop6()
4057 return b1; in gen_hostop6()
4090 b1 = gen_mcmp(cstate, OR_LINKPL, offset + 12, BPF_W, ntohl(a[3]), ntohl(m[3])); in gen_hostop6()
4092 gen_and(b0, b1); in gen_hostop6()
4094 gen_and(b0, b1); in gen_hostop6()
4096 gen_and(b0, b1); in gen_hostop6()
4098 gen_and(b0, b1); in gen_hostop6()
4099 return b1; in gen_hostop6()
4106 register struct block *b0, *b1; in gen_ehostop() local
4117 b1 = gen_ehostop(cstate, eaddr, Q_DST); in gen_ehostop()
4118 gen_and(b0, b1); in gen_ehostop()
4119 return b1; in gen_ehostop()
4124 b1 = gen_ehostop(cstate, eaddr, Q_DST); in gen_ehostop()
4125 gen_or(b0, b1); in gen_ehostop()
4126 return b1; in gen_ehostop()
4162 struct block *b0, *b1; in gen_fhostop() local
4173 b1 = gen_fhostop(cstate, eaddr, Q_DST); in gen_fhostop()
4174 gen_and(b0, b1); in gen_fhostop()
4175 return b1; in gen_fhostop()
4180 b1 = gen_fhostop(cstate, eaddr, Q_DST); in gen_fhostop()
4181 gen_or(b0, b1); in gen_fhostop()
4182 return b1; in gen_fhostop()
4218 register struct block *b0, *b1; in gen_thostop() local
4229 b1 = gen_thostop(cstate, eaddr, Q_DST); in gen_thostop()
4230 gen_and(b0, b1); in gen_thostop()
4231 return b1; in gen_thostop()
4236 b1 = gen_thostop(cstate, eaddr, Q_DST); in gen_thostop()
4237 gen_or(b0, b1); in gen_thostop()
4238 return b1; in gen_thostop()
4275 register struct block *b0, *b1, *b2; in gen_wlanhostop() local
4316 b1 = new_block(cstate, JMP(BPF_JSET)); in gen_wlanhostop()
4317 b1->s.k = 0x01; /* To DS */ in gen_wlanhostop()
4318 b1->stmts = s; in gen_wlanhostop()
4324 gen_and(b1, b0); in gen_wlanhostop()
4339 b1 = gen_bcmp(cstate, OR_LINKHDR, 16, 6, eaddr); in gen_wlanhostop()
4340 gen_and(b2, b1); in gen_wlanhostop()
4347 gen_or(b1, b0); in gen_wlanhostop()
4354 b1 = new_block(cstate, JMP(BPF_JSET)); in gen_wlanhostop()
4355 b1->s.k = 0x02; /* From DS */ in gen_wlanhostop()
4356 b1->stmts = s; in gen_wlanhostop()
4357 gen_and(b1, b0); in gen_wlanhostop()
4371 b1 = gen_bcmp(cstate, OR_LINKHDR, 10, 6, eaddr); in gen_wlanhostop()
4372 gen_and(b2, b1); in gen_wlanhostop()
4379 gen_or(b1, b0); in gen_wlanhostop()
4386 b1 = new_block(cstate, JMP(BPF_JSET)); in gen_wlanhostop()
4387 b1->s.k = 0x08; in gen_wlanhostop()
4388 b1->stmts = s; in gen_wlanhostop()
4393 gen_and(b1, b0); in gen_wlanhostop()
4409 b1 = gen_bcmp(cstate, OR_LINKHDR, 10, 6, eaddr); in gen_wlanhostop()
4410 gen_and(b2, b1); in gen_wlanhostop()
4417 gen_or(b1, b0); in gen_wlanhostop()
4428 b1 = new_block(cstate, JMP(BPF_JSET)); in gen_wlanhostop()
4429 b1->s.k = 0x04; in gen_wlanhostop()
4430 b1->stmts = s; in gen_wlanhostop()
4431 gen_not(b1); in gen_wlanhostop()
4437 gen_and(b1, b0); in gen_wlanhostop()
4463 b1 = new_block(cstate, JMP(BPF_JSET)); in gen_wlanhostop()
4464 b1->s.k = 0x01; /* To DS */ in gen_wlanhostop()
4465 b1->stmts = s; in gen_wlanhostop()
4471 gen_and(b1, b0); in gen_wlanhostop()
4486 b1 = gen_bcmp(cstate, OR_LINKHDR, 4, 6, eaddr); in gen_wlanhostop()
4487 gen_and(b2, b1); in gen_wlanhostop()
4493 gen_or(b1, b0); in gen_wlanhostop()
4500 b1 = new_block(cstate, JMP(BPF_JSET)); in gen_wlanhostop()
4501 b1->s.k = 0x08; in gen_wlanhostop()
4502 b1->stmts = s; in gen_wlanhostop()
4507 gen_and(b1, b0); in gen_wlanhostop()
4523 b1 = gen_bcmp(cstate, OR_LINKHDR, 4, 6, eaddr); in gen_wlanhostop()
4524 gen_and(b2, b1); in gen_wlanhostop()
4531 gen_or(b1, b0); in gen_wlanhostop()
4542 b1 = new_block(cstate, JMP(BPF_JSET)); in gen_wlanhostop()
4543 b1->s.k = 0x04; in gen_wlanhostop()
4544 b1->stmts = s; in gen_wlanhostop()
4545 gen_not(b1); in gen_wlanhostop()
4551 gen_and(b1, b0); in gen_wlanhostop()
4556 b1 = gen_wlanhostop(cstate, eaddr, Q_DST); in gen_wlanhostop()
4557 gen_and(b0, b1); in gen_wlanhostop()
4558 return b1; in gen_wlanhostop()
4563 b1 = gen_wlanhostop(cstate, eaddr, Q_DST); in gen_wlanhostop()
4564 gen_or(b0, b1); in gen_wlanhostop()
4565 return b1; in gen_wlanhostop()
4580 b1 = gen_mcmp(cstate, OR_LINKHDR, 0, BPF_B, IEEE80211_FC0_SUBTYPE_CTS, in gen_wlanhostop()
4582 gen_not(b1); in gen_wlanhostop()
4586 gen_and(b1, b2); in gen_wlanhostop()
4588 b1 = gen_bcmp(cstate, OR_LINKHDR, 10, 6, eaddr); in gen_wlanhostop()
4589 gen_and(b2, b1); in gen_wlanhostop()
4590 return b1; in gen_wlanhostop()
4599 b1 = gen_bcmp(cstate, OR_LINKHDR, 16, 6, eaddr); in gen_wlanhostop()
4600 gen_and(b0, b1); in gen_wlanhostop()
4601 return b1; in gen_wlanhostop()
4612 b1 = gen_bcmp(cstate, OR_LINKHDR, 24, 6, eaddr); in gen_wlanhostop()
4613 gen_and(b0, b1); in gen_wlanhostop()
4614 return b1; in gen_wlanhostop()
4628 b1 = new_block(cstate, JMP(BPF_JSET)); in gen_wlanhostop()
4629 b1->s.k = 0x08; in gen_wlanhostop()
4630 b1->stmts = s; in gen_wlanhostop()
4640 gen_and(b1, b0); in gen_wlanhostop()
4655 b1 = gen_mcmp(cstate, OR_LINKHDR, 0, BPF_B, IEEE80211_FC0_SUBTYPE_CTS, in gen_wlanhostop()
4657 gen_not(b1); in gen_wlanhostop()
4661 gen_and(b1, b2); in gen_wlanhostop()
4670 b1 = new_block(cstate, JMP(BPF_JSET)); in gen_wlanhostop()
4671 b1->s.k = 0x08; in gen_wlanhostop()
4672 b1->stmts = s; in gen_wlanhostop()
4678 gen_and(b1, b2); in gen_wlanhostop()
4683 b1 = gen_bcmp(cstate, OR_LINKHDR, 10, 6, eaddr); in gen_wlanhostop()
4684 gen_and(b2, b1); in gen_wlanhostop()
4685 return b1; in gen_wlanhostop()
4699 register struct block *b0, *b1; in gen_ipfchostop() local
4710 b1 = gen_ipfchostop(cstate, eaddr, Q_DST); in gen_ipfchostop()
4711 gen_and(b0, b1); in gen_ipfchostop()
4712 return b1; in gen_ipfchostop()
4717 b1 = gen_ipfchostop(cstate, eaddr, Q_DST); in gen_ipfchostop()
4718 gen_or(b0, b1); in gen_ipfchostop()
4719 return b1; in gen_ipfchostop()
4770 struct block *b0, *b1, *b2, *tmp; in gen_dnhostop() local
4789 b1 = gen_dnhostop(cstate, addr, Q_DST); in gen_dnhostop()
4790 gen_and(b0, b1); in gen_dnhostop()
4791 return b1; in gen_dnhostop()
4797 b1 = gen_dnhostop(cstate, addr, Q_DST); in gen_dnhostop()
4798 gen_or(b0, b1); in gen_dnhostop()
4799 return b1; in gen_dnhostop()
4833 b1 = gen_cmp(cstate, OR_LINKPL, 2 + 1 + offset_lh, in gen_dnhostop()
4835 gen_and(tmp, b1); in gen_dnhostop()
4842 gen_or(b2, b1); in gen_dnhostop()
4849 gen_or(b2, b1); in gen_dnhostop()
4856 gen_or(b2, b1); in gen_dnhostop()
4859 gen_and(b0, b1); in gen_dnhostop()
4860 return b1; in gen_dnhostop()
4871 struct block *b0, *b1; in gen_mpls_linktype() local
4879 b1 = gen_mcmp(cstate, OR_LINKPL, 0, BPF_B, 0x40, 0xf0); in gen_mpls_linktype()
4880 gen_and(b0, b1); in gen_mpls_linktype()
4881 return b1; in gen_mpls_linktype()
4887 b1 = gen_mcmp(cstate, OR_LINKPL, 0, BPF_B, 0x60, 0xf0); in gen_mpls_linktype()
4888 gen_and(b0, b1); in gen_mpls_linktype()
4889 return b1; in gen_mpls_linktype()
4902 struct block *b0, *b1; in gen_host() local
4919 b1 = gen_host(cstate, addr, mask, Q_ARP, dir, type); in gen_host()
4920 gen_or(b0, b1); in gen_host()
4922 gen_or(b1, b0); in gen_host()
5195 struct block *b0, *b1, *tmp; in gen_gateway() local
5211 b1 = gen_prevlinkhdr_check(cstate); in gen_gateway()
5213 if (b1 != NULL) in gen_gateway()
5214 gen_and(b1, b0); in gen_gateway()
5245 b1 = NULL; in gen_gateway()
5265 if (b1 == NULL) { in gen_gateway()
5269 b1 = tmp; in gen_gateway()
5276 gen_or(b1, tmp); in gen_gateway()
5277 b1 = tmp; in gen_gateway()
5282 if (b1 == NULL) { in gen_gateway()
5288 gen_not(b1); in gen_gateway()
5289 gen_and(b0, b1); in gen_gateway()
5290 return b1; in gen_gateway()
5301 struct block *b1; in gen_proto_abbrev_internal() local
5306 b1 = gen_proto(cstate, IPPROTO_SCTP, Q_IP, Q_DEFAULT); in gen_proto_abbrev_internal()
5308 gen_or(b0, b1); in gen_proto_abbrev_internal()
5312 b1 = gen_proto(cstate, IPPROTO_TCP, Q_IP, Q_DEFAULT); in gen_proto_abbrev_internal()
5314 gen_or(b0, b1); in gen_proto_abbrev_internal()
5318 b1 = gen_proto(cstate, IPPROTO_UDP, Q_IP, Q_DEFAULT); in gen_proto_abbrev_internal()
5320 gen_or(b0, b1); in gen_proto_abbrev_internal()
5324 b1 = gen_proto(cstate, IPPROTO_ICMP, Q_IP, Q_DEFAULT); in gen_proto_abbrev_internal()
5332 b1 = gen_proto(cstate, IPPROTO_IGMP, Q_IP, Q_DEFAULT); in gen_proto_abbrev_internal()
5339 b1 = gen_proto(cstate, IPPROTO_IGRP, Q_IP, Q_DEFAULT); in gen_proto_abbrev_internal()
5347 b1 = gen_proto(cstate, IPPROTO_PIM, Q_IP, Q_DEFAULT); in gen_proto_abbrev_internal()
5349 gen_or(b0, b1); in gen_proto_abbrev_internal()
5357 b1 = gen_proto(cstate, IPPROTO_VRRP, Q_IP, Q_DEFAULT); in gen_proto_abbrev_internal()
5365 b1 = gen_proto(cstate, IPPROTO_CARP, Q_IP, Q_DEFAULT); in gen_proto_abbrev_internal()
5369 b1 = gen_linktype(cstate, ETHERTYPE_IP); in gen_proto_abbrev_internal()
5373 b1 = gen_linktype(cstate, ETHERTYPE_ARP); in gen_proto_abbrev_internal()
5377 b1 = gen_linktype(cstate, ETHERTYPE_REVARP); in gen_proto_abbrev_internal()
5384 b1 = gen_linktype(cstate, ETHERTYPE_ATALK); in gen_proto_abbrev_internal()
5388 b1 = gen_linktype(cstate, ETHERTYPE_AARP); in gen_proto_abbrev_internal()
5392 b1 = gen_linktype(cstate, ETHERTYPE_DN); in gen_proto_abbrev_internal()
5396 b1 = gen_linktype(cstate, ETHERTYPE_SCA); in gen_proto_abbrev_internal()
5400 b1 = gen_linktype(cstate, ETHERTYPE_LAT); in gen_proto_abbrev_internal()
5404 b1 = gen_linktype(cstate, ETHERTYPE_MOPDL); in gen_proto_abbrev_internal()
5408 b1 = gen_linktype(cstate, ETHERTYPE_MOPRC); in gen_proto_abbrev_internal()
5412 b1 = gen_linktype(cstate, ETHERTYPE_IPV6); in gen_proto_abbrev_internal()
5419 b1 = gen_proto(cstate, IPPROTO_ICMPV6, Q_IPV6, Q_DEFAULT); in gen_proto_abbrev_internal()
5426 b1 = gen_proto(cstate, IPPROTO_AH, Q_IP, Q_DEFAULT); in gen_proto_abbrev_internal()
5428 gen_or(b0, b1); in gen_proto_abbrev_internal()
5435 b1 = gen_proto(cstate, IPPROTO_ESP, Q_IP, Q_DEFAULT); in gen_proto_abbrev_internal()
5437 gen_or(b0, b1); in gen_proto_abbrev_internal()
5441 b1 = gen_linktype(cstate, LLCSAP_ISONS); in gen_proto_abbrev_internal()
5445 b1 = gen_proto(cstate, ISO9542_ESIS, Q_ISO, Q_DEFAULT); in gen_proto_abbrev_internal()
5449 b1 = gen_proto(cstate, ISO10589_ISIS, Q_ISO, Q_DEFAULT); in gen_proto_abbrev_internal()
5454 b1 = gen_proto(cstate, ISIS_PTP_IIH, Q_ISIS, Q_DEFAULT); /* FIXME extract the circuit-type bits */ in gen_proto_abbrev_internal()
5455 gen_or(b0, b1); in gen_proto_abbrev_internal()
5457 gen_or(b0, b1); in gen_proto_abbrev_internal()
5459 gen_or(b0, b1); in gen_proto_abbrev_internal()
5461 gen_or(b0, b1); in gen_proto_abbrev_internal()
5466 b1 = gen_proto(cstate, ISIS_PTP_IIH, Q_ISIS, Q_DEFAULT); /* FIXME extract the circuit-type bits */ in gen_proto_abbrev_internal()
5467 gen_or(b0, b1); in gen_proto_abbrev_internal()
5469 gen_or(b0, b1); in gen_proto_abbrev_internal()
5471 gen_or(b0, b1); in gen_proto_abbrev_internal()
5473 gen_or(b0, b1); in gen_proto_abbrev_internal()
5478 b1 = gen_proto(cstate, ISIS_L2_LAN_IIH, Q_ISIS, Q_DEFAULT); in gen_proto_abbrev_internal()
5479 gen_or(b0, b1); in gen_proto_abbrev_internal()
5481 gen_or(b0, b1); in gen_proto_abbrev_internal()
5486 b1 = gen_proto(cstate, ISIS_L2_LSP, Q_ISIS, Q_DEFAULT); in gen_proto_abbrev_internal()
5487 gen_or(b0, b1); in gen_proto_abbrev_internal()
5492 b1 = gen_proto(cstate, ISIS_L2_CSNP, Q_ISIS, Q_DEFAULT); in gen_proto_abbrev_internal()
5493 gen_or(b0, b1); in gen_proto_abbrev_internal()
5495 gen_or(b0, b1); in gen_proto_abbrev_internal()
5497 gen_or(b0, b1); in gen_proto_abbrev_internal()
5502 b1 = gen_proto(cstate, ISIS_L2_CSNP, Q_ISIS, Q_DEFAULT); in gen_proto_abbrev_internal()
5503 gen_or(b0, b1); in gen_proto_abbrev_internal()
5508 b1 = gen_proto(cstate, ISIS_L2_PSNP, Q_ISIS, Q_DEFAULT); in gen_proto_abbrev_internal()
5509 gen_or(b0, b1); in gen_proto_abbrev_internal()
5513 b1 = gen_proto(cstate, ISO8473_CLNP, Q_ISO, Q_DEFAULT); in gen_proto_abbrev_internal()
5517 b1 = gen_linktype(cstate, LLCSAP_8021D); in gen_proto_abbrev_internal()
5521 b1 = gen_linktype(cstate, LLCSAP_IPX); in gen_proto_abbrev_internal()
5525 b1 = gen_linktype(cstate, LLCSAP_NETBEUI); in gen_proto_abbrev_internal()
5534 return b1; in gen_proto_abbrev_internal()
5590 struct block *b0, *b1, *tmp; in gen_portop() local
5599 b1 = gen_portatom(cstate, 0, port); in gen_portop()
5603 b1 = gen_portatom(cstate, 2, port); in gen_portop()
5608 b1 = gen_portatom(cstate, 2, port); in gen_portop()
5609 gen_and(tmp, b1); in gen_portop()
5615 b1 = gen_portatom(cstate, 2, port); in gen_portop()
5616 gen_or(tmp, b1); in gen_portop()
5647 gen_and(b0, b1); in gen_portop()
5649 return b1; in gen_portop()
5655 struct block *b0, *b1, *tmp; in gen_port() local
5680 b1 = gen_portop(cstate, port, (u_int)ip_proto, dir); in gen_port()
5685 b1 = gen_portop(cstate, port, IPPROTO_UDP, dir); in gen_port()
5686 gen_or(tmp, b1); in gen_port()
5688 gen_or(tmp, b1); in gen_port()
5694 gen_and(b0, b1); in gen_port()
5695 return b1; in gen_port()
5701 struct block *b0, *b1, *tmp; in gen_portop6() local
5709 b1 = gen_portatom6(cstate, 0, port); in gen_portop6()
5713 b1 = gen_portatom6(cstate, 2, port); in gen_portop6()
5718 b1 = gen_portatom6(cstate, 2, port); in gen_portop6()
5719 gen_and(tmp, b1); in gen_portop6()
5725 b1 = gen_portatom6(cstate, 2, port); in gen_portop6()
5726 gen_or(tmp, b1); in gen_portop6()
5732 gen_and(b0, b1); in gen_portop6()
5734 return b1; in gen_portop6()
5740 struct block *b0, *b1, *tmp; in gen_port6() local
5749 b1 = gen_portop6(cstate, port, (u_int)ip_proto, dir); in gen_port6()
5754 b1 = gen_portop6(cstate, port, IPPROTO_UDP, dir); in gen_port6()
5755 gen_or(tmp, b1); in gen_port6()
5757 gen_or(tmp, b1); in gen_port6()
5763 gen_and(b0, b1); in gen_port6()
5764 return b1; in gen_port6()
5772 struct block *b1, *b2; in gen_portrangeatom() local
5785 b1 = gen_cmp_ge(cstate, OR_TRAN_IPV4, off, BPF_H, v1); in gen_portrangeatom()
5788 gen_and(b1, b2); in gen_portrangeatom()
5797 struct block *b0, *b1, *tmp; in gen_portrangeop() local
5806 b1 = gen_portrangeatom(cstate, 0, port1, port2); in gen_portrangeop()
5810 b1 = gen_portrangeatom(cstate, 2, port1, port2); in gen_portrangeop()
5815 b1 = gen_portrangeatom(cstate, 2, port1, port2); in gen_portrangeop()
5816 gen_and(tmp, b1); in gen_portrangeop()
5822 b1 = gen_portrangeatom(cstate, 2, port1, port2); in gen_portrangeop()
5823 gen_or(tmp, b1); in gen_portrangeop()
5854 gen_and(b0, b1); in gen_portrangeop()
5856 return b1; in gen_portrangeop()
5863 struct block *b0, *b1, *tmp; in gen_portrange() local
5872 b1 = gen_portrangeop(cstate, port1, port2, (bpf_u_int32)ip_proto, in gen_portrange()
5878 b1 = gen_portrangeop(cstate, port1, port2, IPPROTO_UDP, dir); in gen_portrange()
5879 gen_or(tmp, b1); in gen_portrange()
5881 gen_or(tmp, b1); in gen_portrange()
5887 gen_and(b0, b1); in gen_portrange()
5888 return b1; in gen_portrange()
5895 struct block *b1, *b2; in gen_portrangeatom6() local
5908 b1 = gen_cmp_ge(cstate, OR_TRAN_IPV6, off, BPF_H, v1); in gen_portrangeatom6()
5911 gen_and(b1, b2); in gen_portrangeatom6()
5920 struct block *b0, *b1, *tmp; in gen_portrangeop6() local
5928 b1 = gen_portrangeatom6(cstate, 0, port1, port2); in gen_portrangeop6()
5932 b1 = gen_portrangeatom6(cstate, 2, port1, port2); in gen_portrangeop6()
5937 b1 = gen_portrangeatom6(cstate, 2, port1, port2); in gen_portrangeop6()
5938 gen_and(tmp, b1); in gen_portrangeop6()
5944 b1 = gen_portrangeatom6(cstate, 2, port1, port2); in gen_portrangeop6()
5945 gen_or(tmp, b1); in gen_portrangeop6()
5951 gen_and(b0, b1); in gen_portrangeop6()
5953 return b1; in gen_portrangeop6()
5960 struct block *b0, *b1, *tmp; in gen_portrange6() local
5969 b1 = gen_portrangeop6(cstate, port1, port2, (bpf_u_int32)ip_proto, in gen_portrange6()
5975 b1 = gen_portrangeop6(cstate, port1, port2, IPPROTO_UDP, dir); in gen_portrange6()
5976 gen_or(tmp, b1); in gen_portrange6()
5978 gen_or(tmp, b1); in gen_portrange6()
5984 gen_and(b0, b1); in gen_portrange6()
5985 return b1; in gen_portrange6()
6334 struct block *b0, *b1; in gen_check_802_11_data_frame() local
6346 b1 = new_block(cstate, JMP(BPF_JSET)); in gen_check_802_11_data_frame()
6347 b1->s.k = 0x04; in gen_check_802_11_data_frame()
6348 b1->stmts = s; in gen_check_802_11_data_frame()
6349 gen_not(b1); in gen_check_802_11_data_frame()
6351 gen_and(b1, b0); in gen_check_802_11_data_frame()
6368 struct block *b0, *b1; in gen_proto() local
6379 b1 = gen_proto(cstate, v, Q_IPV6, dir); in gen_proto()
6380 gen_or(b0, b1); in gen_proto()
6381 return b1; in gen_proto()
6404 b1 = gen_cmp(cstate, OR_LINKPL, 9, BPF_B, v); in gen_proto()
6406 b1 = gen_protochain(cstate, v, Q_IP); in gen_proto()
6408 gen_and(b0, b1); in gen_proto()
6409 return b1; in gen_proto()
6475 b1 = gen_cmp(cstate, OR_LINKPL, 40, BPF_B, v); in gen_proto()
6476 gen_and(b2, b1); in gen_proto()
6478 gen_or(b2, b1); in gen_proto()
6480 b1 = gen_protochain(cstate, v, Q_IPV6); in gen_proto()
6482 gen_and(b0, b1); in gen_proto()
6483 return b1; in gen_proto()
6541 b1 = gen_cmp(cstate, OR_LINKPL_NOSNAP, 1, BPF_B, v); in gen_proto()
6542 gen_and(b0, b1); in gen_proto()
6543 return b1; in gen_proto()
6547 b1 = gen_cmp(cstate, OR_LINKPL_NOSNAP, 0, BPF_B, v); in gen_proto()
6548 gen_and(b0, b1); in gen_proto()
6549 return b1; in gen_proto()
6562 b1 = gen_cmp(cstate, OR_LINKPL_NOSNAP, 4, BPF_B, v); in gen_proto()
6563 gen_and(b0, b1); in gen_proto()
6564 return b1; in gen_proto()
7912 struct block *b0, *b1, *b2; in gen_broadcast() local
7933 b1 = gen_prevlinkhdr_check(cstate); in gen_broadcast()
7935 if (b1 != NULL) in gen_broadcast()
7936 gen_and(b1, b0); in gen_broadcast()
7965 b1 = gen_mcmp(cstate, OR_LINKPL, 16, BPF_W, 0, hostmask); in gen_broadcast()
7968 gen_or(b1, b2); in gen_broadcast()
7997 register struct block *b0, *b1, *b2; in gen_multicast() local
8019 b1 = gen_prevlinkhdr_check(cstate); in gen_multicast()
8022 if (b1 != NULL) in gen_multicast()
8023 gen_and(b1, b0); in gen_multicast()
8063 b1 = new_block(cstate, JMP(BPF_JSET)); in gen_multicast()
8064 b1->s.k = 0x01; /* To DS */ in gen_multicast()
8065 b1->stmts = s; in gen_multicast()
8071 gen_and(b1, b0); in gen_multicast()
8086 b1 = gen_mac_multicast(cstate, 4); in gen_multicast()
8087 gen_and(b2, b1); in gen_multicast()
8093 gen_or(b1, b0); in gen_multicast()
8100 b1 = new_block(cstate, JMP(BPF_JSET)); in gen_multicast()
8101 b1->s.k = 0x08; in gen_multicast()
8102 b1->stmts = s; in gen_multicast()
8107 gen_and(b1, b0); in gen_multicast()
8123 b1 = gen_mac_multicast(cstate, 4); in gen_multicast()
8124 gen_and(b2, b1); in gen_multicast()
8131 gen_or(b1, b0); in gen_multicast()
8142 b1 = new_block(cstate, JMP(BPF_JSET)); in gen_multicast()
8143 b1->s.k = 0x04; in gen_multicast()
8144 b1->stmts = s; in gen_multicast()
8145 gen_not(b1); in gen_multicast()
8151 gen_and(b1, b0); in gen_multicast()
8164 b1 = gen_cmp_ge(cstate, OR_LINKPL, 16, BPF_B, 224); in gen_multicast()
8165 gen_and(b0, b1); in gen_multicast()
8166 return b1; in gen_multicast()
8170 b1 = gen_cmp(cstate, OR_LINKPL, 24, BPF_B, 255); in gen_multicast()
8171 gen_and(b0, b1); in gen_multicast()
8172 return b1; in gen_multicast()
8717 register struct block *b0, *b1; in gen_ahostop() local
8729 b1 = gen_ahostop(cstate, eaddr, Q_DST); in gen_ahostop()
8730 gen_and(b0, b1); in gen_ahostop()
8731 return b1; in gen_ahostop()
8736 b1 = gen_ahostop(cstate, eaddr, Q_DST); in gen_ahostop()
8737 gen_or(b0, b1); in gen_ahostop()
8738 return b1; in gen_ahostop()
8771 struct block *b0, *b1; in gen_vlan_tpid_test() local
8775 b1 = gen_linktype(cstate, ETHERTYPE_8021AD); in gen_vlan_tpid_test()
8776 gen_or(b0,b1); in gen_vlan_tpid_test()
8777 b0 = b1; in gen_vlan_tpid_test()
8778 b1 = gen_linktype(cstate, ETHERTYPE_8021QINQ); in gen_vlan_tpid_test()
8779 gen_or(b0,b1); in gen_vlan_tpid_test()
8781 return b1; in gen_vlan_tpid_test()
8798 struct block *b0, *b1; in gen_vlan_no_bpf_extensions() local
8803 b1 = gen_vlan_vid_test(cstate, vlan_num); in gen_vlan_no_bpf_extensions()
8804 gen_and(b0, b1); in gen_vlan_no_bpf_extensions()
8805 b0 = b1; in gen_vlan_no_bpf_extensions()
9060 struct block *b0, *b1; in gen_mpls() local
9108 b1 = gen_mcmp(cstate, OR_LINKPL, 0, BPF_W, label_num, in gen_mpls()
9110 gen_and(b0, b1); in gen_mpls()
9111 b0 = b1; in gen_mpls()
9154 struct block *b0, *b1; in gen_pppoes() local
9174 b1 = gen_mcmp(cstate, OR_LINKPL, 0, BPF_W, sess_num, 0x0000ffff); in gen_pppoes()
9175 gen_and(b0, b1); in gen_pppoes()
9176 b0 = b1; in gen_pppoes()
9217 struct block *b0, *b1; in gen_geneve_check() local
9224 b1 = gen_mcmp(cstate, offrel, 8, BPF_B, 0, 0xc0); in gen_geneve_check()
9225 gen_and(b0, b1); in gen_geneve_check()
9226 b0 = b1; in gen_geneve_check()
9234 b1 = gen_mcmp(cstate, offrel, 12, BPF_W, vni, 0xffffff00); in gen_geneve_check()
9235 gen_and(b0, b1); in gen_geneve_check()
9236 b0 = b1; in gen_geneve_check()
9250 struct block *b0, *b1; in gen_geneve4() local
9264 b1 = new_block(cstate, BPF_JMP|BPF_JEQ|BPF_X); in gen_geneve4()
9265 b1->stmts = s; in gen_geneve4()
9266 b1->s.k = 0; in gen_geneve4()
9268 gen_and(b0, b1); in gen_geneve4()
9270 return b1; in gen_geneve4()
9276 struct block *b0, *b1; in gen_geneve6() local
9303 b1 = new_block(cstate, BPF_JMP|BPF_JEQ|BPF_X); in gen_geneve6()
9304 b1->stmts = s; in gen_geneve6()
9305 b1->s.k = 0; in gen_geneve6()
9307 gen_and(b0, b1); in gen_geneve6()
9309 return b1; in gen_geneve6()
9454 struct block *b0, *b1; in gen_geneve() local
9465 b1 = gen_geneve6(cstate, vni, has_vni); in gen_geneve()
9467 gen_or(b0, b1); in gen_geneve()
9468 b0 = b1; in gen_geneve()
9475 b1 = gen_true(cstate); in gen_geneve()
9476 sappend(s, b1->stmts); in gen_geneve()
9477 b1->stmts = s; in gen_geneve()
9479 gen_and(b0, b1); in gen_geneve()
9483 return b1; in gen_geneve()
9573 struct block *b0, *b1; in gen_atmtype_metac() local
9576 b1 = gen_atmfield_code_internal(cstate, A_VCI, 1, BPF_JEQ, 0); in gen_atmtype_metac()
9577 gen_and(b0, b1); in gen_atmtype_metac()
9578 return b1; in gen_atmtype_metac()
9584 struct block *b0, *b1; in gen_atmtype_sc() local
9587 b1 = gen_atmfield_code_internal(cstate, A_VCI, 5, BPF_JEQ, 0); in gen_atmtype_sc()
9588 gen_and(b0, b1); in gen_atmtype_sc()
9589 return b1; in gen_atmtype_sc()
9620 struct block *b0, *b1; in gen_atmtype_abbrev() local
9635 b1 = gen_atmtype_metac(cstate); in gen_atmtype_abbrev()
9643 b1 = gen_atmfield_code_internal(cstate, A_VCI, 2, BPF_JEQ, 0); in gen_atmtype_abbrev()
9644 gen_and(b0, b1); in gen_atmtype_abbrev()
9652 b1 = gen_atmfield_code_internal(cstate, A_VCI, 3, BPF_JEQ, 0); in gen_atmtype_abbrev()
9653 gen_and(b0, b1); in gen_atmtype_abbrev()
9661 b1 = gen_atmfield_code_internal(cstate, A_VCI, 4, BPF_JEQ, 0); in gen_atmtype_abbrev()
9662 gen_and(b0, b1); in gen_atmtype_abbrev()
9669 b1 = gen_atmtype_sc(cstate); in gen_atmtype_abbrev()
9677 b1 = gen_atmfield_code_internal(cstate, A_VCI, 16, BPF_JEQ, 0); in gen_atmtype_abbrev()
9678 gen_and(b0, b1); in gen_atmtype_abbrev()
9685 b1 = gen_atmfield_code_internal(cstate, A_PROTOTYPE, PT_LANE, BPF_JEQ, 0); in gen_atmtype_abbrev()
9708 b1 = gen_atmtype_llc(cstate); in gen_atmtype_abbrev()
9714 return b1; in gen_atmtype_abbrev()
9727 struct block *b0, *b1; in gen_mtp2type_abbrev() local
9755 b1 = gen_ncmp(cstate, OR_PACKET, cstate->off_li, BPF_B, in gen_mtp2type_abbrev()
9757 gen_and(b1, b0); in gen_mtp2type_abbrev()
9786 b1 = gen_ncmp(cstate, OR_PACKET, cstate->off_li_hsl, BPF_H, in gen_mtp2type_abbrev()
9788 gen_and(b1, b0); in gen_mtp2type_abbrev()
9924 struct block *b1; in gen_msg_abbrev() local
9933 b1 = gen_atmfield_code_internal(cstate, A_MSGTYPE, SETUP, BPF_JEQ, 0); in gen_msg_abbrev()
9937 b1 = gen_atmfield_code_internal(cstate, A_MSGTYPE, CALL_PROCEED, BPF_JEQ, 0); in gen_msg_abbrev()
9941 b1 = gen_atmfield_code_internal(cstate, A_MSGTYPE, CONNECT, BPF_JEQ, 0); in gen_msg_abbrev()
9945 b1 = gen_atmfield_code_internal(cstate, A_MSGTYPE, CONNECT_ACK, BPF_JEQ, 0); in gen_msg_abbrev()
9949 b1 = gen_atmfield_code_internal(cstate, A_MSGTYPE, RELEASE, BPF_JEQ, 0); in gen_msg_abbrev()
9953 b1 = gen_atmfield_code_internal(cstate, A_MSGTYPE, RELEASE_DONE, BPF_JEQ, 0); in gen_msg_abbrev()
9959 return b1; in gen_msg_abbrev()
9965 struct block *b0, *b1; in gen_atmmulti_abbrev() local
9981 b1 = gen_atmfield_code_internal(cstate, A_VCI, 4, BPF_JEQ, 0); in gen_atmmulti_abbrev()
9982 gen_or(b0, b1); in gen_atmmulti_abbrev()
9984 gen_and(b0, b1); in gen_atmmulti_abbrev()
9992 b1 = gen_atmfield_code_internal(cstate, A_VCI, 4, BPF_JEQ, 0); in gen_atmmulti_abbrev()
9993 gen_or(b0, b1); in gen_atmmulti_abbrev()
9995 gen_and(b0, b1); in gen_atmmulti_abbrev()
10006 b1 = gen_msg_abbrev(cstate, A_CALLPROCEED); in gen_atmmulti_abbrev()
10007 gen_or(b0, b1); in gen_atmmulti_abbrev()
10009 gen_or(b0, b1); in gen_atmmulti_abbrev()
10011 gen_or(b0, b1); in gen_atmmulti_abbrev()
10013 gen_or(b0, b1); in gen_atmmulti_abbrev()
10015 gen_or(b0, b1); in gen_atmmulti_abbrev()
10017 gen_and(b0, b1); in gen_atmmulti_abbrev()
10024 b1 = gen_msg_abbrev(cstate, A_CALLPROCEED); in gen_atmmulti_abbrev()
10025 gen_or(b0, b1); in gen_atmmulti_abbrev()
10027 gen_or(b0, b1); in gen_atmmulti_abbrev()
10029 gen_or(b0, b1); in gen_atmmulti_abbrev()
10031 gen_or(b0, b1); in gen_atmmulti_abbrev()
10033 gen_and(b0, b1); in gen_atmmulti_abbrev()
10039 return b1; in gen_atmmulti_abbrev()