📄 ipsec_network_interface.h
字号:
/* ipsec_network_interface.h - WindNet IPsec and IKE: Network I/F definitions *//* * Copyright (c) 2000-2006 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---------------------------------------------------03f,13jan06,djp removed rwos dependencies03e,09jan06,djp Added required includes03d,28nov05,djp replace WRN_INET with WRSEC_INET03c,08may03,sam(teamf1) added macros GET_PROTOCOL,IS_IP_MINE,NEITHER_OF.03b,24Apr03,sam(teamf1) renamed ipsec_get_pmtu_message to ipsecPmtuMessageGet. 03a,15apr03,sam (teamf1)added function to get PMTU age(SPR #86677).02b,25mar02,rpt added DF bit configuration to the network interface class to enable PMTU per interface. 02a,21mar02,rpt Changed struct IPSEC_NETWORK_INTERFACE declaration and func declarations to use WRN_INET_ADDR* instead of ULONG.01a,19mar02,rpt Extracted from WindNet IPSec 1.1, added modification history*//******************************************************************************/#if !defined (__IPSEC_NETIF_H__)#define __IPSEC_NETIF_H__#include <net/if.h>#include <net/if_var.h>#include <wrn/ipsec/ipsecStats.h>#include "../common/wrSecList.h"#include "../common/wrSecInetAddr.h"#include "../sadb/sadb_if.h"/*#include "ipsecP.h"*//******************************************************************************/typedef enum DF_BIT_CONFIG { CLEAR = 0, SET = 1, COPY = 2 }DF_BIT_CONFIG;/* Set default PMTU age to 10 minutes */#define IPSEC_DEFAULT_PMTU_AGE 10 * 60#define GET_PROTOCOL(protocol,inetFam) \ { \ if ((inetFam) == WRN_PF_INET6) \ { \ protocol = v6_traffic_info.selector.vi_data.protocol; \ } \ else \ { \ protocol = v4_traffic_info.selector.vi_data.protocol; \ } \ } \#define IS_IP_MINE(ip) \ (ipsec_find_network_interface_based_on_ip_address ((ip)) != NULL)#define NEITHER_OF(field,value1,value2) \ (( (field) != (value1) ) && ((field) != (value2))) \#define ONE_OF(field,value1,value2) \ (( (field) == (value1) ) || ((field) == (value2))) \/******************************************************************************/typedef struct IPSEC_NETWORK_INTERFACE{BOOL enabled;char cptr_netif_name[20];UINT port_sub_unit; /* sub-unit index */UINT port_number; /* for un-numbered links */struct ifnet *sptr_ifnet; /* ifnet */WRSEC_INET_ADDR *p_address; /* IP address bound to IPsec */NET_IF *net_interface;DF_BIT_CONFIG df_bit;UINT pmtu_age;/*statistics*/ULONG packets_rx_on_ipsec_port;ULONG packets_tx_on_ipsec_port;#ifdef INCLUDE_COUNTERS_NETWORK_INTERFACENETWORK_INTERFACE_COUNTS counts; /* included from ipsecStats.h */#endif}IPSEC_NETWORK_INTERFACE;/******************************************************************************/struct ifnet *ipsec_get_ifnet_handle ( WRSEC_INET_ADDR *pAddress );IPSEC_NETWORK_INTERFACE *ipsec_find_network_interface_based_on_ip_address ( WRSEC_INET_ADDR *pAddress );void cleanup_network_interface_container ( WRSEC_LIST list );UINT ipsecPmtuAgeGet ( WRSEC_INET_ADDR *p_address );#endif /*__IPSEC_NETIF_H__*//******************************************************************************/
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -