sockev.h 725 B

123456789101112131415161718192021222324252627282930313233
  1. #ifndef _SOCKEV_H_
  2. #define _SOCKEV_H_
  3. #include <linux/types.h>
  4. #include <linux/netlink.h>
  5. #include <linux/socket.h>
  6. enum sknetlink_groups {
  7. SKNLGRP_UNICAST,
  8. SKNLGRP_SOCKEV,
  9. __SKNLGRP_MAX
  10. };
  11. #define SOCKEV_STR_MAX 32
  12. /********************************************************************
  13. * Socket operation messages
  14. ****/
  15. struct sknlsockevmsg {
  16. __u8 event[SOCKEV_STR_MAX];
  17. __u32 pid; /* (struct task_struct*)->pid */
  18. __u16 skfamily; /* (struct socket*)->sk->sk_family */
  19. __u8 skstate; /* (struct socket*)->sk->sk_state */
  20. __u8 skprotocol; /* (struct socket*)->sk->sk_protocol */
  21. __u16 sktype; /* (struct socket*)->sk->sk_type */
  22. __u64 skflags; /* (struct socket*)->sk->sk_flags */
  23. };
  24. #endif /* _SOCKEV_H_ */