Go to the source code of this file.
Functions | |
| t_authcode | auth_server_request (t_authresponse *authresponse, char *request_type, char *ip, char *mac, char *token, unsigned long long int incoming, unsigned long long int outgoing) |
| Initiates a transaction with the auth server. | |
| int | connect_auth_server () |
| Tries really hard to connect to an auth server. Returns a connected file descriptor or -1 on error. | |
| int | _connect_auth_server (int level) |
| Helper function called by connect_auth_server() to do the actual work including recursion - DO NOT CALL DIRECTLY. | |
Variables | |
| pthread_mutex_t | config_mutex |
Definition in file centralserver.c.
| int _connect_auth_server | ( | int | level | ) |
Helper function called by connect_auth_server() to do the actual work including recursion - DO NOT CALL DIRECTLY.
Definition at line 201 of file centralserver.c.
Referenced by _connect_auth_server(), and connect_auth_server().
| t_authcode auth_server_request | ( | t_authresponse * | authresponse, | |
| char * | request_type, | |||
| char * | ip, | |||
| char * | mac, | |||
| char * | token, | |||
| unsigned long long int | incoming, | |||
| unsigned long long int | outgoing | |||
| ) |
Initiates a transaction with the auth server.
Initiates a transaction with the auth server, either to authenticate or to update the traffic counters at the server
| authresponse | Returns the information given by the central server | |
| request_type | Use the REQUEST_TYPE_* defines in centralserver.h | |
| ip | IP adress of the client this request is related to | |
| mac | MAC adress of the client this request is related to | |
| token | Authentification token of the client | |
| incoming | Current counter of the client's total incoming traffic, in bytes | |
| outgoing | Current counter of the client's total outgoing traffic, in bytes |
TODO: XXX change the PHP so we can harmonize stage as request_type everywhere.
We don't have to use FD_ISSET() because there was only one fd.
Definition at line 65 of file centralserver.c.
Referenced by authenticate_client(), fw_sync_with_authserver(), and http_callback_auth().
| int connect_auth_server | ( | ) |
Tries really hard to connect to an auth server. Returns a connected file descriptor or -1 on error.
Definition at line 179 of file centralserver.c.
Referenced by auth_server_request(), and ping().
| pthread_mutex_t config_mutex |
1.5.3