tc_bpf.h 663 B

1234567891011121314151617181920212223242526272829
  1. /*
  2. * Copyright (c) 2015 Jiri Pirko <jiri@resnulli.us>
  3. *
  4. * This program is free software; you can redistribute it and/or modify
  5. * it under the terms of the GNU General Public License as published by
  6. * the Free Software Foundation; either version 2 of the License, or
  7. * (at your option) any later version.
  8. */
  9. #ifndef __NET_TC_BPF_H
  10. #define __NET_TC_BPF_H
  11. #include <linux/filter.h>
  12. #include <net/act_api.h>
  13. struct tcf_bpf {
  14. struct tc_action common;
  15. struct bpf_prog __rcu *filter;
  16. union {
  17. u32 bpf_fd;
  18. u16 bpf_num_ops;
  19. };
  20. struct sock_filter *bpf_ops;
  21. const char *bpf_name;
  22. };
  23. #define to_bpf(a) ((struct tcf_bpf *)a)
  24. #endif /* __NET_TC_BPF_H */