Lines Matching refs:b1
405 merge(struct block *b0, struct block *b1) in merge() argument
414 *p = b1; in merge()
443 gen_and(struct block *b0, struct block *b1) in gen_and() argument
445 backpatch(b0, b1->head); in gen_and()
447 b1->sense = !b1->sense; in gen_and()
448 merge(b1, b0); in gen_and()
449 b1->sense = !b1->sense; in gen_and()
450 b1->head = b0->head; in gen_and()
454 gen_or(struct block *b0, struct block *b1) in gen_or() argument
457 backpatch(b0, b1->head); in gen_or()
459 merge(b1, b0); in gen_or()
460 b1->head = b0->head; in gen_or()
811 struct block *b0, *b1; in gen_linktype() local
829 b1 = gen_cmp(off_linktype + 2, BPF_B, (bpf_int32)proto); in gen_linktype()
830 gen_and(b0, b1); in gen_linktype()
831 return b1; in gen_linktype()
856 b1 = gen_cmp(off_linktype, BPF_H, PPP_VJC); in gen_linktype()
857 gen_or(b0, b1); in gen_linktype()
859 gen_or(b1, b0); in gen_linktype()
934 struct block *b0, *b1; in gen_hostop() local
949 b1 = gen_hostop(addr, mask, Q_DST, proto, src_off, dst_off); in gen_hostop()
950 gen_and(b0, b1); in gen_hostop()
951 return b1; in gen_hostop()
956 b1 = gen_hostop(addr, mask, Q_DST, proto, src_off, dst_off); in gen_hostop()
957 gen_or(b0, b1); in gen_hostop()
958 return b1; in gen_hostop()
965 b1 = gen_mcmp_nl(offset, BPF_W, (bpf_int32)addr, mask); in gen_hostop()
966 gen_and(b0, b1); in gen_hostop()
967 return b1; in gen_hostop()
975 struct block *b0, *b1; in gen_hostop6() local
991 b1 = gen_hostop6(addr, mask, Q_DST, proto, src_off, dst_off); in gen_hostop6()
992 gen_and(b0, b1); in gen_hostop6()
993 return b1; in gen_hostop6()
998 b1 = gen_hostop6(addr, mask, Q_DST, proto, src_off, dst_off); in gen_hostop6()
999 gen_or(b0, b1); in gen_hostop6()
1000 return b1; in gen_hostop6()
1009 b1 = gen_mcmp_nl(offset + 12, BPF_W, ntohl(a[3]), ntohl(m[3])); in gen_hostop6()
1011 gen_and(b0, b1); in gen_hostop6()
1013 gen_and(b0, b1); in gen_hostop6()
1015 gen_and(b0, b1); in gen_hostop6()
1017 gen_and(b0, b1); in gen_hostop6()
1018 return b1; in gen_hostop6()
1025 struct block *b0, *b1; in gen_ehostop() local
1036 b1 = gen_ehostop(eaddr, Q_DST); in gen_ehostop()
1037 gen_and(b0, b1); in gen_ehostop()
1038 return b1; in gen_ehostop()
1043 b1 = gen_ehostop(eaddr, Q_DST); in gen_ehostop()
1044 gen_or(b0, b1); in gen_ehostop()
1045 return b1; in gen_ehostop()
1059 struct block *b0, *b1; in gen_fhostop() local
1078 b1 = gen_fhostop(eaddr, Q_DST); in gen_fhostop()
1079 gen_and(b0, b1); in gen_fhostop()
1080 return b1; in gen_fhostop()
1085 b1 = gen_fhostop(eaddr, Q_DST); in gen_fhostop()
1086 gen_or(b0, b1); in gen_fhostop()
1087 return b1; in gen_fhostop()
1116 struct block *b0, *b1, *b2, *tmp; in gen_dnhostop() local
1135 b1 = gen_dnhostop(addr, Q_DST, base_off); in gen_dnhostop()
1136 gen_and(b0, b1); in gen_dnhostop()
1137 return b1; in gen_dnhostop()
1143 b1 = gen_dnhostop(addr, Q_DST, base_off); in gen_dnhostop()
1144 gen_or(b0, b1); in gen_dnhostop()
1145 return b1; in gen_dnhostop()
1155 b1 = gen_cmp_nl(base_off + 2 + 1 + offset_lh, in gen_dnhostop()
1157 gen_and(tmp, b1); in gen_dnhostop()
1162 gen_or(b2, b1); in gen_dnhostop()
1169 gen_or(b2, b1); in gen_dnhostop()
1174 gen_or(b2, b1); in gen_dnhostop()
1177 gen_and(b0, b1); in gen_dnhostop()
1178 return b1; in gen_dnhostop()
1184 struct block *b0, *b1; in gen_host() local
1190 b1 = gen_host(addr, mask, Q_ARP, dir); in gen_host()
1191 gen_or(b0, b1); in gen_host()
1193 gen_or(b1, b0); in gen_host()
1349 struct block *b0, *b1, *tmp; in gen_gateway() local
1367 b1 = gen_host(**alist++, 0xffffffff, proto, Q_OR); in gen_gateway()
1370 gen_or(b1, tmp); in gen_gateway()
1371 b1 = tmp; in gen_gateway()
1373 gen_not(b1); in gen_gateway()
1374 gen_and(b0, b1); in gen_gateway()
1375 return b1; in gen_gateway()
1385 struct block *b0 = NULL, *b1; in gen_proto_abbrev() local
1390 b1 = gen_proto(IPPROTO_TCP, Q_IP, Q_DEFAULT); in gen_proto_abbrev()
1393 gen_or(b0, b1); in gen_proto_abbrev()
1398 b1 = gen_proto(IPPROTO_UDP, Q_IP, Q_DEFAULT); in gen_proto_abbrev()
1401 gen_or(b0, b1); in gen_proto_abbrev()
1406 b1 = gen_proto(IPPROTO_ICMP, Q_IP, Q_DEFAULT); in gen_proto_abbrev()
1414 b1 = gen_proto(IPPROTO_IGMP, Q_IP, Q_DEFAULT); in gen_proto_abbrev()
1421 b1 = gen_proto(IPPROTO_IGRP, Q_IP, Q_DEFAULT); in gen_proto_abbrev()
1429 b1 = gen_proto(IPPROTO_PIM, Q_IP, Q_DEFAULT); in gen_proto_abbrev()
1432 gen_or(b0, b1); in gen_proto_abbrev()
1437 b1 = gen_linktype(ETHERTYPE_IP); in gen_proto_abbrev()
1441 b1 = gen_linktype(ETHERTYPE_ARP); in gen_proto_abbrev()
1445 b1 = gen_linktype(ETHERTYPE_REVARP); in gen_proto_abbrev()
1452 b1 = gen_linktype(ETHERTYPE_ATALK); in gen_proto_abbrev()
1456 b1 = gen_linktype(ETHERTYPE_DN); in gen_proto_abbrev()
1460 b1 = gen_linktype(ETHERTYPE_SCA); in gen_proto_abbrev()
1464 b1 = gen_linktype(ETHERTYPE_LAT); in gen_proto_abbrev()
1468 b1 = gen_linktype(ETHERTYPE_MOPDL); in gen_proto_abbrev()
1472 b1 = gen_linktype(ETHERTYPE_MOPRC); in gen_proto_abbrev()
1476 b1 = gen_linktype(LLCSAP_8021D); in gen_proto_abbrev()
1481 b1 = gen_linktype(ETHERTYPE_IPV6); in gen_proto_abbrev()
1488 b1 = gen_proto(IPPROTO_ICMPV6, Q_IPV6, Q_DEFAULT); in gen_proto_abbrev()
1496 b1 = gen_proto(IPPROTO_AH, Q_IP, Q_DEFAULT); in gen_proto_abbrev()
1499 gen_or(b0, b1); in gen_proto_abbrev()
1507 b1 = gen_proto(IPPROTO_ESP, Q_IP, Q_DEFAULT); in gen_proto_abbrev()
1510 gen_or(b0, b1); in gen_proto_abbrev()
1517 return b1; in gen_proto_abbrev()
1626 struct block *b0, *b1, *tmp; in gen_portop() local
1635 b1 = gen_portatom(0, (bpf_int32)port); in gen_portop()
1639 b1 = gen_portatom(2, (bpf_int32)port); in gen_portop()
1645 b1 = gen_portatom(2, (bpf_int32)port); in gen_portop()
1646 gen_or(tmp, b1); in gen_portop()
1651 b1 = gen_portatom(2, (bpf_int32)port); in gen_portop()
1652 gen_and(tmp, b1); in gen_portop()
1658 gen_and(b0, b1); in gen_portop()
1660 return b1; in gen_portop()
1666 struct block *b0, *b1, *tmp; in gen_port() local
1674 b1 = gen_portop(port, ip_proto, dir); in gen_port()
1679 b1 = gen_portop(port, IPPROTO_UDP, dir); in gen_port()
1680 gen_or(tmp, b1); in gen_port()
1686 gen_and(b0, b1); in gen_port()
1687 return b1; in gen_port()
1694 struct block *b0, *b1, *tmp; in gen_portop6() local
1701 b1 = gen_portatom6(0, (bpf_int32)port); in gen_portop6()
1705 b1 = gen_portatom6(2, (bpf_int32)port); in gen_portop6()
1711 b1 = gen_portatom6(2, (bpf_int32)port); in gen_portop6()
1712 gen_or(tmp, b1); in gen_portop6()
1717 b1 = gen_portatom6(2, (bpf_int32)port); in gen_portop6()
1718 gen_and(tmp, b1); in gen_portop6()
1724 gen_and(b0, b1); in gen_portop6()
1726 return b1; in gen_portop6()
1732 struct block *b0, *b1, *tmp; in gen_port6() local
1740 b1 = gen_portop6(port, ip_proto, dir); in gen_port6()
1745 b1 = gen_portop6(port, IPPROTO_UDP, dir); in gen_port6()
1746 gen_or(tmp, b1); in gen_port6()
1752 gen_and(b0, b1); in gen_port6()
1753 return b1; in gen_port6()
2085 struct block *b0, *b1; in gen_proto() local
2094 b1 = gen_proto(v, Q_IPV6, dir); in gen_proto()
2095 gen_or(b0, b1); in gen_proto()
2096 return b1; in gen_proto()
2103 b1 = gen_cmp_nl(9, BPF_B, (bpf_int32)v); in gen_proto()
2105 b1 = gen_protochain(v, Q_IP); in gen_proto()
2107 gen_and(b0, b1); in gen_proto()
2108 return b1; in gen_proto()
2177 b1 = gen_cmp_nl(6, BPF_B, (bpf_int32)v); in gen_proto()
2179 b1 = gen_protochain(v, Q_IPV6); in gen_proto()
2181 gen_and(b0, b1); in gen_proto()
2182 return b1; in gen_proto()
2981 struct block *b0, *b1, *b2; in gen_broadcast() local
3008 b1 = gen_mcmp_nl(16, BPF_W, (bpf_int32)0, hostmask); in gen_broadcast()
3011 gen_or(b1, b2); in gen_broadcast()
3021 struct block *b0, *b1; in gen_multicast() local
3053 b1 = gen_cmp_nl(16, BPF_B, (bpf_int32)224); in gen_multicast()
3054 b1->s.code = JMP(BPF_JGE); in gen_multicast()
3055 gen_and(b0, b1); in gen_multicast()
3056 return b1; in gen_multicast()
3061 b1 = gen_cmp_nl(24, BPF_B, (bpf_int32)255); in gen_multicast()
3062 gen_and(b0, b1); in gen_multicast()
3063 return b1; in gen_multicast()
3245 struct block *b0, *b1; in gen_ahostop() local
3257 b1 = gen_ahostop(eaddr, Q_DST); in gen_ahostop()
3258 gen_and(b0, b1); in gen_ahostop()
3259 return b1; in gen_ahostop()
3264 b1 = gen_ahostop(eaddr, Q_DST); in gen_ahostop()
3265 gen_or(b0, b1); in gen_ahostop()
3266 return b1; in gen_ahostop()
3297 struct block *b1; in gen_mpls() local
3299 b1 = gen_mcmp(off_nl, BPF_W, (bpf_int32)(label << 12), in gen_mpls()
3301 gen_and(b0, b1); in gen_mpls()
3302 b0 = b1; in gen_mpls()
3357 struct block *b1; in gen_vlan() local
3359 b1 = gen_mcmp(orig_nl, BPF_H, (bpf_int32)vlan_num, 0x0FFF); in gen_vlan()
3360 gen_and(b0, b1); in gen_vlan()
3361 b0 = b1; in gen_vlan()
3413 struct block *b0, *b1, *b2, *b3, *b4; in gen_p80211_hostop() local
3424 b1 = gen_p80211_addr(IEEE80211_FC1_DIR_TODS, offset + in gen_p80211_hostop()
3437 gen_or(b0, b1); in gen_p80211_hostop()
3438 gen_or(b1, b2); in gen_p80211_hostop()
3447 b1 = gen_p80211_addr(IEEE80211_FC1_DIR_TODS, offset + in gen_p80211_hostop()
3460 gen_or(b0, b1); in gen_p80211_hostop()
3461 gen_or(b1, b2); in gen_p80211_hostop()
3488 b1 = gen_p80211_hostop(lladdr, Q_DST); in gen_p80211_hostop()
3489 gen_and(b0, b1); in gen_p80211_hostop()
3490 return (b1); in gen_p80211_hostop()
3495 b1 = gen_p80211_hostop(lladdr, Q_ADDR2); in gen_p80211_hostop()
3498 gen_or(b0, b1); in gen_p80211_hostop()
3499 gen_or(b1, b2); in gen_p80211_hostop()
3513 struct block *b0, *b1; in gen_p80211_addr() local
3516 b1 = gen_bcmp(offset, IEEE80211_ADDR_LEN, lladdr); in gen_p80211_addr()
3517 gen_and(b0, b1); in gen_p80211_addr()
3519 return (b1); in gen_p80211_addr()