/* * netsniff-ng - the packet sniffing beast * Subject to the GPL, version 2. */ #ifndef DISSECTOR_SLL_H #define DISSECTOR_SLL_H #include "hash.h" #include "proto.h" extern void dissector_init_sll(int fnttype); extern void dissector_cleanup_sll(void); extern struct protocol *dissector_get_sll_entry_point(void); extern struct protocol *dissector_get_sll_exit_point(void); #endif /* DISSECTOR_SLL_H */ //git.distanz.ch/linux/net-next.git' title='net-next.git Git repository'/>
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexei Starovoitov <ast@fb.com>2016-09-01 18:37:22 -0700
committerDavid S. Miller <davem@davemloft.net>2016-09-02 10:46:44 -0700
commit0515e5999a466dfe6e1924f460da599bb6821487 (patch)
treee4ba954bea80d223248c57885019b7620375164a
parentea2e7ce5d0fc878463ba39deb46cf2ab20398fd2 (diff)
bpf: introduce BPF_PROG_TYPE_PERF_EVENT program type
Introduce BPF_PROG_TYPE_PERF_EVENT programs that can be attached to HW and SW perf events (PERF_TYPE_HARDWARE and PERF_TYPE_SOFTWARE correspondingly in uapi/linux/perf_event.h) The program visible context meta structure is struct bpf_perf_event_data { struct pt_regs regs; __u64 sample_period; }; which is accessible directly from the program: int bpf_prog(struct bpf_perf_event_data *ctx) { ... ctx->sample_period ... ... ctx->regs.ip ... } The bpf verifier rewrites the accesses into kernel internal struct bpf_perf_event_data_kern which allows changing struct perf_sample_data without affecting bpf programs. New fields can be added to the end of struct bpf_perf_event_data in the future. Signed-off-by: Alexei Starovoitov <ast@kernel.org> Acked-by: Daniel Borkmann <daniel@iogearbox.net> Signed-off-by: David S. Miller <davem@davemloft.net>