blob: 08cca9274074778b483dd67acbd2504a70d652ec [file] [log] [blame]
Jiri Pirko1d129d12015-01-19 16:56:29 +01001/*
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
21int bpf_parse_string(char *arg, bool from_file, __u16 *bpf_len,
22 char **bpf_string, bool *need_release,
23 const char separator);
24int bpf_parse_ops(int argc, char **argv, struct sock_filter *bpf_ops,
25 bool from_file);
26void bpf_print_ops(FILE *f, struct rtattr *bpf_ops, __u16 len);
27
28#endif