]> arthur.barton.de Git - ngircd-alex.git/blobdiff - src/ngircd/conn-func.c
Doxygen'ify irc-channel.c
[ngircd-alex.git] / src / ngircd / conn-func.c
index 196325eea1aa82ee6083e04d7a94a5866c22e3ad..8b0b6f7161db82c4fd73f0d71faf8ff25c9879c9 100644 (file)
@@ -7,15 +7,17 @@
  * the Free Software Foundation; either version 2 of the License, or
  * (at your option) any later version.
  * Please read the file COPYING, README and AUTHORS for more information.
- *
- * Connection management: Global functions
  */
 
-
 #define CONN_MODULE
 
 #include "portab.h"
 
+/**
+ * @file
+ * Connection management: Global functions
+ */
+
 #include "imp.h"
 #include <assert.h>
 #include <string.h>
@@ -273,6 +275,16 @@ Conn_RecvBytes( CONN_ID Idx )
        return My_Connections[Idx].bytes_in;
 } /* Conn_RecvBytes */
 
+/**
+ * Return the remote IP address of this connection as string.
+ */
+GLOBAL const char *
+Conn_IPA(CONN_ID Idx)
+{
+       assert (Idx > NONE);
+       return ng_ipaddr_tostr(&My_Connections[Idx].addr);
+}
+
 
 GLOBAL void
 Conn_ResetWCounter( void )