Here’s the life of a packet inside nuauth :

Modules can provide three functions :
user_check : a function getting the password of a user and the groups he belongs to.
acl_check : a function getting the corresponding access control list for a packet.
user_packet_logs : a function logging user activities.
user_check
The declaration of user_check is the following :
GSList * user_check (u_int16_t userid,char *passwd);
It takes an integer and a pointer to the zone allocated to contain the password of the user as parameters and returns the list of a pointer to a GSList of integer, each integer being the number of a group the user belongs to.
The pointer passwd must contain the password of the user.
acl_check
The declaration of acl_check is the following :
GSList * acl_check (connection* element);
It takes a connection as parameters and returns a GSList of struct acl_group [1].
user_packet_logs
The declaration of user_packet_logs is the following :
gint user_packet_logs (connection element, int state);
It takes a connection and a state as parameters and return an int indicating status of the logging operation. state can take the following values :
STATE_OPEN : log a connection opening (SYN_SENT for TCP).
STATE_ESTABLISHED : log a connection establishment.
STATE_CLOSE : log ending of a connection.
STATE_DROP : log a connection rejected by the nufw system.
[1] This structure contains a list of group (integer) and the corresponding decision