00001 /* 00002 ** Copyright(C) 2006 INL 00003 ** written by Eric Leblond <regit@inl.fr> 00004 ** 00005 ** $Id: mark_uid.c 4847 2008-06-13 14:48:31Z regit $ 00006 ** 00007 ** This program is free software; you can redistribute it and/or modify 00008 ** it under the terms of the GNU General Public License as published by 00009 ** the Free Software Foundation; version 3 of the License. 00010 ** 00011 ** This program is distributed in the hope that it will be useful, 00012 ** but WITHOUT ANY WARRANTY; without even the implied warranty of 00013 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00014 ** GNU General Public License for more details. 00015 ** 00016 ** You should have received a copy of the GNU General Public License 00017 ** along with this program; if not, write to the Free Software 00018 ** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 00019 */ 00020 00021 00022 #include <auth_srv.h> 00023 00031 /* 00032 * Returns version of nuauth API 00033 */ 00034 G_MODULE_EXPORT uint32_t get_api_version() 00035 { 00036 return NUAUTH_API_VERSION; 00037 } 00038 00039 G_MODULE_EXPORT gboolean unload_module_with_params(gpointer params_p) 00040 { 00041 return TRUE; 00042 } 00043 00044 G_MODULE_EXPORT gboolean init_module_from_conf(module_t * module) 00045 { 00046 log_message(VERBOSE_DEBUG, DEBUG_AREA_MAIN, 00047 "Mark_uid module ($Revision: 4847 $)"); 00048 return TRUE; 00049 } 00050 00051 G_MODULE_EXPORT nu_error_t finalize_packet(connection_t * connection, 00052 gpointer params) 00053 { 00054 connection->mark = 00055 (connection->user_id & 0xFFFF) | (connection-> 00056 mark & 0xffff0000); 00057 return NU_EXIT_OK; 00058 } 00059
1.4.7