added gnutls backend and moved backend code into new files
[ircu2.10.12-pk.git] / include / ircd_reslib.h
index 9dd6e2555b71ba44865641d1db851c222909bb6e..fae4156bf88709bfde44a4c5fa61f94dde89b576 100644 (file)
@@ -1,8 +1,10 @@
 /*
  * include/ircd_reslib.h
  * (C)opyright 1992 Darren Reed.
- *
- * $Id$
+ */
+/** @file
+ * @brief Interface from ircd resolver to its support functions.
+ * @version $Id$
  */
 #ifndef INCLUDED_ircdreslib_h
 #define INCLUDED_ircdreslib_h
 /*
  * Inline versions of get/put short/long.  Pointer is advanced.
  */
+/** Get a 16-bit network endian value from \a cp and assign to \a s. */
 #define IRC_NS_GET16(s, cp) { \
        const unsigned char *t_cp = (const unsigned char *)(cp); \
-       (s) = ((u_int16_t)t_cp[0] << 8) \
-           | ((u_int16_t)t_cp[1]) \
+       (s) = ((uint16_t)t_cp[0] << 8) \
+           | ((uint16_t)t_cp[1]) \
            ; \
        (cp) += NS_INT16SZ; \
 }
 
+/** Get a 32-bit network endian value from \a cp and assign to \a s. */
 #define IRC_NS_GET32(l, cp) { \
        const unsigned char *t_cp = (const unsigned char *)(cp); \
-       (l) = ((u_int32_t)t_cp[0] << 24) \
-           | ((u_int32_t)t_cp[1] << 16) \
-           | ((u_int32_t)t_cp[2] << 8) \
-           | ((u_int32_t)t_cp[3]) \
+       (l) = ((uint32_t)t_cp[0] << 24) \
+           | ((uint32_t)t_cp[1] << 16) \
+           | ((uint32_t)t_cp[2] << 8) \
+           | ((uint32_t)t_cp[3]) \
            ; \
        (cp) += NS_INT32SZ; \
 }
 
+/** Put \a s at \a cp as a 16-bit network endian value. */
 #define IRC_NS_PUT16(s, cp) { \
-       u_int16_t t_s = (u_int16_t)(s); \
+       uint16_t t_s = (uint16_t)(s); \
        unsigned char *t_cp = (unsigned char *)(cp); \
        *t_cp++ = t_s >> 8; \
        *t_cp   = t_s; \
        (cp) += NS_INT16SZ; \
 }
 
+/** Put \a s at \a cp as a 32-bit network endian value. */
 #define IRC_NS_PUT32(l, cp) { \
-       u_int32_t t_l = (u_int32_t)(l); \
+       uint32_t t_l = (uint32_t)(l); \
        unsigned char *t_cp = (unsigned char *)(cp); \
        *t_cp++ = t_l >> 24; \
        *t_cp++ = t_l >> 16; \
@@ -48,6 +54,7 @@
        (cp) += NS_INT32SZ; \
 }
 
+/** Maximum number of nameservers to bother with. */
 #define IRCD_MAXNS 8
 
 int irc_res_init(void);