SM0 She11
Path:
/
/
usr
/
include
/
net-snmp
/
library
Full Path (server): /usr/include/net-snmp/library
Create Fil3
Upl04d Fil3
📄 README
[E]
[D]
[R]
📄 asn1.h
[E]
[D]
[R]
📄 callback.h
[E]
[D]
[R]
📄 cert_util.h
[E]
[D]
[R]
📄 check_varbind.h
[E]
[D]
[R]
📄 container.h
[E]
[D]
[R]
📄 container_binary_array.h
[E]
[D]
[R]
📄 container_iterator.h
[E]
[D]
[R]
📄 container_list_ssll.h
[E]
[D]
[R]
📄 container_null.h
[E]
[D]
[R]
📄 data_list.h
[E]
[D]
[R]
📄 default_store.h
[E]
[D]
[R]
📄 dir_utils.h
[E]
[D]
[R]
📄 factory.h
[E]
[D]
[R]
📄 fd_event_manager.h
[E]
[D]
[R]
📄 file_utils.h
[E]
[D]
[R]
📄 getopt.h
[E]
[D]
[R]
📄 int64.h
[E]
[D]
[R]
📄 keytools.h
[E]
[D]
[R]
📄 large_fd_set.h
[E]
[D]
[R]
📄 lcd_time.h
[E]
[D]
[R]
📄 md5.h
[E]
[D]
[R]
📄 mib.h
[E]
[D]
[R]
📄 mt_support.h
[E]
[D]
[R]
📄 oid.h
[E]
[D]
[R]
📄 oid_stash.h
[E]
[D]
[R]
📄 parse.h
[E]
[D]
[R]
📄 read_config.h
[E]
[D]
[R]
📄 scapi.h
[E]
[D]
[R]
📄 snmp-tc.h
[E]
[D]
[R]
📄 snmp.h
[E]
[D]
[R]
📄 snmpAliasDomain.h
[E]
[D]
[R]
📄 snmpCallbackDomain.h
[E]
[D]
[R]
📄 snmpDTLSUDPDomain.h
[E]
[D]
[R]
📄 snmpIPv4BaseDomain.h
[E]
[D]
[R]
📄 snmpIPv6BaseDomain.h
[E]
[D]
[R]
📄 snmpSocketBaseDomain.h
[E]
[D]
[R]
📄 snmpTCPBaseDomain.h
[E]
[D]
[R]
📄 snmpTCPDomain.h
[E]
[D]
[R]
📄 snmpTCPIPv6Domain.h
[E]
[D]
[R]
📄 snmpTLSBaseDomain.h
[E]
[D]
[R]
📄 snmpTLSTCPDomain.h
[E]
[D]
[R]
📄 snmpUDPBaseDomain.h
[E]
[D]
[R]
📄 snmpUDPDomain.h
[E]
[D]
[R]
📄 snmpUDPIPv4BaseDomain.h
[E]
[D]
[R]
📄 snmpUDPIPv6Domain.h
[E]
[D]
[R]
📄 snmpUnixDomain.h
[E]
[D]
[R]
📄 snmp_alarm.h
[E]
[D]
[R]
📄 snmp_api.h
[E]
[D]
[R]
📄 snmp_assert.h
[E]
[D]
[R]
📄 snmp_client.h
[E]
[D]
[R]
📄 snmp_debug.h
[E]
[D]
[R]
📄 snmp_enum.h
[E]
[D]
[R]
📄 snmp_impl.h
[E]
[D]
[R]
📄 snmp_logging.h
[E]
[D]
[R]
📄 snmp_parse_args.h
[E]
[D]
[R]
📄 snmp_secmod.h
[E]
[D]
[R]
📄 snmp_service.h
[E]
[D]
[R]
📄 snmp_transport.h
[E]
[D]
[R]
📄 snmptsm.h
[E]
[D]
[R]
📄 snmpusm.h
[E]
[D]
[R]
📄 snmpv3-security-includes.h
[E]
[D]
[R]
📄 snmpv3.h
[E]
[D]
[R]
📄 system.h
[E]
[D]
[R]
📄 text_utils.h
[E]
[D]
[R]
📄 tools.h
[E]
[D]
[R]
📄 transform_oids.h
[E]
[D]
[R]
📄 types.h
[E]
[D]
[R]
📄 ucd_compat.h
[E]
[D]
[R]
📄 vacm.h
[E]
[D]
[R]
📄 winpipe.h
[E]
[D]
[R]
📄 winservice.h
[E]
[D]
[R]
Editing: large_fd_set.h
/** * @file large_fd_set.h * * @brief Macro's and functions for manipulation of large file descriptor sets. */ #ifndef LARGE_FD_SET_H #define LARGE_FD_SET_H #include <net-snmp/net-snmp-config.h> #include <net-snmp/types.h> #ifdef HAVE_SYS_SELECT_H #include <sys/select.h> #endif #if defined(HAVE_WINSOCK_H) && !defined(_WINSOCKAPI_) && !defined(_WINSOCK_H) #error <winsock.h> or <winsock2.h> must have been included before this file. #endif #ifdef __cplusplus extern "C" { #endif /** * Add socket fd to the set *fdset if not yet present. * Enlarges the set if necessary. */ #define NETSNMP_LARGE_FD_SET(fd, fdset) \ netsnmp_large_fd_setfd(fd, fdset) /** * Remove socket fd from the set *fdset. * Do nothing if fd is not present in *fdset. * Do nothing if fd >= fdset->lfs_setsize. */ #define NETSNMP_LARGE_FD_CLR(fd, fdset) \ netsnmp_large_fd_clr(fd, fdset) /** * Test whether set *fdset contains socket fd. * Evaluates to zero (false) if fd >= fdset->lfs_setsize. */ #define NETSNMP_LARGE_FD_ISSET(fd, fdset) \ netsnmp_large_fd_is_set(fd, fdset) #if !defined(cygwin) && defined(HAVE_WINSOCK_H) /** * Number of bytes needed to store a number of file descriptors as a * struct fd_set. */ #define NETSNMP_FD_SET_BYTES(setsize) \ (sizeof(fd_set) + ((setsize) > FD_SETSIZE ? \ ((setsize) - FD_SETSIZE) * sizeof(SOCKET) : 0)) /** Remove all sockets from the set *fdset. */ #define NETSNMP_LARGE_FD_ZERO(fdset) \ do { (fdset)->lfs_setptr->fd_count = 0; } while(0) NETSNMP_IMPORT void netsnmp_large_fd_setfd( SOCKET fd, netsnmp_large_fd_set *fdset); NETSNMP_IMPORT void netsnmp_large_fd_clr( SOCKET fd, netsnmp_large_fd_set *fdset); NETSNMP_IMPORT int netsnmp_large_fd_is_set(SOCKET fd, netsnmp_large_fd_set *fdset); #else /** * Size of a single element of the array with file descriptor bitmasks. * * According to SUSv2, this array must have the name fds_bits. See also * <a href="http://www.opengroup.org/onlinepubs/007908775/xsh/systime.h.html">The Single UNIX Specification, Version 2, <sys/time.h></a>. */ #define NETSNMP_FD_MASK_SIZE sizeof(((fd_set*)0)->fds_bits[0]) /** Number of bits in one element of the fd_set.fds_bits array. */ #define NETSNMP_BITS_PER_FD_MASK (8 * NETSNMP_FD_MASK_SIZE) /** Number of elements needed for the fds_bits array. */ #define NETSNMP_FD_SET_ELEM_COUNT(setsize) \ (setsize + NETSNMP_BITS_PER_FD_MASK - 1) / NETSNMP_BITS_PER_FD_MASK /** * Number of bytes needed to store a number of file descriptors as a * struct fd_set. */ #define NETSNMP_FD_SET_BYTES(setsize) \ (sizeof(fd_set) + ((setsize) > FD_SETSIZE ? \ NETSNMP_FD_SET_ELEM_COUNT((setsize) - FD_SETSIZE) \ * NETSNMP_FD_MASK_SIZE : 0)) /** Remove all file descriptors from the set *fdset. */ #define NETSNMP_LARGE_FD_ZERO(fdset) \ do { \ memset((fdset)->lfs_setptr, 0, \ NETSNMP_FD_SET_BYTES((fdset)->lfs_setsize)); \ } while (0) void netsnmp_large_fd_setfd( int fd, netsnmp_large_fd_set *fdset); void netsnmp_large_fd_clr( int fd, netsnmp_large_fd_set *fdset); int netsnmp_large_fd_is_set(int fd, netsnmp_large_fd_set *fdset); #endif /** * Initialize a netsnmp_large_fd_set structure. * * Note: this function only initializes the lfs_setsize and lfs_setptr * members of netsnmp_large_fd_set, not the file descriptor set itself. * The file descriptor set must be initialized separately, e.g. via * NETSNMP_LARGE_FD_CLR(). */ NETSNMP_IMPORT void netsnmp_large_fd_set_init( netsnmp_large_fd_set *fdset, int setsize); /** * Modify the size of a file descriptor set and preserve the first * min(fdset->lfs_setsize, setsize) file descriptors. * * Returns 1 upon success or 0 if memory allocation failed. */ int netsnmp_large_fd_set_resize( netsnmp_large_fd_set *fdset, int setsize); /** * Synchronous I/O multiplexing for large file descriptor sets. * * On POSIX systems, any file descriptor set with size below numfds will be * resized before invoking select(). * * @see See also select(2) for more information. */ NETSNMP_IMPORT int netsnmp_large_fd_set_select(int numfds, netsnmp_large_fd_set *readfds, netsnmp_large_fd_set *writefds, netsnmp_large_fd_set *exceptfds, struct timeval *timeout); /** Deallocate the memory allocated by netsnmp_large_fd_set_init. */ NETSNMP_IMPORT void netsnmp_large_fd_set_cleanup(netsnmp_large_fd_set *fdset); /** * Copy an fd_set to a netsnmp_large_fd_set structure. * * @note dst must have been initialized before this function is called. */ void netsnmp_copy_fd_set_to_large_fd_set(netsnmp_large_fd_set *dst, const fd_set *src); /** * Copy a netsnmp_large_fd_set structure into an fd_set. * * @return 0 upon success, -1 when copying fails because *src is too large to * fit into *dst. */ int netsnmp_copy_large_fd_set_to_fd_set( fd_set *dst, const netsnmp_large_fd_set *src); #ifdef __cplusplus } #endif #endif /* LARGE_FD_SET_H */
Save