Mirror of strace – the linux syscall tracer
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

netlink_sock_diag.h 1.4KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. /*
  2. * Copyright (c) 2017 JingPiao Chen <chenjingpiao@gmail.com>
  3. * Copyright (c) 2016-2018 The strace developers.
  4. * All rights reserved.
  5. *
  6. * SPDX-License-Identifier: LGPL-2.1-or-later
  7. */
  8. #ifndef STRACE_NETLINK_SOCK_DIAG_H
  9. # define STRACE_NETLINK_SOCK_DIAG_H
  10. # define DECL_NETLINK_DIAG_DECODER(diag_decode_name) \
  11. void \
  12. diag_decode_name(struct tcb *tcp, \
  13. const struct nlmsghdr *nlmsghdr, \
  14. uint8_t family, \
  15. kernel_ulong_t addr, \
  16. unsigned int len) \
  17. /* End of DECL_NETLINK_DIAG_DECODER definition. */
  18. extern DECL_NETLINK_DIAG_DECODER(decode_inet_diag_msg);
  19. extern DECL_NETLINK_DIAG_DECODER(decode_inet_diag_req);
  20. extern DECL_NETLINK_DIAG_DECODER(decode_netlink_diag_msg);
  21. extern DECL_NETLINK_DIAG_DECODER(decode_netlink_diag_req);
  22. extern DECL_NETLINK_DIAG_DECODER(decode_packet_diag_msg);
  23. extern DECL_NETLINK_DIAG_DECODER(decode_packet_diag_req);
  24. extern DECL_NETLINK_DIAG_DECODER(decode_smc_diag_msg);
  25. extern DECL_NETLINK_DIAG_DECODER(decode_smc_diag_req);
  26. extern DECL_NETLINK_DIAG_DECODER(decode_unix_diag_msg);
  27. extern DECL_NETLINK_DIAG_DECODER(decode_unix_diag_req);
  28. struct inet_diag_sockid;
  29. extern void
  30. print_inet_diag_sockid(const struct inet_diag_sockid *, const uint8_t family);
  31. # define PRINT_FIELD_INET_DIAG_SOCKID(prefix_, where_, field_, af_) \
  32. do { \
  33. STRACE_PRINTF("%s%s=", (prefix_), #field_); \
  34. print_inet_diag_sockid(&(where_).field_, (af_)); \
  35. } while (0)
  36. #endif /* !STRACE_NETLINK_SOCK_DIAG_H */