ebpf_functions.h 1.1 KB

12345678910111213141516171819202122232425262728293031
  1. // SPDX-License-Identifier: GPL-3.0-or-later
  2. #ifndef NETDATA_EBPF_FUNCTIONS_H
  3. #define NETDATA_EBPF_FUNCTIONS_H 1
  4. // Common
  5. static inline void EBPF_PLUGIN_FUNCTIONS(const char *NAME, const char *DESC, int update_every) {
  6. fprintf(stdout, PLUGINSD_KEYWORD_FUNCTION " GLOBAL \"%s\" %d \"%s\" \"top\" \"members\" %d\n",
  7. NAME, update_every, DESC, RRDFUNCTIONS_PRIORITY_DEFAULT);
  8. }
  9. // configuration file & description
  10. #define NETDATA_DIRECTORY_FUNCTIONS_CONFIG_FILE "functions.conf"
  11. #define NETDATA_EBPF_FUNCTIONS_MODULE_DESC "Show information about current function status."
  12. // function list
  13. #define EBPF_FUNCTION_SOCKET "network-connections"
  14. // socket constants
  15. #define EBPF_PLUGIN_SOCKET_FUNCTION_DESCRIPTION "Detailed information about open sockets."
  16. #define EBPF_FUNCTION_SOCKET_FAMILY "family:"
  17. #define EBPF_FUNCTION_SOCKET_PERIOD "period:"
  18. #define EBPF_FUNCTION_SOCKET_RESOLVE "resolve:"
  19. #define EBPF_FUNCTION_SOCKET_RANGE "range:"
  20. #define EBPF_FUNCTION_SOCKET_PORT "port:"
  21. #define EBPF_FUNCTION_SOCKET_RESET "reset"
  22. #define EBPF_FUNCTION_SOCKET_INTERFACES "interfaces"
  23. void *ebpf_function_thread(void *ptr);
  24. #endif