H A D | gencode.c | 430 bpf_syntax_error(compiler_state_t *cstate, const char *msg) argument 432 bpf_error(cstate, "syntax error in filter expression: %s", msg); 438 bpf_error(compiler_state_t *cstate, const char *fmt, ...) argument 443 if (cstate->bpf_pcap != NULL) 444 (void)pcap_vsnprintf(pcap_geterr(cstate->bpf_pcap), 447 longjmp(cstate->top_ctx, 1); 457 static void initchunks(compiler_state_t *cstate); 458 static void *newchunk(compiler_state_t *cstate, size_t); 459 static void freechunks(compiler_state_t *cstate); 460 static inline struct block *new_block(compiler_state_t *cstate, in 557 initchunks(compiler_state_t *cstate) argument 569 newchunk(compiler_state_t *cstate, size_t n) argument 602 freechunks(compiler_state_t *cstate) argument 615 sdup(compiler_state_t *cstate, const char *s) argument 625 new_block(compiler_state_t *cstate, int code) argument 637 new_stmt(compiler_state_t *cstate, int code) argument 648 gen_retblk(compiler_state_t *cstate, int v) argument 657 syntax(compiler_state_t *cstate) argument 666 compiler_state_t cstate; local 839 finish_parse(compiler_state_t *cstate, struct block *p) argument 918 gen_cmp(compiler_state_t *cstate, enum e_offrel offrel, u_int offset, u_int size, bpf_int32 v) argument 925 gen_cmp_gt(compiler_state_t *cstate, enum e_offrel offrel, u_int offset, u_int size, bpf_int32 v) argument 932 gen_cmp_ge(compiler_state_t *cstate, enum e_offrel offrel, u_int offset, u_int size, bpf_int32 v) argument 939 gen_cmp_lt(compiler_state_t *cstate, enum e_offrel offrel, u_int offset, u_int size, bpf_int32 v) argument 946 gen_cmp_le(compiler_state_t *cstate, enum e_offrel offrel, u_int offset, u_int size, bpf_int32 v) argument 953 gen_mcmp(compiler_state_t *cstate, enum e_offrel offrel, u_int offset, u_int size, bpf_int32 v, bpf_u_int32 mask) argument 960 gen_bcmp(compiler_state_t *cstate, enum e_offrel offrel, u_int offset, u_int size, const u_char *v) argument 1003 gen_ncmp(compiler_state_t *cstate, enum e_offrel offrel, bpf_u_int32 offset, bpf_u_int32 size, bpf_u_int32 mask, bpf_u_int32 jtype, int reverse, bpf_int32 v) argument 1027 init_linktype(compiler_state_t *cstate, pcap_t *p) argument 1609 gen_load_absoffsetrel(compiler_state_t *cstate, bpf_abs_offset *abs_offset, u_int offset, u_int size) argument 1649 gen_load_a(compiler_state_t *cstate, enum e_offrel offrel, u_int offset, u_int size) argument 1731 gen_loadx_iphdrlen(compiler_state_t *cstate) argument 1785 gen_uncond(compiler_state_t *cstate, int rsense) argument 1799 gen_true(compiler_state_t *cstate) argument 1805 gen_false(compiler_state_t *cstate) argument 1828 gen_ether_linktype(compiler_state_t *cstate, int proto) argument 1998 gen_loopback_linktype(compiler_state_t *cstate, int proto) argument 2037 gen_ipnet_linktype(compiler_state_t *cstate, int proto) argument 2066 gen_linux_sll_linktype(compiler_state_t *cstate, int proto) argument 2212 gen_load_prism_llprefixlen(compiler_state_t *cstate) argument 2322 gen_load_avs_llprefixlen(compiler_state_t *cstate) argument 2362 gen_load_radiotap_llprefixlen(compiler_state_t *cstate) argument 2432 gen_load_ppi_llprefixlen(compiler_state_t *cstate) argument 2498 gen_load_802_11_header_len(compiler_state_t *cstate, struct slist *s, struct slist *snext) argument 2737 insert_compute_vloffsets(compiler_state_t *cstate, struct block *b) argument 2813 gen_ppi_dlt_check(compiler_state_t *cstate) argument 2852 gen_abs_offset_varpart(compiler_state_t *cstate, bpf_abs_offset *off) argument 2938 gen_prevlinkhdr_check(compiler_state_t *cstate) argument 2984 gen_linktype(compiler_state_t *cstate, int proto) argument 3526 gen_snap(compiler_state_t *cstate, bpf_u_int32 orgcode, bpf_u_int32 ptype) argument 3545 gen_llc(compiler_state_t *cstate) argument 3616 gen_llc_i(compiler_state_t *cstate) argument 3640 gen_llc_s(compiler_state_t *cstate) argument 3659 gen_llc_u(compiler_state_t *cstate) argument 3678 gen_llc_s_subtype(compiler_state_t *cstate, bpf_u_int32 subtype) argument 3696 gen_llc_u_subtype(compiler_state_t *cstate, bpf_u_int32 subtype) argument 3726 gen_llc_linktype(compiler_state_t *cstate, int proto) argument 3801 gen_hostop(compiler_state_t *cstate, bpf_u_int32 addr, bpf_u_int32 mask, int dir, int proto, u_int src_off, u_int dst_off) argument 3841 gen_hostop6(compiler_state_t *cstate, struct in6_addr *addr, struct in6_addr *mask, int dir, int proto, u_int src_off, u_int dst_off) argument 3891 gen_ehostop(compiler_state_t *cstate, const u_char *eaddr, int dir) argument 3947 gen_fhostop(compiler_state_t *cstate, const u_char *eaddr, int dir) argument 4003 gen_thostop(compiler_state_t *cstate, const u_char *eaddr, int dir) argument 4060 gen_wlanhostop(compiler_state_t *cstate, const u_char *eaddr, int dir) argument 4484 gen_ipfchostop(compiler_state_t *cstate, const u_char *eaddr, int dir) argument 4555 gen_dnhostop(compiler_state_t *cstate, bpf_u_int32 addr, int dir) argument 4629 gen_mpls_linktype(compiler_state_t *cstate, int proto) argument 4657 gen_host(compiler_state_t *cstate, bpf_u_int32 addr, bpf_u_int32 mask, int proto, int dir, int type) argument 4785 gen_host6(compiler_state_t *cstate, struct in6_addr *addr, struct in6_addr *mask, int proto, int dir, int type) argument 4976 gen_proto_abbrev(compiler_state_t *cstate, int proto) argument 5216 gen_ipfrag(compiler_state_t *cstate) argument 5241 gen_portatom(compiler_state_t *cstate, int off, bpf_int32 v) argument 5247 gen_portatom6(compiler_state_t *cstate, int off, bpf_int32 v) argument 5253 gen_portop(compiler_state_t *cstate, int port, int proto, int dir) argument 5293 gen_port(compiler_state_t *cstate, int port, int ip_proto, int dir) argument 5339 gen_portop6(compiler_state_t *cstate, int port, int proto, int dir) argument 5378 gen_port6(compiler_state_t *cstate, int port, int ip_proto, int dir) argument 5409 gen_portrangeatom(compiler_state_t *cstate, int off, bpf_int32 v1, bpf_int32 v2) argument 5434 gen_portrangeop(compiler_state_t *cstate, int port1, int port2, int proto, int dir) argument 5475 gen_portrange(compiler_state_t *cstate, int port1, int port2, int ip_proto, int dir) argument 5506 gen_portrangeatom6(compiler_state_t *cstate, int off, bpf_int32 v1, bpf_int32 v2) argument 5531 gen_portrangeop6(compiler_state_t *cstate, int port1, int port2, int proto, int dir) argument 5571 gen_portrange6(compiler_state_t *cstate, int port1, int port2, int ip_proto, int dir) argument 5602 lookup_proto(compiler_state_t *cstate, const char *name, int proto) argument 5655 gen_protochain(compiler_state_t *cstate, int v, int proto, int dir) argument 5946 gen_check_802_11_data_frame(compiler_state_t *cstate) argument 5981 gen_proto(compiler_state_t *cstate, int v, int proto, int dir) argument 6195 gen_scode(compiler_state_t *cstate, const char *name, struct qual q) argument 6503 gen_mcode(compiler_state_t *cstate, const char *s1, const char *s2, unsigned int masklen, struct qual q) argument 6551 gen_ncode(compiler_state_t *cstate, const char *s, bpf_u_int32 v, struct qual q) argument 6659 gen_mcode6(compiler_state_t *cstate, const char *s1, const char *s2, unsigned int masklen, struct qual q) argument 6718 gen_ecode(compiler_state_t *cstate, const u_char *eaddr, struct qual q) argument 6768 xfer_to_x(compiler_state_t *cstate, struct arth *a) argument 6778 xfer_to_a(compiler_state_t *cstate, struct arth *a) argument 6795 gen_load(compiler_state_t *cstate, int proto, struct arth *inst, int size) argument 7018 gen_relation(compiler_state_t *cstate, int code, struct arth *a0, struct arth *a1, int reversed) argument 7062 gen_loadlen(compiler_state_t *cstate) argument 7078 gen_loadi(compiler_state_t *cstate, int val) argument 7099 gen_neg(compiler_state_t *cstate, struct arth *a) argument 7116 gen_arth(compiler_state_t *cstate, int code, struct arth *a0, struct arth *a1) argument 7155 init_regs(compiler_state_t *cstate) argument 7165 alloc_reg(compiler_state_t *cstate) argument 7187 free_reg(compiler_state_t *cstate, int n) argument 7193 gen_len(compiler_state_t *cstate, int jmp, int n) argument 7207 gen_greater(compiler_state_t *cstate, int n) argument 7216 gen_less(compiler_state_t *cstate, int n) argument 7237 gen_byteop(compiler_state_t *cstate, int op, int idx, int val) argument 7276 gen_broadcast(compiler_state_t *cstate, int proto) argument 7342 gen_mac_multicast(compiler_state_t *cstate, int offset) argument 7356 gen_multicast(compiler_state_t *cstate, int proto) argument 7543 gen_inbound(compiler_state_t *cstate, int dir) argument 7668 gen_pf_ifname(compiler_state_t *cstate, const char *ifname) argument 7690 gen_pf_ruleset(compiler_state_t *cstate, char *ruleset) argument 7712 gen_pf_rnr(compiler_state_t *cstate, int rnr) argument 7728 gen_pf_srnr(compiler_state_t *cstate, int srnr) argument 7744 gen_pf_reason(compiler_state_t *cstate, int reason) argument 7760 gen_pf_action(compiler_state_t *cstate, int action) argument 7775 gen_pf_ifname(compiler_state_t *cstate, const char *ifname) argument 7783 gen_pf_ruleset(compiler_state_t *cstate, char *ruleset) argument 7791 gen_pf_rnr(compiler_state_t *cstate, int rnr) argument 7799 gen_pf_srnr(compiler_state_t *cstate, int srnr) argument 7807 gen_pf_reason(compiler_state_t *cstate, int reason) argument 7815 gen_pf_action(compiler_state_t *cstate, int action) argument 7825 gen_p80211_type(compiler_state_t *cstate, int type, int mask) argument 7848 gen_p80211_fcdir(compiler_state_t *cstate, int fcdir) argument 7872 gen_acode(compiler_state_t *cstate, const u_char *eaddr, struct qual q) argument 7897 gen_ahostop(compiler_state_t *cstate, const u_char *eaddr, int dir) argument 7952 gen_vlan_bpf_extensions(compiler_state_t *cstate, int vlan_num) argument 7983 gen_vlan_no_bpf_extensions(compiler_state_t *cstate, int vlan_num) argument 8023 gen_vlan(compiler_state_t *cstate, int vlan_num) argument 8107 gen_mpls(compiler_state_t *cstate, int label_num) argument 8178 gen_pppoed(compiler_state_t *cstate) argument 8185 gen_pppoes(compiler_state_t *cstate, int sess_num) argument 8257 gen_geneve_check(compiler_state_t *cstate, struct block *(*gen_portfn)(compiler_state_t *, int, int, int), enum e_offrel offrel, int vni) argument 8289 gen_geneve4(compiler_state_t *cstate, int vni) argument 8315 gen_geneve6(compiler_state_t *cstate, int vni) argument 8358 gen_geneve_offsets(compiler_state_t *cstate) argument 8493 gen_geneve(compiler_state_t *cstate, int vni) argument 8523 gen_geneve_ll_check(compiler_state_t *cstate) argument 8550 gen_atmfield_code(compiler_state_t *cstate, int atmfield, bpf_int32 jvalue, bpf_u_int32 jtype, int reverse) argument 8605 gen_atmtype_abbrev(compiler_state_t *cstate, int type) argument 8710 gen_mtp2type_abbrev(compiler_state_t *cstate, int type) argument 8777 gen_mtp3field_code(compiler_state_t *cstate, int mtp3field, bpf_u_int32 jvalue, bpf_u_int32 jtype, int reverse) argument 8871 gen_msg_abbrev(compiler_state_t *cstate, int type) argument 8912 gen_atmmulti_abbrev(compiler_state_t *cstate, int type) argument [all...] |