su.docs 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111
  1. /* -*- C -*- */
  2. /**@MODULEPAGE "su" - OS Services and Utilities
  3. *
  4. * @section su_meta Module Information
  5. *
  6. * The @b su module contains a simple, portable socket/timing/synchronizing
  7. * library developed for Sofia communications software.
  8. *
  9. * @CONTACT Pekka Pessi <Pekka.Pessi@nokia.com>
  10. *
  11. * @STATUS @SofiaSIP Core library
  12. *
  13. * @LICENSE LGPL
  14. *
  15. * @section su_overview Overview
  16. *
  17. * The @b su module provides following interfaces for application programs:
  18. *
  19. * - <sofia-sip/su_types.h> - integral types
  20. * - <sofia-sip/su_alloc.h> - @ref su_alloc memory management
  21. * - <sofia-sip/su.h> - @ref su_socket
  22. * - <sofia-sip/su_localinfo.h> - get list of local IP addresses
  23. * - <sofia-sip/su_wait.h> - @ref su_wait
  24. * - <sofia-sip/su_time.h> - @ref su_time
  25. * - <sofia-sip/su_log.h> - @ref su_log
  26. * - <sofia-sip/su_tag.h> - @ref su_tag
  27. * - <sofia-sip/su_md5.h> - @ref su_md5
  28. * - <sofia-sip/su_uniqueid.h> - @ref su_uniqueid Unique ID and random number generators
  29. *
  30. * The @b su library also contains some collection datatypes:
  31. * - <sofia-sip/htable.h> - @ref su_htable
  32. * - <sofia-sip/rbtree.h> - balanced red-black trees
  33. * - <sofia-sip/su_strlst.h> - @ref su_strlst list of strings
  34. * - <sofia-sip/su_vector.h> - @ref su_vector dynamic arrays of pointers
  35. *
  36. * There are also some convenience macros for unit test programs:
  37. * - sofia-sip/tstdef.h - macros for unit tests
  38. *
  39. * @author Pekka Pessi <Pekka.Pessi@nokia.com>
  40. * @author Jari Selin <Jari.Selin@nokia.com>
  41. *
  42. * @par SU Debug Log
  43. *
  44. * The debugging output from @b su module is controlled by #su_log_global
  45. * log object. The environment variable #SU_DEBUG sets the default log
  46. * level.
  47. */
  48. /**@maindefgroup su OS Utilities
  49. *
  50. * The "su" module contains OS utilies for Sofia.
  51. *
  52. * The @b su is a simple, portable socket/timing/synchronizing library
  53. * developed for Sofia communications software. Currently, interface to
  54. * it consists of following parts:
  55. *
  56. * - <sofia-sip/su_types.h> - basic integer types
  57. * - <a href=group_su_socket.html>su_socket</a> - socket functions
  58. * - <a href=group_su_wait.html>su_wait</a> - synchronization functions
  59. * - <a href=group_su_time.html>su_time</a> - time functions
  60. * - <a href=group_su_alloc.html>su_alloc</a> - memory management functions
  61. * - <a href=group_su_log.html>su_log</a> - generic logging functions
  62. * - <a href=group_su_tag.html>su_tag</a> - tag list function
  63. * - <a href=group_su_md5.html>su_md5</a> - MD5 hashing
  64. */
  65. /**@defgroup su_programs Shell Programs
  66. *
  67. * The @b su module provides few shell utilities:
  68. * - @ref localinfo (localinfo.c)
  69. * - @ref addrinfo (addrinfo.c)
  70. */
  71. /**@defgroup su_socket Socket Functions
  72. *
  73. * @brief The <sofia-sip/su.h> contains the portable socket functions.
  74. *
  75. * The <sofia-sip/su.h> contains following functions, macros, and types:
  76. * - su_init(): initializes sockets
  77. * - su_deinit(): deinitializes sockets
  78. * - su_socket(): creates a socket
  79. * - su_close(): closes a socket
  80. * - su_ioctl(): ioctl to a socket
  81. * - su_setreuseaddr(): set/reset reusing the addresses/ports for a socket
  82. * - su_setblocking(): enables/disables blocking
  83. * - su_is_blocking(): checks if the previous call failed because it
  84. * would have blocked
  85. * - su_errno(): the latest socket error
  86. * - su_perror(): prints the latest socket error message to stderr
  87. * - su_strerror(): returns the given socket error message
  88. * - su_perror2(): prints the given socket error message to stderr
  89. * - su_soerror(): returns the error code associated with the socket
  90. * - su_getmsgsize(): return the number of bytes that can be recv()ed from
  91. * a socket
  92. * - su_getlocalip(): return an IP address belonging to the local host
  93. * - su_send(), su_sendto(): type-compatible send()
  94. * - su_recv(), su_recvfrom(): type-compatible recv()
  95. * - su_vsend(): scatter-gather send
  96. * - su_vrecv(): scatter-gather receive
  97. * - #su_iovec_t: structure holding scatter-gather IO vector
  98. */
  99. /**@defgroup su_htable Hash tables
  100. *
  101. * Hash tables.
  102. *
  103. * The hash table interface and implementation is defined in
  104. * <sofia-sip/htable.h>. Example code and tests for the implementation is in
  105. * test_htable.c.
  106. */