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