mirror of
https://github.com/osmarks/ngircd.git
synced 2024-12-13 10:20:28 +00:00
New function Conn_IPA(): get client IP address as string
This commit is contained in:
parent
139d6303e7
commit
60eac5e952
@ -273,6 +273,16 @@ Conn_RecvBytes( CONN_ID Idx )
|
|||||||
return My_Connections[Idx].bytes_in;
|
return My_Connections[Idx].bytes_in;
|
||||||
} /* Conn_RecvBytes */
|
} /* 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
|
GLOBAL void
|
||||||
Conn_ResetWCounter( void )
|
Conn_ResetWCounter( void )
|
||||||
|
@ -39,6 +39,7 @@ GLOBAL long Conn_SendMsg PARAMS(( CONN_ID Idx ));
|
|||||||
GLOBAL long Conn_RecvMsg PARAMS(( CONN_ID Idx ));
|
GLOBAL long Conn_RecvMsg PARAMS(( CONN_ID Idx ));
|
||||||
GLOBAL long Conn_SendBytes PARAMS(( CONN_ID Idx ));
|
GLOBAL long Conn_SendBytes PARAMS(( CONN_ID Idx ));
|
||||||
GLOBAL long Conn_RecvBytes PARAMS(( CONN_ID Idx ));
|
GLOBAL long Conn_RecvBytes PARAMS(( CONN_ID Idx ));
|
||||||
|
GLOBAL const char *Conn_IPA PARAMS(( CONN_ID Idx ));
|
||||||
|
|
||||||
GLOBAL void Conn_SetPenalty PARAMS(( CONN_ID Idx, time_t Seconds ));
|
GLOBAL void Conn_SetPenalty PARAMS(( CONN_ID Idx, time_t Seconds ));
|
||||||
GLOBAL void Conn_ResetPenalty PARAMS(( CONN_ID Idx ));
|
GLOBAL void Conn_ResetPenalty PARAMS(( CONN_ID Idx ));
|
||||||
|
Loading…
Reference in New Issue
Block a user