⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 nat_structures.h

📁 vxworks下ppp的实现源码
💻 H
📖 第 1 页 / 共 2 页
字号:
/* nat_structures.h *//* Copyright 2000-2003 Wind River Systems, Inc. *//* @format.tab-size 4, @format.use-tabs true, @format.new-line lf *//*modification history--------------------01d,16jun03,myz  Added new fragment translation functions01c,25apr03,myz  changed nat_filter_rx function's prototype.01b,24apr03,zhu  updated copyright01a,21apr03,myz  removed timer_dispatcher from NAT_CLASS.040903  vks     updated Copyright info 032603  vks     replaced rw_container with lstLib for bind_list and session_list092502  vvv     modified fragment list for lstLib092402  vvv     added NODE element to NAT_PASSTHRU_PAIR092402  vvv     changed RW_CONTAINER to LIST092302  vvv             unconditionally include fix for SPR #65740112601	tk		Fix SPR65740: ARP problem with Basic-NAT.100501  tk		Add an additional parameter to match_spoofed_port_with_udp_entry                and match_spoofed_port_with_tcp_entry.100301  tk		Add match_sa_with_static_entry() declaration.082301	tk		Add registerStaticEntryToTranslationList() declaration.080701	tk		Add match_ports_with_udp_entry_global() and				match_ports_with_tcp_entry_global() declaration for H.323 handling.072601	tk		remove declaration of match_ports_with_tcp_entry() and 				match_ports_with_udp_entry().  Add the following declarations:				match_ports_with_tcp_entry_outbound(),				match_ports_with_tcp_entry_inbound(),				match_ports_with_udp_entry_outbound(),				match_ports_with_udp_entry_inbound().071101	tk		Add function declaration create_static_ip_entry().052501	tk		Fix SPR#67128: Add feature to configure the Basic NAT starting global				address by adding starting_global_address in NAT_CLASS.				Add a boolean flag static_entry in NAT_IP_ADDRESS_ENTRY to indicate				the nature of this address bind.*/#ifndef __INCnat_structuresh#define __INCnat_structuresh/* NAT-specific headers */#include <nat/natAlgApi.h>/* VxWorks specific headers */#include <inetLib.h>#include <net/mbuf.h>	/* struct mbuf (M_BLK) and struct ifnet definitions */typedef	struct	SA_DA_IP_ADDRESSES{	IP_ADDRESS	source_address;	IP_ADDRESS	destination_address;} SA_DA_IP_ADDRESSES;typedef	struct	ICMP_PACKET_DATA{	SA_DA_IP_ADDRESSES		addresses;	USHORT					ip_checksum;} ICMP_PACKET_DATA;typedef struct ICMP_DATA{	ICMP_PACKET_DATA		ip_data;	USHORT					icmp_checksum;} ICMP_DATA;typedef	struct	SEQUENCE_HEADER{	struct SEQUENCE_ENTRY	*sptr_forward_link;	struct SEQUENCE_ENTRY	*sptr_backward_link;} SEQUENCE_HEADER;typedef	struct	SEQUENCE_ENTRY{	SEQUENCE_HEADER		link;	ULONG				sequence_number_base;	int					sequence_number_delta;	ULONG				sequence_number_base_adjust;	ULONG				entry_timer;	bool				timer_enabled;} SEQUENCE_ENTRY;typedef	struct	TCP_TRANSLATION_HEADER{	struct TCP_TRANSLATION_ENTRY	*sptr_forward_link;	struct TCP_TRANSLATION_ENTRY	*sptr_backward_link;} TCP_TRANSLATION_HEADER;typedef	struct	TCP_TRANSLATION_ENTRY{	TCP_TRANSLATION_HEADER					link;	USHORT									local_port;	USHORT									remote_port;	USHORT									spoofed_local_port;	IP_ADDRESS								local_address;	IP_ADDRESS								remote_address;	SEQUENCE_HEADER							local_sequence_delta_list;	SEQUENCE_HEADER							global_sequence_delta_list;	ULONG									global_sequence_number;	ULONG									local_sequence_number;	ULONG									local_connection_timer;	ULONG									global_connection_timer;	BYTE_ENUM (NAT_TCP_PORT_STATE)			local_state;	BYTE_ENUM (NAT_TCP_PORT_STATE)			global_state;	bool									static_entry;	bool									dynamicFromStatic;	u_long									bind_id;} TCP_TRANSLATION_ENTRY;typedef	struct	NAT_IP_ADDRESS_ENTRY{	IP_ADDRESS								address;	bool									address_in_use;	bool									static_entry;} NAT_IP_ADDRESS_ENTRY;typedef	struct	IP_TRANSLATION_HEADER{	struct IP_TRANSLATION_ENTRY *			sptr_forward_link;	struct IP_TRANSLATION_ENTRY	*			sptr_backward_link;} IP_TRANSLATION_HEADER;typedef	struct	IP_TRANSLATION_ENTRY{	IP_TRANSLATION_HEADER					link;	IP_ADDRESS								sa_local_address;	IP_ADDRESS								sa_global_address;	ULONG									time_stamp;	NAT_IP_ADDRESS_ENTRY*					sptr_local_address_use_entry;		TCP_TRANSLATION_HEADER					tcp_translation_list;	bool									static_entry;	u_long									bind_id;	} IP_TRANSLATION_ENTRY;typedef	struct	UDP_TRANSLATION_HEADER{	struct	UDP_TRANSLATION_ENTRY *			sptr_forward_link;	struct	UDP_TRANSLATION_ENTRY *			sptr_backward_link;} UDP_TRANSLATION_HEADER;typedef	struct	UDP_TRANSLATION_ENTRY{	UDP_TRANSLATION_HEADER					link;	USHORT									local_port;	USHORT									remote_port;	USHORT									spoofed_local_port;	IP_ADDRESS								local_address;	IP_ADDRESS								remote_address;	ULONG									udp_translation_entry_timer;	bool									static_entry;	bool									dynamicFromStatic;	u_long									bind_id;} UDP_TRANSLATION_ENTRY;typedef	struct	ICMP_TRANSLATION_HEADER{	struct ICMP_TRANSLATION_ENTRY *			sptr_forward_link;	struct ICMP_TRANSLATION_ENTRY *			sptr_backward_link;} ICMP_TRANSLATION_HEADER;typedef struct ICMP_TRANSLATION_ENTRY{	ICMP_TRANSLATION_HEADER					link;	USHORT									icmp_identifier;	USHORT									spoofed_icmp_identifier;	IP_ADDRESS								local_address;	ULONG									icmp_translation_entry_timer;	u_long									bind_id;} ICMP_TRANSLATION_ENTRY;	typedef struct NAT_FRAGMENT_INFO    {    NODE                node;    IP_ADDRESS		address_to_change;    IP_ADDRESS		modified_address;    USHORT		identifier;    UINT		time_to_live;    } NAT_FRAGMENT_INFO;typedef	struct	NAT_IP_PORT_CLASS{	bool						enabled;	bool						default_translate_enabled;	BYTE_ENUM (NAT_PORT_TYPE)	type;	IP_ADDRESS					address;	IP_ADDRESS					mask;	char						type_string[20];	/*used only for nvram config */	char						ifname[16];	struct ifnet*				ifunit;} NAT_IP_PORT_CLASS;typedef struct NAT_IP_STATIC_ENTRY{	IP_ADDRESS		local_address;	IP_ADDRESS		global_address;} NAT_IP_STATIC_ENTRY;typedef struct NAT_PORT_STATIC_ENTRY{	IP_ADDRESS	local_address;	USHORT		local_port_number;	USHORT		global_port_number;} NAT_PORT_STATIC_ENTRY;/* the following contains all members necessary for RFC NAT */typedef struct NATG_CLASS{	IP_TRANSLATION_HEADER			ip_translation_list;	NAT_IP_ADDRESS_ENTRY*			global_address_pool;	ULONG							global_address_pool_size;	ULONG							global_address_index_start;} NATG_CLASS;/* the following contains all members necessary for single address NAT */typedef struct NATS_CLASS

⌨️ 快捷键说明

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