Documentation updates
[runtime.git] / lib / silcutil / silcnet.h
index 7172338d53d41d1ddf2b0bdc0a2484601d8bcded..d791784e4feb9b25548e717dfd7774caa5e53dd4 100644 (file)
@@ -53,7 +53,7 @@
  * DESCRIPTION
  *
  *    The network listenr context.  This context is created with the
- *    silc_net_create_listener function and destroyed with
+ *    silc_net_tcp_create_listener function and destroyed with
  *    silc_net_close_listener function.
  *
  ***/
@@ -501,6 +501,22 @@ SilcBool silc_net_is_ip(const char *addr);
  ***/
 SilcBool silc_net_addr2bin(const char *addr, void *bin, SilcUInt32 bin_len);
 
+/****f* silcutil/silc_net_bin2addr
+ *
+ * SYNOPSIS
+ *
+ *    SilcBool silc_net_bin2addr(const void *bin, SilcUInt32 bin_len,
+ *                               char *addr, SilcUInt32 addr_size);
+ *
+ * DESCRIPTION
+ *
+ *    Converts network byte ordered IP address into a numbers-and-dots
+ *    string notation.  The `bin' address can be either IPv4 or IPv6 address.
+ *
+ ***/
+SilcBool silc_net_bin2addr(const void *bin, SilcUInt32 bin_len,
+                          char *addr, SilcUInt32 addr_size);
+
 /****f* silcutil/SilcNetResolveCallback
  *
  * SYNOPSIS
@@ -574,7 +590,7 @@ void silc_net_gethostbyname_async(const char *name,
  *   SilcBool silc_net_gethostbyaddr(const char *addr, char *name,
  *                                   SilcUInt32 name_len);
  *
-x * DESCRIPTION
+ * DESCRIPTION
  *
  *    Resolves the hostname for the IP address indicated by the `addr'
  *    This returns TRUE and the resolved hostname to the `name' buffer,
@@ -695,6 +711,58 @@ char *silc_net_localhost(void);
  ***/
 char *silc_net_localip(void);
 
+/****f* silcutil/silc_htonl
+ *
+ * SYNOPSIS
+ *
+ *    SilcUInt32 silc_htonl(SilcUInt32 host);
+ *
+ * DESCRIPTION
+ *
+ *    Converts integer `host' from host byte order to network byte order.
+ *
+ ***/
+SilcUInt32 silc_htonl(SilcUInt32 host);
+
+/****f* silcutil/silc_ntohl
+ *
+ * SYNOPSIS
+ *
+ *    SilcUInt32 silc_ntohl(SilcUInt32 net);
+ *
+ * DESCRIPTION
+ *
+ *    Converts integer `net' from network byte order to host byte order.
+ *
+ ***/
+SilcUInt32 silc_ntohl(SilcUInt32 net);
+
+/****f* silcutil/silc_htons
+ *
+ * SYNOPSIS
+ *
+ *    SilcUInt16 silc_htons(SilcUInt16 host);
+ *
+ * DESCRIPTION
+ *
+ *    Converts integer `host' from host byte order to network byte order.
+ *
+ ***/
+SilcUInt16 silc_htons(SilcUInt16 host);
+
+/****f* silcutil/silc_ntohs
+ *
+ * SYNOPSIS
+ *
+ *    SilcUInt16 silc_ntohs(SilcUInt16 net);
+ *
+ * DESCRIPTION
+ *
+ *    Converts integer `net' from network byte order to host byte order.
+ *
+ ***/
+SilcUInt16 silc_ntohs(SilcUInt16 net);
+
 #include "silcnet_i.h"
 
 #endif /* SILCNET_H */