00001 /********************************************************************\ 00002 * This program is free software; you can redistribute it and/or * 00003 * modify it under the terms of the GNU General Public License as * 00004 * published by the Free Software Foundation; either version 2 of * 00005 * the License, or (at your option) any later version. * 00006 * * 00007 * This program is distributed in the hope that it will be useful, * 00008 * but WITHOUT ANY WARRANTY; without even the implied warranty of * 00009 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * 00010 * GNU General Public License for more details. * 00011 * * 00012 * You should have received a copy of the GNU General Public License* 00013 * along with this program; if not, contact: * 00014 * * 00015 * Free Software Foundation Voice: +1-617-542-5942 * 00016 * 59 Temple Place - Suite 330 Fax: +1-617-542-2652 * 00017 * Boston, MA 02111-1307, USA gnu@gnu.org * 00018 * * 00019 \********************************************************************/ 00020 00021 /* $Id: centralserver.h 1305 2007-11-01 20:04:20Z benoitg $ */ 00027 #ifndef _CENTRALSERVER_H_ 00028 #define _CENTRALSERVER_H_ 00029 00030 #include "auth.h" 00031 00033 #define REQUEST_TYPE_LOGIN "login" 00034 00035 #define REQUEST_TYPE_LOGOUT "logout" 00036 00037 #define REQUEST_TYPE_COUNTERS "counters" 00038 00040 #define GATEWAY_MESSAGE_DENIED "denied" 00041 00042 #define GATEWAY_MESSAGE_ACTIVATE_ACCOUNT "activate" 00043 00044 #define GATEWAY_MESSAGE_ACCOUNT_VALIDATION_FAILED "failed_validation" 00045 00046 #define GATEWAY_MESSAGE_ACCOUNT_LOGGED_OUT "logged-out" 00047 00049 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); 00050 00052 int connect_auth_server(); 00053 00055 int _connect_auth_server(int level); 00056 00057 #endif /* _CENTRALSERVER_H_ */