routesocklib.c

来自「vxworks源码源码解读是学习vxworks的最佳途径」· C语言 代码 · 共 73 行

C
73
字号
/* routeSockLib.c - routing socket interface library *//* Copyright 1984-1997 Wind River Systems, Inc. */#include "copyright_wrs.h"/*modification history--------------------01a,01jul97,vin written*//*DESCRIPTIONThis library contains the interface to the routing sockets. The routingsocket interface is configured in this library. The routine routeSockLibInit() is responsible for configuring the routingsocket interface. INCLUDE FILES: netLib.h.pG "Network"NOMANUAL*//* includes */#include "vxWorks.h"#include "netLib.h"#include "net/protosw.h"#include "net/domain.h"/* externs */IMPORT struct domain  routedomain;/* globals *//* defines *//* typedefs *//* locals */BOOL	rtSockLibInitialized	= FALSE;	/* boolean variable *//******************************************************************************** routeSockLibInit - intialize the routing socket interface** This function intializes the routing socket interface. It initializes* the routing domain and then intializes the protocol switch. This function* should be called only at network initialization time, after domaininit()* and route_init(). There is only one protocol in the protocol switch to* enable routing sockets.** RETURNS: OK/ERROR** NOMANUAL*/STATUS routeSockLibInit (void)    {    if (rtSockLibInitialized == TRUE)        return (OK); 			/* already initialized */    addDomain (&routedomain);		/* add routing domain */        rtSockLibInitialized = TRUE;        return (OK);     }

⌨️ 快捷键说明

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