snmpUDPIPv6Domain.h 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. #ifndef _SNMPUDPIPV6DOMAIN_H
  2. #define _SNMPUDPIPV6DOMAIN_H
  3. /*
  4. * Portions of this file are copyrighted by:
  5. * Copyright (c) 2016 VMware, Inc. All rights reserved.
  6. * Use is subject to license terms specified in the COPYING file
  7. * distributed with the Net-SNMP package.
  8. */
  9. #include <net-snmp/types.h>
  10. #ifdef __cplusplus
  11. extern "C" {
  12. #endif
  13. #include <net-snmp/library/snmp_transport.h>
  14. config_require(IPv6Base);
  15. config_require(UDPBase);
  16. #include <net-snmp/library/snmpIPv6BaseDomain.h>
  17. /*
  18. * The SNMP over UDP over IPv6 transport domain is identified by
  19. * transportDomainUdpIpv6 as defined in RFC 3419.
  20. */
  21. #define TRANSPORT_DOMAIN_UDP_IPV6 1,3,6,1,2,1,100,1,2
  22. NETSNMP_IMPORT oid netsnmp_UDPIPv6Domain[];
  23. netsnmp_transport *netsnmp_udp6_transport(const struct netsnmp_ep *ep,
  24. int local);
  25. netsnmp_transport *
  26. netsnmp_udp6_transport_with_source(const struct netsnmp_ep *ep, int local,
  27. const struct netsnmp_ep *src_addr);
  28. /** internal functions for derivatives of udpipv6 */
  29. netsnmp_transport *
  30. netsnmp_udp6_transport_init(const struct netsnmp_ep *ep, int local);
  31. int
  32. netsnmp_udp6_transport_socket(int flags);
  33. int
  34. netsnmp_udp6_transport_bind(netsnmp_transport *t,
  35. const struct netsnmp_ep *ep,
  36. int flags);
  37. void
  38. netsnmp_udp6_transport_get_bound_addr(netsnmp_transport *t);
  39. /*
  40. * Convert a "traditional" peername into a sockaddr_in6 structure which is
  41. * written to *addr. Returns 1 if the conversion was successful, or 0 if it
  42. * failed.
  43. */
  44. int netsnmp_sockaddr_in6(struct sockaddr_in6 *addr,
  45. const char *peername,
  46. int remote_port);
  47. NETSNMP_IMPORT
  48. void netsnmp_udp6_agent_config_tokens_register(void);
  49. NETSNMP_IMPORT
  50. void netsnmp_udp6_parse_security(const char *token,
  51. char *param);
  52. NETSNMP_IMPORT
  53. int netsnmp_udp6_getSecName(void *opaque, int olength,
  54. const char *community,
  55. int community_len,
  56. const char **secname,
  57. const char **contextName);
  58. /*
  59. * "Constructor" for transport domain object.
  60. */
  61. void netsnmp_udpipv6_ctor(void);
  62. #ifdef __cplusplus
  63. }
  64. #endif
  65. #endif/*_SNMPUDPIPV6DOMAIN_H*/