original files of m241

This commit is contained in:
neelimap
2026-07-30 11:19:44 +05:30
parent 170c2b3f3a
commit afc7070c1f
12254 changed files with 7655111 additions and 0 deletions
@@ -0,0 +1,67 @@
/* 02comp_ipnet_ifproxy.cdf - configuration for the ifproxy
END2 Enhanced Network Driver */
/*
* Copyright (c) 2010 Wind River Systems, Inc.
*
* The right to copy, distribute, modify or otherwise make use
* of this software may be licensed only pursuant to the terms
* of an applicable Wind River license agreement.
*/
/*
modification history
--------------------
01c,22nov10,spw fix VIP build warnings
01b,05oct10,spw network configuration changes.
01a,27may10,spw written.
*/
#ifdef _WRS_CONFIG_COMPONENT_IFPROXY
Component INCLUDE_IFPROXY {
NAME Ifproxy Network Device
SYNOPSIS Ifproxy END device and interprocess communication module.
REQUIRES INCLUDE_MIPC_SM
MODULES ifproxy.o
CONFIGLETTES ifproxy_config.c
INIT_RTN ifproxy_init (IFPROXY_BUS_NAME, IFPROXY_CTRL_PORT, IFPROXY_PORT_CFG_STR);
_INIT_ORDER usrNetAppInit
_CHILDREN FOLDER_DRIVERS
CFG_PARAMS IFPROXY_BUS_NAME \
IFPROXY_CTRL_PORT \
IFPROXY_PORT_CFG_STR
}
Parameter IFPROXY_BUS_NAME {
NAME MIPC bus to use for ifproxy device / protocol
SYNOPSIS Name of the MIPC bus used for OS communication.
TYPE char *
DEFAULT "main"
}
Parameter IFPROXY_CTRL_PORT {
NAME MIPC port to use for ifproxy device / protocol
SYNOPSIS MIPC port on which this node is listening for interface \
registration requests.
TYPE int
DEFAULT 30
}
Parameter IFPROXY_PORT_CFG_STR {
NAME Forwarder ports and cores configuration
SYNOPSIS A string listing the ports that participate in accelerated \
forwarding, and the forwarder cores that will poll them. \
The string should have a value such as \
"proxy1 3; proxy2 3; proxy3 7; proxy4 7; proxy8 5 6" \
to indicate that ports proxy2 and proxy3 are polled by a \
forwarder running on CPU 3, ports proxy4 and proxy5 are \
polled by a forwarder running on CPU 7, and port proxy8 \
is polled by forwarders running on CPUs 5 and 6. CPUs \
outside of the configured range will be ignored. CPU 0 \
cannot run a forwarder ...
TYPE char *
DEFAULT ""
}
#endif
@@ -0,0 +1,4 @@
#hidden option that enables IFPROXY
config SUPPORTS_IFPROXY
bool
default y
@@ -0,0 +1,85 @@
/* usrIfproxy.c - initialization of Ifproxy Network Device */
/*
* Copyright (c) 2010 Wind River Systems, Inc.
*
* The right to copy, distribute, modify or otherwise make use
* of this software may be licensed only pursuant to the terms
* of an applicable Wind River license agreement.
*/
/*
modification history
--------------------
01a,17may10,spw written
*/
#include <vxWorks.h>
/* defines */
/* externals */
IMPORT STATUS ifproxy_drv_init(int ctrlPort, char *busName, char *portCfgStr);
/* locals */
/*******************************************************************************
*
* ifproxy_init - Initialization configlette for the Ifproxy Network Device
*
* This routine parses configuration details about the desired ifproxy driver
* to create.
*
* busName is the desired MIPC bus to use for inter-OS communication between
* the management plane and the NAEs.
*
* ctrlPort is the MIPC port to listen on for ifproxy NAE registration
* requests.
*
* portCfgStr specifies the forwarder ports and cores configuration
* It is a string listing the ports that participate in accelerated
* forwarding, and the forwarder cores that will poll them. The string
* should have the following format:
*
* <ws>* [<ifpollspec> (';' <ws>* <ifpollspec>)* [';'] <ws>*]
*
* Where:
* ifpollspec := <ifname> (<ws>+ <cpuid>)* <ws>*
* ifname := <alpha>+ <decimal>+
* cpuid := <decimal>+
* ws := any whitespace character (isspace())
* alpha := any alphabetic character (A-Za-z : isalpha())
* decimal := any decimal numeral (0-9 : isdigit())
*
* Example:
*
* "proxy1 3; proxy2 3; proxy3 7; proxy4 7; proxy8 5 6"
*
Indicates that ports proxy2 and proxy3 are polled by a forwarder running
* on CPU 3, ports proxy4 and proxy5 are polled by a forwarder running on
* CPU 7, and port proxy8 is polled by forwarders running on CPUs 5 and 6.
* CPUs outside of the configured range will be ignored. CPU 0 cannot run a
* forwarder ...
*
* This is executed only once at BOOT time
*
* RETURNS: N/A
*
* NOMANUAL
*/
STATUS ifproxy_init
(
char * busName, /* MIPC bus to use for inter-OS communication */
int ctrlPort, /* MIPC port for ifproxy registration requests */
char * portCfgStr /* Port configuration string */
)
{
if (busName == NULL || portCfgStr == NULL)
return ERROR;
return ifproxy_drv_init(ctrlPort, busName, portCfgStr);
}