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,45 @@
/* 00folder_ipnet_rohc.cdf - ROHC configuration file */
/*
* Copyright (c) 2008 Wind River Systems, Inc.
*
* The right to copy, distribute or otherwise make use of this software
* may be licensed only pursuant to the terms of an applicable Wind River
* license agreement. No license to Wind River intellectual property rights
* is granted herein. All rights not licensed by Wind River are reserved
* by Wind River.
*/
/*
modification history
--------------------
01e,22feb10,ggz Add TCP/IP profile components
01d,18dec09,ggz Add ESP/IP, UDP/IP profile components
01c,12aug08,tlu Move ROHC to network protocol folder
01b,27feb08,tlu Add profile folder
01a,21feb08,tlu Created.
*/
#ifdef _WRS_CONFIG_COMPONENT_IPROHC
Folder FOLDER_ROHC {
NAME ROHC Components
SYNOPSIS Robust Header Compression Components
CHILDREN INCLUDE_IPROHC \
FOLDER_ROHC_PROFILES \
INCLUDE_IPROHC_CMD
_CHILDREN FOLDER_NET_L3_NETWORK
}
Folder FOLDER_ROHC_PROFILES {
NAME ROHC Profile Components
SYNOPSIS Folder for Robust Header Compression Profile Components
CHILDREN INCLUDE_IPROHC_PROFILE_UNCOMPRESSED \
INCLUDE_IPROHC_PROFILE_IP \
INCLUDE_IPROHC_PROFILE_ESP_IP \
INCLUDE_IPROHC_PROFILE_UDP_IP \
INCLUDE_IPROHC_PROFILE_TCP_IP
_CHILDREN FOLDER_ROHC
}
#endif
@@ -0,0 +1,161 @@
/* 02comp_ipnet_rohc.cdf - ROHC configuration file */
/*
* Copyright (c) 2008 Wind River Systems, Inc.
*
* The right to copy, distribute or otherwise make use of this software
* may be licensed only pursuant to the terms of an applicable Wind River
* license agreement. No license to Wind River intellectual property rights
* is granted herein. All rights not licensed by Wind River are reserved
* by Wind River.
*/
/*
modification history
--------------------
01e,22feb10,ggz Add TCP/IP profile components
01d,18dec09,ggz Add ESP/IP, UDP/IP profile components
01c,16apr08,tlu Add F_MAX_PERIOD and F_MAX_TIME configuration parameters
01b,27feb08,tlu Add profile components
01a,21feb08,tlu Created.
*/
#ifdef _WRS_CONFIG_COMPONENT_IPROHC
Component INCLUDE_IPROHC {
NAME ROHC
SYNOPSIS Robust Header Compression
MODULES iprohc.o
CONFIGLETTES iprohc_config.c
CFG_PARAMS ROHC_INTERFACES \
ROHC_INTERFACE_PROFILES \
ROHC_MAX_CID \
ROHC_LARGE_CID \
ROHC_FEEDBACK_FOR_DEFINED \
ROHC_FEEDBACK_FOR \
ROHC_F_MAX_PERIOD \
ROHC_F_MAX_TIME
}
Component INCLUDE_IPROHC_CMD {
NAME ROHC commands
SYNOPSIS IPCOM shell commands for robust header compression
MODULES iprohc_cmd_rohc.o
REQUIRES INCLUDE_IPCOM_SHELL_CMD INCLUDE_IPROHC
}
Component INCLUDE_IPROHC_PROFILE_IP {
NAME ROHC IP Compression Profile
SYNOPSIS ROHC IP Compression Profile component
MODULES iprohc_ip.o
REQUIRES INCLUDE_IPROHC
}
Component INCLUDE_IPROHC_PROFILE_UNCOMPRESSED {
NAME ROHC Uncompressed Profile
SYNOPSIS ROHC Uncompressed Profile component
MODULES iprohc_uncompressed.o
REQUIRES INCLUDE_IPROHC
}
Component INCLUDE_IPROHC_PROFILE_ESP_IP {
NAME ROHC ESP/IP Profile
SYNOPSIS ROHC ESP/IP Profile component
MODULES iprohc_esp_ip.o
REQUIRES INCLUDE_IPROHC
}
Component INCLUDE_IPROHC_PROFILE_UDP_IP {
NAME ROHC UDP/IP Profile
SYNOPSIS ROHC UDP/IP Profile component
MODULES iprohc_udp_ip.o
REQUIRES INCLUDE_IPROHC
}
Component INCLUDE_IPROHC_PROFILE_TCP_IP {
NAME ROHC TCP/IP Profile
SYNOPSIS ROHC TCP/IP Profile component
MODULES iprohc_tcp_ip.o
REQUIRES INCLUDE_IPROHC
}
/******************** Configuration Parameters *****************************/
Parameter ROHC_INTERFACES {
NAME Interface List
SYNOPSIS List of interfaces on which the ROHC compresses and \
decompresses the packets. e.g., "fei,1,fei,2"
TYPE char *
DEFAULT ""
}
Parameter ROHC_INTERFACE_PROFILES {
NAME Interface Profile List
SYNOPSIS List of supported interface-profiles on which ROHC compresses \
and decompresses the packets. The format is a \
semicolon-separated list of interface-profile list, e.g., \
"fei1,0;fei2,4", where means the interface fei1 supports \
the profile 0 (uncompressed profile), and the interface fei2 \
supports the profile 4 (IP profile).
TYPE char *
DEFAULT ""
}
Parameter ROHC_MAX_CID {
NAME Maximum Context Identifier
SYNOPSIS A nonnegative integer, the highest context identifier \
number to be used by the compressor. Refer to RFC 3095, \
section 5.1.1.
TYPE char *
DEFAULT "15"
}
Parameter ROHC_LARGE_CID {
NAME Used Context Identifier Representation
SYNOPSIS Specifies what CID representation is used. If set to "0", \
the short CID representation (0 byte or 1 prefix byte, \
covering CID 0 to 15) is used; if set to "1", the embedded \
CID representation (1 or 2 embedded CID bytes, covering \
CID 0 to 16383) is used. Refer to RFC 3095, section 5.1.1.
TYPE char *
DEFAULT "0"
}
Parameter ROHC_FEEDBACK_FOR_DEFINED {
NAME FEEDBACK_FOR Parameter Defined
SYNOPSIS Control whetherFEEDBACK_FOR parameter is defined. If set \
to "1", the FEEDBACK_FOR parameter is defined. If set \
to "0", the FEEDBACK_FOR parameter is not defined.
TYPE char *
DEFAULT "0"
}
Parameter ROHC_FEEDBACK_FOR {
NAME Feedback Channel
SYNOPSIS Specifies which channel any feedback refers to. \
Refer to RFC 3095, section 5.1.1.
TYPE char *
DEFAULT "5"
}
Parameter ROHC_F_MAX_PERIOD {
NAME Maximum number of consecutive compressed headers
SYNOPSIS Specifies the largest number of compressed headers that \
may be sent without sending a full header. The valid range \
is [1, 65535]. The default value is 256. \
Refer to RFC 2507, section 14.
TYPE char *
DEFAULT "256"
}
Parameter ROHC_F_MAX_TIME {
NAME Maximum time period of consecutive compressed headers
SYNOPSIS Specifies the maximum time period in seconds that compressed \
headers may be sent without sending a full header. The valid \
range is [1, 255]. The default value is 60. \
Refer to RFC 2507, section 14.
TYPE char *
DEFAULT "60"
}
#endif
@@ -0,0 +1,12 @@
# Document no: @(#) $Name: VXWORKS_ITER40_2019102207 $ $RCSfile: common.vxconfig,v $ $Revision: 1.5 $
# $Source: /home/interpeak/CVSRoot/iprohc/config/common.vxconfig,v $
# $Author: myakan $
# $State: Exp $ $Locker: $
#
# INTERPEAK_COPYRIGHT_STRING
#hidden option that enables IPROHC
config SUPPORTS_ROHC
bool
default y
@@ -0,0 +1,254 @@
/* iprohc_config.c - ROHC Component configellete file */
/*
* Copyright (c) 2008 Wind River Systems, Inc.
*
* The right to copy, distribute or otherwise make use of this software
* may be licensed only pursuant to the terms of an applicable Wind River
* license agreement. No license to Wind River intellectual property rights
* is granted herein. All rights not licensed by Wind River are reserved
* by Wind River.
*/
/*
modification history
--------------------
01d,22feb10,ggz Add TCP/IP profile components
01c,18dec09,ggz Add ESP/UDP profiles
01b,20feb09,tlu Ported to LKM
01a,20feb08,tlu created.
*/
/*
****************************************************************************
* 1 DESCRIPTION
****************************************************************************
*/
/*
****************************************************************************
* 2 CONFIGURATION
****************************************************************************
*/
#if 0
#include "iprohc_config.h"
#endif
/*
****************************************************************************
* 3 INCLUDE FILES
****************************************************************************
*/
#include "ipcom_cstyle.h"
#include "ipcom_err.h"
#include "ipcom_sysvar.h"
#include "ipcom_shell.h"
/*
****************************************************************************
* 4 DEFINES
****************************************************************************
*/
#ifndef ROHC_INTERFACES
#define ROHC_INTERFACES ""
#endif
#ifndef ROHC_INTERFACE_PROFILES
#define ROHC_INTERFACE_PROFILES ""
#endif
#ifndef ROHC_MAX_CID
#define ROHC_MAX_CID "15"
#endif
#ifndef ROHC_LARGE_CID
#define ROHC_LARGE_CID "0"
#endif
#ifndef ROHC_FEEDBACK_FOR_DEFINED
#define ROHC_FEEDBACK_FOR_DEFINED "0"
#endif
#ifndef ROHC_FEEDBACK_FOR
#define ROHC_FEEDBACK_FOR "5"
#endif
#ifndef ROHC_F_MAX_PERIOD
#define ROHC_F_MAX_PERIOD "256"
#endif
#ifndef ROHC_F_MAX_TIME
#define ROHC_F_MAX_TIME "60"
#endif
#if !defined(WRS_IPNET) && !defined(PRJ_BUILD)
#define INCLUDE_IPROHC_CMD
#define INCLUDE_IPROHC_PROFILE_IP
#define INCLUDE_IPROHC_PROFILE_UNCOMPRESSED
#define INCLUDE_IPROHC_PROFILE_ESP_IP
#define INCLUDE_IPROHC_PROFILE_UDP_IP
#define INCLUDE_IPROHC_PROFILE_TCP_IP
#endif
/*
****************************************************************************
* 5 TYPES
****************************************************************************
*/
/*
****************************************************************************
* 6 EXTERN PROTOTYPES
****************************************************************************
*/
#ifdef INCLUDE_IPROHC_CMD
IP_PUBLIC int iprohc_cmd_rohc(int argc, char **argv);
#endif /* INCLUDE_IPROHC_CMD */
#ifdef INCLUDE_IPROHC_PROFILE_IP
IP_PUBLIC Ip_err iprohc_profile_ip_register(void);
#endif /* INCLUDE_IPROHC_PROFILE_IP */
#ifdef INCLUDE_IPROHC_PROFILE_UNCOMPRESSED
IP_PUBLIC Ip_err iprohc_profile_uncompressed_register(void);
#endif /* INCLUDE_IPROHC_PROFILE_UNCOMPRESSED */
#ifdef INCLUDE_IPROHC_PROFILE_ESP_IP
IP_PUBLIC Ip_err iprohc_profile_esp_ip_register(void);
#endif /* INCLUDE_IPROHC_PROFILE_ESP_IP */
#ifdef INCLUDE_IPROHC_PROFILE_UDP_IP
IP_PUBLIC Ip_err iprohc_profile_udp_ip_register(void);
#endif /* INCLUDE_IPROHC_PROFILE_UDP_IP */
#ifdef INCLUDE_IPROHC_PROFILE_TCP_IP
IP_PUBLIC Ip_err iprohc_profile_tcp_ip_register(void);
#endif /* INCLUDE_IPROHC_PROFILE_TCP_IP */
/*
****************************************************************************
* 7 LOCAL PROTOTYPES
****************************************************************************
*/
IP_PUBLIC Ip_err iprohc_configure(void);
/*
****************************************************************************
* 8 DATA
****************************************************************************
*/
/*
*===========================================================================
* SYSVAR CONFIGURATION
*===========================================================================
* Refer to CDF file for detailed explanation.
*/
IP_STATIC IP_CONST Ipcom_sysvar iprohc_conf_sysvar[] =
{
/* ROHC compression/decompression interface list. e.g. "fei,1" */
{ "iprohc.interface_list", ROHC_INTERFACES },
/* ROHC compression/decompression interface-profile list. */
/* e.g. "fei1,0;fei2,4" */
{ "iprohc.interface_profile_list", ROHC_INTERFACE_PROFILES },
/* A nonnegative integer, highest context ID number, default 15 */
{ "iprohc.max_cid", ROHC_MAX_CID },
/* Used CID representation, e.g. "0" */
{ "iprohc.large_cid", ROHC_LARGE_CID },
/* Define whether feedback for parameter is defined, default 0 */
{ "iprohc.feedback_for_defined", ROHC_FEEDBACK_FOR_DEFINED },
/* The channel feedback for, refer to RFC 3095, section 5.1.1, e.g. 5 */
{ "iprohc.feedback_for", ROHC_FEEDBACK_FOR },
/* Maximum number of consecutive compressed headers, */
/* refer to RFC 2507, section 14 */
{ "iprohc.f_max_period", ROHC_F_MAX_PERIOD },
/* Maximum time period in seconds of consecutive compressed headers, */
/* refer to RFC 2507, section 14 */
{ "iprohc.f_max_time", ROHC_F_MAX_TIME },
{ IP_NULL, IP_NULL }
};
/*
****************************************************************************
* PUBLIC FUNCTIONS
****************************************************************************
*/
/*
*===========================================================================
* iprohc_configure
*===========================================================================
* Description: ROHC configuration function
* Parameters: none
* Returns: IPCOM_SUCCESS
*
*/
IP_PUBLIC Ip_err
iprohc_configure(void)
{
/* Initialize IPROHC system variables. */
(void)ipcom_sysvar_setv(iprohc_conf_sysvar, 0);
#ifdef INCLUDE_IPROHC_CMD
/* Add the ROHC command */
(void)ipcom_shell_add_cmd("rohc", "rohc [command] <modifier...>",
"ROHC", iprohc_cmd_rohc,
IPCOM_SHELL_PRIO_SAME, IPCOM_PROC_STACK_DEFAULT);
#endif /* INCLUDE_IPROHC_CMD */
#ifdef INCLUDE_IPROHC_PROFILE_IP
/* Register IP compression profile */
iprohc_profile_ip_register();
#endif /* INCLUDE_IPROHC_IP */
#ifdef INCLUDE_IPROHC_PROFILE_UNCOMPRESSED
/* Add uncompressed profile, id = 0 */
iprohc_profile_uncompressed_register();
#endif /* INCLUDE_IPROHC_UNCOMPRESSED */
#ifdef INCLUDE_IPROHC_PROFILE_ESP_IP
/* Register ESP_IP compression profile */
iprohc_profile_esp_ip_register();
#endif /* INCLUDE_IPROHC_ESP_IP */
#ifdef INCLUDE_IPROHC_PROFILE_UDP_IP
/* Register UDP_IP compression profile */
iprohc_profile_udp_ip_register();
#endif /* INCLUDE_IPROHC_UDP_IP */
#ifdef INCLUDE_IPROHC_PROFILE_TCP_IP
/* Register TCP_IP compression profile */
iprohc_profile_tcp_ip_register();
#endif /* INCLUDE_IPROHC_TCP_IP */
return IPCOM_SUCCESS;
}
/*
****************************************************************************
* END OF FILE
****************************************************************************
*/
@@ -0,0 +1,95 @@
/*
* Copyright 2008 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,11aug08,tlu Add ROHC address type definition
01b,26may08,tlu Add compile flag for WLSB/LSB encoding/decoding
01a,20feb08,tlu Initial creation
*/
#ifndef IPROHC_CONFIG_H
#define IPROHC_CONFIG_H
/*
****************************************************************************
* 1 DESCRIPTION
****************************************************************************
*/
/*
****************************************************************************
* 2 INCLUDE FILES
****************************************************************************
*/
#define IPCOM_USE_CLIB_PROTO
#include <ipcom_type.h>
#include <ipcom_cstyle.h>
#include <ipcom_inet.h>
#ifdef __cplusplus
extern "C" {
#endif
/*
****************************************************************************
* 3 DEFINES
****************************************************************************
*/
/* Syslog priority */
#ifdef IP_DEBUG
#define IPROHC_SYSTEM_PRIORITY IPCOM_LOG_DEBUG
#else
#define IPROHC_SYSTEM_PRIORITY IPCOM_LOG_WARNING
#endif
/* compile flag for WLSB/LSB encoding/decoding */
#undef IPROHC_WLSB_LSB
/*
****************************************************************************
* 4 TYPES
****************************************************************************
*/
typedef union Iprohc_addr_union
{
#ifdef IPCOM_USE_INET
Ipa_union addr4;
#endif
#ifdef IPCOM_USE_INET6
struct Ip_in6_addr addr6;
#endif
}
Iprohc_addr;
/*
****************************************************************************
* 5 PROTOTYPES
****************************************************************************
*/
#ifdef __cplusplus
}
#endif
#endif
/*
****************************************************************************
* END OF FILE
****************************************************************************
*/