?? natinit.c
字號:
/* natInit.c - WIND NET NAT initialization */
/* Copyright 2000-2004 Wind River Systems, Inc. */
/* @format.tab-size 4, @format.use-tabs true, @format.new-line lf */
/*
modification history
--------------------
01g,05dec03,myz move timer facility to natEvtTimer.c
01f,29aug03,zhu updated the format for refgen
01e,29apr03,myz incorporate Sady's review suggestions.
01d,25apr03,myz created the event dispatcher to provide the timer facility.
01c,25apr03,svk Implement version number
01b,23apr03,zhu updated copyright
01a,21apr03,myz Replaced RWOS task layer with direct vxWorks's task creation.
030901 tk Create natInitSync semaphore
*/
/*
DESCRIPTION
This library supplies the WIND NET NAT initialization function.
*/
/* ANSI Headers */
#include <stdio.h>
#include <string.h>
#include "nat.h"
/* globals */
char * natVersion = NAT_VERSION; /* NAT version number string */
/***************************************************************************
*
* natInit - initialize WIND NET NAT
*
* Call this function to initialize WIND NET NAT. This call should follow
* a call to natcfg(), a function that initializes the array at the global
* variable, 'nat_configuration_text'. This array supplies the
* configuration parameters for WIND NET NAT. After the call to natInit()
* completes, WIND NET NAT ignores the array at 'nat_configuration_text'.
* Thus, if you change the configuration information in that array, you
* need to disable WIND_NET_NAT entirely (see the natEnable() reference
* entry), and then call natInit() again before the changes take effect.
*
* This function also initializes the WIND NET NAT timer facility.
*
*/
STATUS natInit (void)
{
/* create semaphore for NAT sync with ALGs */
natInitSync = semBCreate (SEM_Q_FIFO, SEM_EMPTY);
if (natInitSync == NULL)
{
nat_printf (NAT_PRINTF_ERROR,"Failed to create natInitSync semaphore\n");
return (ERROR);
}
natTimerInit();
nat_task_initialize(NULL);
return OK;
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -