⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 radiuslib.c

📁 vxworks下radius协议栈 的源代码
💻 C
字号:
/* radiusLibInit.c *//* Implementations of RADIUS package entry point fucntion.		 			*//* Copyright 1984 - 2000 Wind River Systems, Inc. */#include "copyright_wrs.h"/*modification history____________________01d,26aug03,snd Changes done to remove compilation warnings01c,21dec00,md  replaced printf() with radius_printf()01b,19dec00,md  fixed synchronized initialization01a,19dec00,md  merged from visual source safe*/#include <stdio.h> #include <string.h>#include "radius.h"#ifdef __SYNCHRONIZED_INITIALIZATION__#include <semLib.h>#endifFP_RWOS_MODULE_STARTUP  rwos_radius_system_module_table [ ] = {	(FP_RWOS_MODULE_STARTUP) radius_task_initialize,	(FP_RWOS_MODULE_STARTUP)NULL	/* terminator, must be last */};	static char configuration_data [RWOS_MAXIMUM_FILE_SIZE];#ifdef __SYNCHRONIZED_INITIALIZATION__SEM_ID g_sem_radius_sync_init = NULL;bool initialize_status = false;#endifSTATUS radiusLibInit (void){#ifdef __SYNCHRONIZED_INITIALIZATION__	g_sem_radius_sync_init = semBCreate (SEM_Q_FIFO, SEM_EMPTY);	if (g_sem_radius_sync_init == NULL)	{		radius_printf (RADIUS_ALARM_PRINTF, "RADIUS Initialization: Failed to initialize synchronization.\n");		return (ERROR);	}#endif	if (rwos_task_main (rwos_radius_system_module_table, configuration_data, "Radius", RWOS_TASK_BASE_PRIORITY+10) == ERROR)		{		radius_printf (RADIUS_ALARM_PRINTF, "RADIUS Initialization: Failed to initialize RADIUS task.\n");		return (ERROR);		}#ifdef __SYNCHRONIZED_INITIALIZATION__	if (semTake (g_sem_radius_sync_init, WAIT_FOREVER) == ERROR)	{		return (ERROR);	}	if (initialize_status == true)	{		return (OK);	}	else	{		return (ERROR);	}#else /*	if (rwos_main (rwos_radius_system_module_table, configuration_data) == ERROR)		{		return (ERROR);		}*/	return (OK);#endif}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -