Changeset 255:cb4307a1cd29 in freeDiameter
- Timestamp:
- Apr 15, 2010, 11:56:32 AM (14 years ago)
- Branch:
- default
- Phase:
- public
- Location:
- extensions/app_radgw
- Files:
-
- 2 added
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/app_radgw/CMakeLists.txt
r254 r255 17 17 radius.c 18 18 md5.c 19 rgw_msg_codes.c 20 rgw_msg_attrtype.c 19 21 ) 20 22 SET( RG_COMMON_HEADER … … 54 56 55 57 58 ########### RADIUS/Diameter translation agent plugins (support for RADIUS protocol) ############ 59 # Use the macro RGWX_ADD_PLUGIN(name files...) to create a plugin. 60 # It is equivalent to add_library with the appropriate parameters 61 # and naming conventions (.rgwx : Radius GateWay eXtension) 62 MACRO(RGWX_ADD_PLUGIN PLGNAME) 63 ADD_LIBRARY(${PLGNAME} MODULE ${ARGN}) 64 SET_TARGET_PROPERTIES(${PLGNAME} PROPERTIES PREFIX "" ) 65 SET_TARGET_PROPERTIES(${PLGNAME} PROPERTIES SUFFIX ".rgwx" ) 66 TARGET_LINK_LIBRARIES(${PLGNAME} rgw_common) 67 ENDMACRO(RGWX_ADD_PLUGIN) 68 69 # Example of plugin: 70 OPTION(BUILD_RGWX_SAMPLE "Build sample plugin? (for developers only)" OFF) 71 IF (BUILD_RGWX_SAMPLE) 72 RGWX_ADD_PLUGIN(sample ${RG_COMMON_HEADER} rgwx_sample.c) 73 ENDIF (BUILD_RGWX_SAMPLE) 74 75 # A plugin for debug: dumps RADIUS and Diameter messages state at the time the plugin is called. 76 OPTION(BUILD_RGWX_DEBUG "Build debug plugin? (display status of RADIUS and Diameter messages)" ON) 77 IF (BUILD_RGWX_DEBUG) 78 RGWX_ADD_PLUGIN(debug ${RG_COMMON_HEADER} rgwx_debug.c) 79 ENDIF (BUILD_RGWX_DEBUG) 56 80 57 81 … … 63 87 64 88 65 ########### Sub extensions ############# 66 # Example of support extension: 67 # OPTION(BUILD_RADIUS_GW_SAMPLE "Build sample sub-extension? (for debug only)" OFF) 68 # IF (BUILD_RADIUS_GW_SAMPLE) 69 # ADD_LIBRARY(sub_sample MODULE ${RG_COMMON_HEADER} sub_sample.c) 70 # TARGET_LINK_LIBRARIES(sub_sample rg_common) 71 # ENDIF (BUILD_RADIUS_GW_SAMPLE) 72 73 # OPTION(BUILD_SUB_DEBUG "Build debug sub-extension? (display status of RADIUS and Diameter messages)" ON) 74 # IF (BUILD_SUB_DEBUG) 75 # ADD_LIBRARY(sub_debug MODULE ${RG_COMMON_HEADER} sub_debug.c) 76 # TARGET_LINK_LIBRARIES(sub_debug rg_common) 77 # ENDIF (BUILD_SUB_DEBUG) 89 78 90 # 79 91 # OPTION(BUILD_SUB_ECHO_DROP "Build 'echo/drop' sub-extension? (echo or drop specific RADIUS attributes, no Diameter translation)" ON) -
extensions/app_radgw/rgw_common.h
r254 r255 219 219 }; 220 220 221 const char * rgw_msg_attrtype_str(unsigned char c); 222 const char * rgw_msg_code_str(unsigned char c); 223 221 224 #endif /* _RGW_COMMON_H */ 222 225 -
extensions/app_radgw/rgw_msg.c
r254 r255 41 41 #include "rgw.h" 42 42 43 /* Directly include the code of the functions for dumping (generated from the IANA registries) */44 #include "rgw_msg_codes.c"45 #include "rgw_msg_attrtype.c"46 47 43 /* Destroy a message */ 48 44 void rgw_msg_free(struct rgw_radius_msg_meta ** msg) -
extensions/app_radgw/rgw_msg_attrtype.c
r254 r255 1 /********************************************************************************************************* 2 * Software License Agreement (BSD License) * 3 * Author: Sebastien Decugis <sdecugis@nict.go.jp> * 4 * * 5 * Copyright (c) 2009, WIDE Project and NICT * 6 * All rights reserved. * 7 * * 8 * Redistribution and use of this software in source and binary forms, with or without modification, are * 9 * permitted provided that the following conditions are met: * 10 * * 11 * * Redistributions of source code must retain the above * 12 * copyright notice, this list of conditions and the * 13 * following disclaimer. * 14 * * 15 * * Redistributions in binary form must reproduce the above * 16 * copyright notice, this list of conditions and the * 17 * following disclaimer in the documentation and/or other * 18 * materials provided with the distribution. * 19 * * 20 * * Neither the name of the WIDE Project or NICT nor the * 21 * names of its contributors may be used to endorse or * 22 * promote products derived from this software without * 23 * specific prior written permission of WIDE Project and * 24 * NICT. * 25 * * 26 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED * 27 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A * 28 * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR * 29 * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT * 30 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * 31 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR * 32 * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF * 33 * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * 34 *********************************************************************************************************/ 35 #include "rgw_common.h" 36 37 /* The content of this file was semi-automatically generated from the IANA registry. */ 38 1 39 /* Name of RADIUS attribute from its code */ 2 40 const char * rgw_msg_attrtype_str(unsigned char c) { -
extensions/app_radgw/rgw_msg_codes.c
r254 r255 1 /********************************************************************************************************* 2 * Software License Agreement (BSD License) * 3 * Author: Sebastien Decugis <sdecugis@nict.go.jp> * 4 * * 5 * Copyright (c) 2009, WIDE Project and NICT * 6 * All rights reserved. * 7 * * 8 * Redistribution and use of this software in source and binary forms, with or without modification, are * 9 * permitted provided that the following conditions are met: * 10 * * 11 * * Redistributions of source code must retain the above * 12 * copyright notice, this list of conditions and the * 13 * following disclaimer. * 14 * * 15 * * Redistributions in binary form must reproduce the above * 16 * copyright notice, this list of conditions and the * 17 * following disclaimer in the documentation and/or other * 18 * materials provided with the distribution. * 19 * * 20 * * Neither the name of the WIDE Project or NICT nor the * 21 * names of its contributors may be used to endorse or * 22 * promote products derived from this software without * 23 * specific prior written permission of WIDE Project and * 24 * NICT. * 25 * * 26 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED * 27 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A * 28 * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR * 29 * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT * 30 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * 31 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR * 32 * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF * 33 * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * 34 *********************************************************************************************************/ 35 #include "rgw_common.h" 36 37 /* The content of this file was semi-automatically generated from the IANA registry. */ 38 1 39 /* Name of RADIUS command from its command code */ 2 40 const char * rgw_msg_code_str(unsigned char c) { -
extensions/app_radgw/rgw_plugins.c
r254 r255 220 220 goto error; 221 221 } 222 TRACE_DEBUG(INFO, "RADIUS/Diameter gateway plugin '%s%s%s%s' initialized.", new->plgname, conffile ? " (" : "", conffile ? new->conffile : "", conffile ? ")" : ""); 222 223 } 223 224 … … 493 494 fd_list_unlink(&plg->chain); 494 495 free(plg->conffile); 496 free(plg->cc); 497 if (plg->cs && plg->descriptor && plg->descriptor->rgwp_conf_free ) { 498 TRACE_DEBUG(INFO, "RADIUS/Diameter gateway plugin '%s' cleaning up...", plg->plgname); 499 (*plg->descriptor->rgwp_conf_free)(plg->cs); 500 } 495 501 free(plg->plgname); 496 free(plg->cc);497 if (plg->cs && plg->descriptor && plg->descriptor->rgwp_conf_free )498 (*plg->descriptor->rgwp_conf_free)(plg->cs);499 502 dlclose(plg->dlo); 500 503 free(plg);
Note: See TracChangeset
for help on using the changeset viewer.