/* -*- C -*- */ /**@MODULEPAGE "su" - OS Services and Utilities * * @section su_meta Module Information * * The @b su module contains a simple, portable socket/timing/synchronizing * library developed for Sofia communications software. * * @CONTACT Pekka Pessi * * @STATUS @SofiaSIP Core library * * @LICENSE LGPL * * @section su_overview Overview * * The @b su module provides following interfaces for application programs: * * - - integral types * - - @ref su_alloc memory management * - - @ref su_socket * - - get list of local IP addresses * - - @ref su_wait * - - @ref su_time * - - @ref su_log * - - @ref su_tag * - - @ref su_md5 * - - @ref su_uniqueid Unique ID and random number generators * * The @b su library also contains some collection datatypes: * - - @ref su_htable * - - balanced red-black trees * - - @ref su_strlst list of strings * - - @ref su_vector dynamic arrays of pointers * * There are also some convenience macros for unit test programs: * - sofia-sip/tstdef.h - macros for unit tests * * @author Pekka Pessi * @author Jari Selin * * @par SU Debug Log * * The debugging output from @b su module is controlled by #su_log_global * log object. The environment variable #SU_DEBUG sets the default log * level. */ /**@maindefgroup su OS Utilities * * The "su" module contains OS utilies for Sofia. * * The @b su is a simple, portable socket/timing/synchronizing library * developed for Sofia communications software. Currently, interface to * it consists of following parts: * * - - basic integer types * - su_socket - socket functions * - su_wait - synchronization functions * - su_time - time functions * - su_alloc - memory management functions * - su_log - generic logging functions * - su_tag - tag list function * - su_md5 - MD5 hashing */ /**@defgroup su_programs Shell Programs * * The @b su module provides few shell utilities: * - @ref localinfo (localinfo.c) * - @ref addrinfo (addrinfo.c) */ /**@defgroup su_socket Socket Functions * * @brief The contains the portable socket functions. * * The contains following functions, macros, and types: * - su_init(): initializes sockets * - su_deinit(): deinitializes sockets * - su_socket(): creates a socket * - su_close(): closes a socket * - su_ioctl(): ioctl to a socket * - su_setreuseaddr(): set/reset reusing the addresses/ports for a socket * - su_setblocking(): enables/disables blocking * - su_is_blocking(): checks if the previous call failed because it * would have blocked * - su_errno(): the latest socket error * - su_perror(): prints the latest socket error message to stderr * - su_strerror(): returns the given socket error message * - su_perror2(): prints the given socket error message to stderr * - su_soerror(): returns the error code associated with the socket * - su_getmsgsize(): return the number of bytes that can be recv()ed from * a socket * - su_getlocalip(): return an IP address belonging to the local host * - su_send(), su_sendto(): type-compatible send() * - su_recv(), su_recvfrom(): type-compatible recv() * - su_vsend(): scatter-gather send * - su_vrecv(): scatter-gather receive * - #su_iovec_t: structure holding scatter-gather IO vector */ /**@defgroup su_htable Hash tables * * Hash tables. * * The hash table interface and implementation is defined in * . Example code and tests for the implementation is in * test_htable.c. */