snmpUnixDomain.h 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. #ifndef _SNMPUNIXDOMAIN_H
  2. #define _SNMPUNIXDOMAIN_H
  3. #ifdef NETSNMP_TRANSPORT_UNIX_DOMAIN
  4. #if defined(cygwin) || defined(mingw32) || defined(mingw32msvc)
  5. config_error(Unix domain protocol support unavailable for this platform);
  6. #endif
  7. #ifdef HAVE_SYS_SOCKET_H
  8. #include <sys/socket.h>
  9. #endif
  10. #ifdef HAVE_SYS_UN_H
  11. #include <sys/un.h>
  12. #endif
  13. #include <net-snmp/library/snmp_transport.h>
  14. config_require(SocketBase);
  15. #ifdef __cplusplus
  16. extern "C" {
  17. #endif
  18. /*
  19. * The SNMP over local socket transport domain is identified by
  20. * transportDomainLocal as defined in RFC 3419.
  21. */
  22. #define TRANSPORT_DOMAIN_LOCAL 1,3,6,1,2,1,100,1,13
  23. NETSNMP_IMPORT oid netsnmp_UnixDomain[];
  24. netsnmp_transport *netsnmp_unix_transport(const struct sockaddr_un *addr,
  25. int local);
  26. void netsnmp_unix_agent_config_tokens_register(void);
  27. void netsnmp_unix_parse_security(const char *token, char *param);
  28. int netsnmp_unix_getSecName(void *opaque, int olength,
  29. const char *community,
  30. size_t community_len, const char **secName,
  31. const char **contextName);
  32. /*
  33. * "Constructor" for transport domain object.
  34. */
  35. void netsnmp_unix_ctor(void);
  36. /*
  37. * Support functions
  38. */
  39. void netsnmp_unix_create_path_with_mode(int mode);
  40. void netsnmp_unix_dont_create_path(void);
  41. #ifdef __cplusplus
  42. }
  43. #endif
  44. #else
  45. #define netsnmp_unix_create_path_with_mode(x)
  46. #define netsnmp_unix_dont_create_path()
  47. #endif /*NETSNMP_TRANSPORT_UNIX_DOMAIN */
  48. #endif/*_SNMPUNIXDOMAIN_H*/