Get PROC_STAT sub-process structure of a given connection.
#include "log.h"
#include "ng_ipaddr.h"
#include "parse.h"
-#include "proc.h"
#include "resolve.h"
#include "tool.h"
return c ? c->client : NULL;
}
+/**
+ * Get PROC_STAT sub-process structure of a connection.
+ * @param Idx Connection index number
+ * @return PROC_STAT structure
+ */
+GLOBAL PROC_STAT *
+Conn_GetProcStat(CONN_ID Idx)
+{
+ CONNECTION *c;
+
+ assert(Idx >= 0);
+ c = array_get(&My_ConnArray, sizeof (CONNECTION), (size_t)Idx);
+ assert(c != NULL);
+ return &c->proc_stat;
+} /* Conn_GetProcStat */
+
/**
* Get CONN_ID from file descriptor associated to a subprocess structure.
typedef long CONN_ID;
#include "client.h"
+#include "proc.h"
#ifdef CONN_MODULE
#include "defines.h"
-#include "proc.h"
#include "array.h"
#include "tool.h"
#include "ng_ipaddr.h"
GLOBAL CONN_ID Conn_GetFromProc PARAMS((int fd));
GLOBAL CLIENT* Conn_GetClient PARAMS((CONN_ID i));
+GLOBAL PROC_STAT* Conn_GetProcStat PARAMS((CONN_ID i));
#ifdef SSL_SUPPORT
GLOBAL bool Conn_GetCipherInfo PARAMS((CONN_ID Idx, char *buf, size_t len));
GLOBAL bool Conn_UsesSSL PARAMS((CONN_ID Idx));
#include "defines.h"
#include "log.h"
#include "ng_ipaddr.h"
-#include "proc.h"
#include "exp.h"
#include "resolve.h"