tcp_metrics.h 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
  2. /* tcp_metrics.h - TCP Metrics Interface */
  3. #ifndef _LINUX_TCP_METRICS_H
  4. #define _LINUX_TCP_METRICS_H
  5. #include <linux/types.h>
  6. /* NETLINK_GENERIC related info
  7. */
  8. #define TCP_METRICS_GENL_NAME "tcp_metrics"
  9. #define TCP_METRICS_GENL_VERSION 0x1
  10. enum tcp_metric_index {
  11. TCP_METRIC_RTT, /* in ms units */
  12. TCP_METRIC_RTTVAR, /* in ms units */
  13. TCP_METRIC_SSTHRESH,
  14. TCP_METRIC_CWND,
  15. TCP_METRIC_REORDERING,
  16. TCP_METRIC_RTT_US, /* in usec units */
  17. TCP_METRIC_RTTVAR_US, /* in usec units */
  18. /* Always last. */
  19. __TCP_METRIC_MAX,
  20. };
  21. #define TCP_METRIC_MAX (__TCP_METRIC_MAX - 1)
  22. enum {
  23. TCP_METRICS_ATTR_UNSPEC,
  24. TCP_METRICS_ATTR_ADDR_IPV4, /* u32 */
  25. TCP_METRICS_ATTR_ADDR_IPV6, /* binary */
  26. TCP_METRICS_ATTR_AGE, /* msecs */
  27. TCP_METRICS_ATTR_TW_TSVAL, /* u32, raw, rcv tsval */
  28. TCP_METRICS_ATTR_TW_TS_STAMP, /* s32, sec age */
  29. TCP_METRICS_ATTR_VALS, /* nested +1, u32 */
  30. TCP_METRICS_ATTR_FOPEN_MSS, /* u16 */
  31. TCP_METRICS_ATTR_FOPEN_SYN_DROPS, /* u16, count of drops */
  32. TCP_METRICS_ATTR_FOPEN_SYN_DROP_TS, /* msecs age */
  33. TCP_METRICS_ATTR_FOPEN_COOKIE, /* binary */
  34. TCP_METRICS_ATTR_SADDR_IPV4, /* u32 */
  35. TCP_METRICS_ATTR_SADDR_IPV6, /* binary */
  36. TCP_METRICS_ATTR_PAD,
  37. __TCP_METRICS_ATTR_MAX,
  38. };
  39. #define TCP_METRICS_ATTR_MAX (__TCP_METRICS_ATTR_MAX - 1)
  40. enum {
  41. TCP_METRICS_CMD_UNSPEC,
  42. TCP_METRICS_CMD_GET,
  43. TCP_METRICS_CMD_DEL,
  44. __TCP_METRICS_CMD_MAX,
  45. };
  46. #define TCP_METRICS_CMD_MAX (__TCP_METRICS_CMD_MAX - 1)
  47. #endif /* _LINUX_TCP_METRICS_H */