]> git.proxmox.com Git - mirror_iproute2.git/blob - tc/tc_bpf.h
tc: push bpf common code into separate file
[mirror_iproute2.git] / tc / tc_bpf.h
1 /*
2 * tc_bpf.h BPF common code
3 *
4 * This program is free software; you can distribute it and/or
5 * modify it under the terms of the GNU General Public License
6 * as published by the Free Software Foundation; either version
7 * 2 of the License, or (at your option) any later version.
8 *
9 * Authors: Daniel Borkmann <dborkman@redhat.com>
10 * Jiri Pirko <jiri@resnulli.us>
11 */
12
13 #ifndef _TC_BPF_H_
14 #define _TC_BPF_H_ 1
15
16 #include <stdio.h>
17 #include <linux/filter.h>
18 #include <linux/netlink.h>
19 #include <linux/rtnetlink.h>
20
21 int bpf_parse_string(char *arg, bool from_file, __u16 *bpf_len,
22 char **bpf_string, bool *need_release,
23 const char separator);
24 int bpf_parse_ops(int argc, char **argv, struct sock_filter *bpf_ops,
25 bool from_file);
26 void bpf_print_ops(FILE *f, struct rtattr *bpf_ops, __u16 len);
27
28 #endif