H A D | gencode.c | 434 bpf_set_error(compiler_state_t *cstate, const char *fmt, ...) argument 439 (void)pcap_vsnprintf(cstate->bpf_pcap->errbuf, PCAP_ERRBUF_SIZE, 452 bpf_error(compiler_state_t *cstate, const char *fmt, ...) argument 457 (void)pcap_vsnprintf(cstate->bpf_pcap->errbuf, PCAP_ERRBUF_SIZE, 460 longjmp(cstate->top_ctx, 1); 470 static void initchunks(compiler_state_t *cstate); 471 static void *newchunk_nolongjmp(compiler_state_t *cstate, size_t); 472 static void *newchunk(compiler_state_t *cstate, size_t); 473 static void freechunks(compiler_state_t *cstate); 474 static inline struct block *new_block(compiler_state_t *cstate, in 575 initchunks(compiler_state_t *cstate) argument 587 newchunk_nolongjmp(compiler_state_t *cstate, size_t n) argument 627 newchunk(compiler_state_t *cstate, size_t n) argument 640 freechunks(compiler_state_t *cstate) argument 656 sdup(compiler_state_t *cstate, const char *s) argument 668 new_block(compiler_state_t *cstate, int code) argument 680 new_stmt(compiler_state_t *cstate, int code) argument 691 gen_retblk(compiler_state_t *cstate, int v) argument 700 syntax(compiler_state_t *cstate) argument 712 compiler_state_t cstate; local 931 finish_parse(compiler_state_t *cstate, struct block *p) argument 1015 gen_cmp(compiler_state_t *cstate, enum e_offrel offrel, u_int offset, u_int size, bpf_int32 v) argument 1022 gen_cmp_gt(compiler_state_t *cstate, enum e_offrel offrel, u_int offset, u_int size, bpf_int32 v) argument 1029 gen_cmp_ge(compiler_state_t *cstate, enum e_offrel offrel, u_int offset, u_int size, bpf_int32 v) argument 1036 gen_cmp_lt(compiler_state_t *cstate, enum e_offrel offrel, u_int offset, u_int size, bpf_int32 v) argument 1043 gen_cmp_le(compiler_state_t *cstate, enum e_offrel offrel, u_int offset, u_int size, bpf_int32 v) argument 1050 gen_mcmp(compiler_state_t *cstate, enum e_offrel offrel, u_int offset, u_int size, bpf_int32 v, bpf_u_int32 mask) argument 1057 gen_bcmp(compiler_state_t *cstate, enum e_offrel offrel, u_int offset, u_int size, const u_char *v) argument 1109 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 1133 init_linktype(compiler_state_t *cstate, pcap_t *p) argument 1730 gen_load_absoffsetrel(compiler_state_t *cstate, bpf_abs_offset *abs_offset, u_int offset, u_int size) argument 1770 gen_load_a(compiler_state_t *cstate, enum e_offrel offrel, u_int offset, u_int size) argument 1861 gen_loadx_iphdrlen(compiler_state_t *cstate) argument 1916 gen_uncond(compiler_state_t *cstate, int rsense) argument 1930 gen_true(compiler_state_t *cstate) argument 1936 gen_false(compiler_state_t *cstate) argument 1959 gen_ether_linktype(compiler_state_t *cstate, int proto) argument 2129 gen_loopback_linktype(compiler_state_t *cstate, int proto) argument 2168 gen_ipnet_linktype(compiler_state_t *cstate, int proto) argument 2197 gen_linux_sll_linktype(compiler_state_t *cstate, int proto) argument 2343 gen_load_prism_llprefixlen(compiler_state_t *cstate) argument 2453 gen_load_avs_llprefixlen(compiler_state_t *cstate) argument 2493 gen_load_radiotap_llprefixlen(compiler_state_t *cstate) argument 2563 gen_load_ppi_llprefixlen(compiler_state_t *cstate) argument 2629 gen_load_802_11_header_len(compiler_state_t *cstate, struct slist *s, struct slist *snext) argument 2868 insert_compute_vloffsets(compiler_state_t *cstate, struct block *b) argument 2966 gen_ppi_dlt_check(compiler_state_t *cstate) argument 3005 gen_abs_offset_varpart(compiler_state_t *cstate, bpf_abs_offset *off) argument 3090 gen_prevlinkhdr_check(compiler_state_t *cstate) argument 3136 gen_linktype(compiler_state_t *cstate, int proto) argument 3657 gen_snap(compiler_state_t *cstate, bpf_u_int32 orgcode, bpf_u_int32 ptype) argument 3676 gen_llc_internal(compiler_state_t *cstate) argument 3748 gen_llc(compiler_state_t *cstate) argument 3761 gen_llc_i(compiler_state_t *cstate) argument 3792 gen_llc_s(compiler_state_t *cstate) argument 3818 gen_llc_u(compiler_state_t *cstate) argument 3844 gen_llc_s_subtype(compiler_state_t *cstate, bpf_u_int32 subtype) argument 3869 gen_llc_u_subtype(compiler_state_t *cstate, bpf_u_int32 subtype) argument 3906 gen_llc_linktype(compiler_state_t *cstate, int proto) argument 3981 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 4046 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 4121 gen_ehostop(compiler_state_t *cstate, const u_char *eaddr, int dir) argument 4177 gen_fhostop(compiler_state_t *cstate, const u_char *eaddr, int dir) argument 4233 gen_thostop(compiler_state_t *cstate, const u_char *eaddr, int dir) argument 4290 gen_wlanhostop(compiler_state_t *cstate, const u_char *eaddr, int dir) argument 4714 gen_ipfchostop(compiler_state_t *cstate, const u_char *eaddr, int dir) argument 4785 gen_dnhostop(compiler_state_t *cstate, bpf_u_int32 addr, int dir) argument 4881 gen_mpls_linktype(compiler_state_t *cstate, int proto) argument 4909 gen_host(compiler_state_t *cstate, bpf_u_int32 addr, bpf_u_int32 mask, int proto, int dir, int type) argument 5061 gen_host6(compiler_state_t *cstate, struct in6_addr *addr, struct in6_addr *mask, int proto, int dir, int type) argument 5202 gen_gateway(compiler_state_t *cstate, const u_char *eaddr, struct addrinfo *alist, int proto, int dir) argument 5308 gen_proto_abbrev_internal(compiler_state_t *cstate, int proto) argument 5548 gen_proto_abbrev(compiler_state_t *cstate, int proto) argument 5561 gen_ipfrag(compiler_state_t *cstate) argument 5586 gen_portatom(compiler_state_t *cstate, int off, bpf_int32 v) argument 5592 gen_portatom6(compiler_state_t *cstate, int off, bpf_int32 v) argument 5598 gen_portop(compiler_state_t *cstate, int port, int proto, int dir) argument 5663 gen_port(compiler_state_t *cstate, int port, int ip_proto, int dir) argument 5709 gen_portop6(compiler_state_t *cstate, int port, int proto, int dir) argument 5748 gen_port6(compiler_state_t *cstate, int port, int ip_proto, int dir) argument 5779 gen_portrangeatom(compiler_state_t *cstate, int off, bpf_int32 v1, bpf_int32 v2) argument 5804 gen_portrangeop(compiler_state_t *cstate, int port1, int port2, int proto, int dir) argument 5870 gen_portrange(compiler_state_t *cstate, int port1, int port2, int ip_proto, int dir) argument 5901 gen_portrangeatom6(compiler_state_t *cstate, int off, bpf_int32 v1, bpf_int32 v2) argument 5926 gen_portrangeop6(compiler_state_t *cstate, int port1, int port2, int proto, int dir) argument 5966 gen_portrange6(compiler_state_t *cstate, int port1, int port2, int ip_proto, int dir) argument 5997 lookup_proto(compiler_state_t *cstate, const char *name, int proto) argument 6048 gen_protochain(compiler_state_t *cstate, int v, int proto, int dir) argument 6339 gen_check_802_11_data_frame(compiler_state_t *cstate) argument 6374 gen_proto(compiler_state_t *cstate, int v, int proto, int dir) argument 6634 gen_scode(compiler_state_t *cstate, const char *name, struct qual q) argument 6944 gen_mcode(compiler_state_t *cstate, const char *s1, const char *s2, unsigned int masklen, struct qual q) argument 7002 gen_ncode(compiler_state_t *cstate, const char *s, bpf_u_int32 v, struct qual q) argument 7122 gen_mcode6(compiler_state_t *cstate, const char *s1, const char *s2, unsigned int masklen, struct qual q) argument 7187 gen_ecode(compiler_state_t *cstate, const char *s, struct qual q) argument 7254 xfer_to_x(compiler_state_t *cstate, struct arth *a) argument 7264 xfer_to_a(compiler_state_t *cstate, struct arth *a) argument 7281 gen_load_internal(compiler_state_t *cstate, int proto, struct arth *inst, int size) argument 7554 gen_load(compiler_state_t *cstate, int proto, struct arth *inst, int size) argument 7567 gen_relation_internal(compiler_state_t *cstate, int code, struct arth *a0, struct arth *a1, int reversed) argument 7611 gen_relation(compiler_state_t *cstate, int code, struct arth *a0, struct arth *a1, int reversed) argument 7625 gen_loadlen(compiler_state_t *cstate) argument 7650 gen_loadi_internal(compiler_state_t *cstate, int val) argument 7671 gen_loadi(compiler_state_t *cstate, int val) argument 7689 gen_neg(compiler_state_t *cstate, struct arth *a_arg) argument 7719 gen_arth(compiler_state_t *cstate, int code, struct arth *a0_arg, struct arth *a1) argument 7778 init_regs(compiler_state_t *cstate) argument 7788 alloc_reg(compiler_state_t *cstate) argument 7809 free_reg(compiler_state_t *cstate, int n) argument 7815 gen_len(compiler_state_t *cstate, int jmp, int n) argument 7829 gen_greater(compiler_state_t *cstate, int n) argument 7845 gen_less(compiler_state_t *cstate, int n) argument 7873 gen_byteop(compiler_state_t *cstate, int op, int idx, int val) argument 7919 gen_broadcast(compiler_state_t *cstate, int proto) argument 7991 gen_mac_multicast(compiler_state_t *cstate, int offset) argument 8005 gen_multicast(compiler_state_t *cstate, int proto) argument 8198 gen_inbound(compiler_state_t *cstate, int dir) argument 8348 gen_pf_ifname(compiler_state_t *cstate, const char *ifname) argument 8378 gen_pf_ruleset(compiler_state_t *cstate, char *ruleset) argument 8407 gen_pf_rnr(compiler_state_t *cstate, int rnr) argument 8430 gen_pf_srnr(compiler_state_t *cstate, int srnr) argument 8453 gen_pf_reason(compiler_state_t *cstate, int reason) argument 8476 gen_pf_action(compiler_state_t *cstate, int action) argument 8498 gen_pf_ifname(compiler_state_t *cstate, const char *ifname _U_) argument 8512 gen_pf_ruleset(compiler_state_t *cstate, char *ruleset _U_) argument 8526 gen_pf_rnr(compiler_state_t *cstate, int rnr _U_) argument 8540 gen_pf_srnr(compiler_state_t *cstate, int srnr _U_) argument 8554 gen_pf_reason(compiler_state_t *cstate, int reason _U_) argument 8568 gen_pf_action(compiler_state_t *cstate, int action _U_) argument 8584 gen_p80211_type(compiler_state_t *cstate, int type, int mask) argument 8614 gen_p80211_fcdir(compiler_state_t *cstate, int fcdir) argument 8645 gen_acode(compiler_state_t *cstate, const char *s, struct qual q) argument 8680 gen_ahostop(compiler_state_t *cstate, const u_char *eaddr, int dir) argument 8734 gen_vlan_tpid_test(compiler_state_t *cstate) argument 8750 gen_vlan_vid_test(compiler_state_t *cstate, bpf_u_int32 vlan_num) argument 8760 gen_vlan_no_bpf_extensions(compiler_state_t *cstate, bpf_u_int32 vlan_num, int has_vlan_tag) argument 8786 gen_vlan_vloffset_add(compiler_state_t *cstate, bpf_abs_offset *off, int v, struct slist *s) argument 8811 gen_vlan_patch_tpid_test(compiler_state_t *cstate, struct block *b_tpid) argument 8831 gen_vlan_patch_vid_test(compiler_state_t *cstate, struct block *b_vid) argument 8875 gen_vlan_bpf_extensions(compiler_state_t *cstate, bpf_u_int32 vlan_num, int has_vlan_tag) argument 8922 gen_vlan(compiler_state_t *cstate, bpf_u_int32 vlan_num, int has_vlan_tag) argument 9020 gen_mpls(compiler_state_t *cstate, bpf_u_int32 label_num_arg, int has_label_num) argument 9102 gen_pppoed(compiler_state_t *cstate) argument 9116 gen_pppoes(compiler_state_t *cstate, bpf_u_int32 sess_num, int has_sess_num) argument 9178 gen_geneve_check(compiler_state_t *cstate, struct block *(*gen_portfn)(compiler_state_t *, int, int, int), enum e_offrel offrel, bpf_u_int32 vni, int has_vni) argument 9214 gen_geneve4(compiler_state_t *cstate, bpf_u_int32 vni, int has_vni) argument 9240 gen_geneve6(compiler_state_t *cstate, bpf_u_int32 vni, int has_vni) argument 9283 gen_geneve_offsets(compiler_state_t *cstate) argument 9418 gen_geneve(compiler_state_t *cstate, bpf_u_int32 vni, int has_vni) argument 9455 gen_geneve_ll_check(compiler_state_t *cstate) argument 9482 gen_atmfield_code_internal(compiler_state_t *cstate, int atmfield, bpf_int32 jvalue, bpf_u_int32 jtype, int reverse) argument 9537 gen_atmtype_metac(compiler_state_t *cstate) argument 9548 gen_atmtype_sc(compiler_state_t *cstate) argument 9559 gen_atmtype_llc(compiler_state_t *cstate) argument 9569 gen_atmfield_code(compiler_state_t *cstate, int atmfield, bpf_int32 jvalue, bpf_u_int32 jtype, int reverse) argument 9584 gen_atmtype_abbrev(compiler_state_t *cstate, int type) argument 9691 gen_mtp2type_abbrev(compiler_state_t *cstate, int type) argument 9770 gen_mtp3field_code(compiler_state_t *cstate, int mtp3field, bpf_u_int32 jvalue_arg, bpf_u_int32 jtype, int reverse) argument 9880 gen_msg_abbrev(compiler_state_t *cstate, int type) argument 9921 gen_atmmulti_abbrev(compiler_state_t *cstate, int type) argument [all...] |