net-snmp 5.7
snmpUnixDomain.h
00001 #ifndef _SNMPUNIXDOMAIN_H
00002 #define _SNMPUNIXDOMAIN_H
00003 
00004 #ifdef NETSNMP_TRANSPORT_UNIX_DOMAIN
00005 
00006 #if defined(cygwin) || defined(mingw32) || defined(mingw32msvc)
00007     config_error(Unix domain protocol support unavailable for this platform)
00008 #endif
00009 
00010 #if HAVE_SYS_SOCKET_H
00011 #include <sys/socket.h>
00012 #endif
00013 #if HAVE_SYS_UN_H
00014 #include <sys/un.h>
00015 #endif
00016 
00017 #include <net-snmp/library/snmp_transport.h>
00018 
00019 config_require(SocketBase)
00020 
00021 #ifdef __cplusplus
00022 extern          "C" {
00023 #endif
00024 
00025 /*
00026  * The SNMP over local socket transport domain is identified by
00027  * transportDomainLocal as defined in RFC 3419.
00028  */
00029 
00030 #define TRANSPORT_DOMAIN_LOCAL  1,3,6,1,2,1,100,1,13
00031 NETSNMP_IMPORT oid netsnmp_UnixDomain[];
00032 
00033 netsnmp_transport *netsnmp_unix_transport(struct sockaddr_un *addr,
00034                                           int local);
00035 void netsnmp_unix_agent_config_tokens_register(void);
00036 void netsnmp_unix_parse_security(const char *token, char *param);
00037 int netsnmp_unix_getSecName(void *opaque, int olength,
00038                             const char *community,
00039                             size_t community_len, const char **secName,
00040                             const char **contextName);
00041 
00042 
00043 /*
00044  * "Constructor" for transport domain object.  
00045  */
00046 
00047 void            netsnmp_unix_ctor(void);
00048 
00049 /*
00050  * Support functions
00051  */
00052 void            netsnmp_unix_create_path_with_mode(int mode);
00053 void            netsnmp_unix_dont_create_path(void);
00054 
00055 #ifdef __cplusplus
00056 }
00057 #endif
00058 #else
00059 
00060 #define netsnmp_unix_create_path_with_mode(x)
00061 #define netsnmp_unix_dont_create_path()
00062 
00063 #endif                          /*NETSNMP_TRANSPORT_UNIX_DOMAIN */
00064 
00065 #endif/*_SNMPUNIXDOMAIN_H*/