/** * * @retval 0 no errors * @retval !0 errors */ int netsnmp_arch_tcpconn_container_load(netsnmp_container *container, u_int load_flags ) { int rc = 0; DEBUGMSGTL(("access:tcpconn:container", "tcpconn_container_arch_load (flags %x)\n", load_flags)); if (NULL == container) { snmp_log(LOG_ERR, "no container specified/found for access_tcpconn\n"); return -1; } rc = _load4(container, load_flags); #if defined (NETSNMP_ENABLE_IPV6) if((0 != rc) || (load_flags & NETSNMP_ACCESS_TCPCONN_LOAD_IPV4_ONLY)) return rc; /* * load ipv6. ipv6 module might not be loaded, * so ignore -2 err (file not found) */ rc = _load6(container, load_flags); if (-2 == rc) rc = 0; #endif return rc; }
/** * * @retval 0 no errors * @retval !0 errors */ int netsnmp_arch_udp_endpoint_container_load(netsnmp_container *container, u_int load_flags ) { int rc = 0; /* Setup the pid_from_inode table, and fill it.*/ netsnmp_get_pid_from_inode_init(); rc = _load4(container, load_flags); if(rc < 0) { u_int flags = NETSNMP_ACCESS_UDP_ENDPOINT_FREE_KEEP_CONTAINER; netsnmp_access_udp_endpoint_container_free(container, flags); return rc; } #if defined (NETSNMP_ENABLE_IPV6) rc = _load6(container, load_flags); if(rc < 0) { u_int flags = NETSNMP_ACCESS_UDP_ENDPOINT_FREE_KEEP_CONTAINER; netsnmp_access_udp_endpoint_container_free(container, flags); return rc; } #endif return 0; }
/** * * @retval 0 no errors * @retval !0 errors */ int netsnmp_arch_udp_endpoint_container_load(netsnmp_container *container, u_int load_flags ) { int rc = 0; rc = _load4(container, load_flags); if(rc < 0) { u_int flags = NETSNMP_ACCESS_UDP_ENDPOINT_FREE_KEEP_CONTAINER; netsnmp_access_udp_endpoint_container_free(container, flags); return rc; } #if defined (NETSNMP_ENABLE_IPV6) rc = _load6(container, load_flags); if(rc < 0) { u_int flags = NETSNMP_ACCESS_UDP_ENDPOINT_FREE_KEEP_CONTAINER; netsnmp_access_udp_endpoint_container_free(container, flags); return rc; } #endif return 0; }
/** * * @retval 0 no errors * @retval !0 errors */ int netsnmp_arch_tcpconn_container_load(netsnmp_container *container, u_int load_flags ) { int rc = 0; rc = _load4(container, load_flags); if(rc < 0) { u_int flags = NETSNMP_ACCESS_TCPCONN_FREE_KEEP_CONTAINER; netsnmp_access_tcpconn_container_free(container, flags); return rc; } #if defined (INET6) rc = _load6(container, load_flags); if(rc < 0) { u_int flags = NETSNMP_ACCESS_TCPCONN_FREE_KEEP_CONTAINER; netsnmp_access_tcpconn_container_free(container, flags); return rc; } #endif return 0; }