sock_diag.h 886 B

1234567891011121314151617181920212223242526272829
  1. #ifndef __SOCK_DIAG_H__
  2. #define __SOCK_DIAG_H__
  3. #include <linux/user_namespace.h>
  4. #include <uapi/linux/sock_diag.h>
  5. struct sk_buff;
  6. struct nlmsghdr;
  7. struct sock;
  8. struct sock_diag_handler {
  9. __u8 family;
  10. int (*dump)(struct sk_buff *skb, struct nlmsghdr *nlh);
  11. };
  12. int sock_diag_register(const struct sock_diag_handler *h);
  13. void sock_diag_unregister(const struct sock_diag_handler *h);
  14. void sock_diag_register_inet_compat(int (*fn)(struct sk_buff *skb, struct nlmsghdr *nlh));
  15. void sock_diag_unregister_inet_compat(int (*fn)(struct sk_buff *skb, struct nlmsghdr *nlh));
  16. int sock_diag_check_cookie(void *sk, __u32 *cookie);
  17. void sock_diag_save_cookie(void *sk, __u32 *cookie);
  18. int sock_diag_put_meminfo(struct sock *sk, struct sk_buff *skb, int attr);
  19. int sock_diag_put_filterinfo(struct user_namespace *user_ns, struct sock *sk,
  20. struct sk_buff *skb, int attrtype);
  21. #endif