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

📄 natpptpptalg.h

📁 vxworks下ppp的实现源码
💻 H
字号:
/* natPPTPPTAlg.h *//* Copyright 2001-2003 Wind River Systems, Inc. *//* @format.tab-size 4, @format.use-tabs true, @format.new-line lf *//* WindNet NAT "installable" PPTP Pass-Thru Application Level Gateway (ALG) *//*modification history--------------------01a,23apr03,zhu  Updated.050801	mdg	 Created.*/#ifndef __INCnatPPTPPTAlgh#define __INCnatPPTPPTAlgh/* data structures */typedef	struct	PPTP_TRANSLATION_HEADER    {	struct	PPTP_TRANSLATION *			sptr_forward_link;	struct	PPTP_TRANSLATION *			sptr_backward_link;    } PPTP_TRANSLATION_HEADER;typedef struct PPTP_TRANSLATION    {    PPTP_TRANSLATION_HEADER             link;	IP_ADDRESS						    local_address;	IP_ADDRESS							remote_address;    BOOL                                nated_client;    USHORT                              call_id;    USHORT                              spoofed_call_id;    USHORT                              peers_call_id;    ULONG                               pptp_translation_entry_timer;    } PPTP_TRANSLATION_ENTRY;typedef _struct PPTP_GRE_V2_MESSAGE_HEADER_FLAGS    {#if (_BYTE_ORDER == _LITTLE_ENDIAN)	unsigned char   		version:3;	unsigned char   		flags:4;	unsigned char   		acknowledgment_number_present:1;	unsigned char			recursion_control:3;	unsigned char			strict_source_route_present:1;	unsigned char			sequence_number_present:1;	unsigned char			key_present:1;	unsigned char			routing_present:1;    unsigned char			checksum_present:1;#else    unsigned char			checksum_present:1;	unsigned char			routing_present:1;	unsigned char			key_present:1;	unsigned char			sequence_number_present:1;	unsigned char			strict_source_route_present:1;	unsigned char			recursion_control:3;	unsigned char   		acknowledgment_number_present:1;	unsigned char   		flags:4;	unsigned char   		version:3;#endif    } _pack PPTP_GRE_V2_MESSAGE_HEADER_FLAGS;typedef _struct PPTP_GRE_PACKET    {	IP_HEADER			                ip_header;	PPTP_GRE_V2_MESSAGE_HEADER_FLAGS 	bit_flags;	USHORT								protocol_type;	USHORT								payload_length;	USHORT								call_id;	ULONG								sequence_number;	ULONG								acknowledgment_number;	BYTE				                data[VARIABLE_NUMBER_OF_BYTES];    } _pack PPTP_GRE_PACKET;typedef _struct PPTP_MESSAGE_HEADER    {	USHORT					length;	USHORT              	type;	ULONG					magic_cookie;    } _pack PPTP_MESSAGE_HEADER;typedef _struct PPTP_CONTROL_MESSAGE_HEADER    {	USHORT              	message_type;	USHORT 				 	reserved_0;    } _pack PPTP_CONTROL_MESSAGE_HEADER;typedef _struct PPTP_GENERIC_CONTROL_MESSAGE    {	BYTE	                data[VARIABLE_NUMBER_OF_BYTES];    } _pack PPTP_GENERIC_CONTROL_MESSAGE;typedef _struct PPTP_START_CONTROL_CONNECTION_REQUEST    {	USHORT			protocol_version;	USHORT  		reserved_1;	ULONG       	framing_capabilities;	ULONG           bearer_capabilities;	USHORT			maximum_channels;	USHORT			firmware_revision;	BYTE			host_name[64];	BYTE			vendor_string[64];    } _pack PPTP_START_CONTROL_CONNECTION_REQUEST;typedef _struct PPTP_START_CONTROL_CONNECTION_REPLY    {	USHORT			protocol_version;	BYTE           	result_code;	BYTE		    error_code;	ULONG           framing_capabilities;	ULONG           bearer_capabilities;    USHORT			maximum_channels;	USHORT			firmware_revision;	BYTE			host_name[64];	BYTE			vendor_string[64];    } _pack PPTP_START_CONTROL_CONNECTION_REPLY;typedef _struct PPTP_STOP_CONTROL_CONNECTION_REQUEST    {	BYTE			reason;	BYTE	  		reserved_1;	USHORT	  		reserved_2;    } _pack PPTP_STOP_CONTROL_CONNECTION_REQUEST;typedef _struct PPTP_STOP_CONTROL_CONNECTION_REPLY    {	BYTE			reason;	BYTE	  		error_code;	USHORT	  		reserved_1;    } PPTP_STOP_CONTROL_CONNECTION_REPLY;typedef _struct PPTP_ECHO_REQUEST    {	ULONG		   	identifier;    } _pack PPTP_ECHO_REQUEST;typedef _struct PPTP_ECHO_REPLY    {	ULONG		    identifier;	BYTE			result_code;	BYTE	  		error_code;	USHORT	  		reserved_1;    } _pack PPTP_ECHO_REPLY;typedef _struct PPTP_OUTGOING_CALL_REQUEST    {	USHORT			call_id;	USHORT			call_serial_number;	ULONG			minimum_bits_per_sec;	ULONG			maximum_bits_per_sec;	ULONG			bearer_type;	ULONG			framing_type;	USHORT			packet_receive_window_size;	USHORT			packet_processing_delay;	BYTE    		phone_number[64];	BYTE	    	sub_address[64];    } _pack PPTP_OUTGOING_CALL_REQUEST;typedef _struct PPTP_OUTGOING_CALL_REPLY    {	USHORT			call_id;	USHORT			peers_call_id;	BYTE		    result_code;	BYTE			error_code;	USHORT			cause_code;	ULONG 			connect_speed;	USHORT			packet_receive_window_size;	USHORT			packet_processing_delay;	ULONG 			physical_channel_id;    } _pack PPTP_OUTGOING_CALL_REPLY;typedef _struct	PPTP_INCOMING_CALL_REQUEST    {	USHORT			call_id;	USHORT			call_serial_number;	ULONG			call_bearer_type;	ULONG 			physical_channel_id;	USHORT			dialed_number_length;	USHORT			dialing_number_length;	BYTE  			dialed_number[64];	BYTE  		    dialing_number[64];	BYTE			sub_address[64];    } _pack PPTP_INCOMING_CALL_REQUEST;typedef _struct	PPTP_INCOMING_CALL_REPLY    {	USHORT			call_id;	USHORT			peers_call_id;	BYTE		    result_code;	BYTE			error_code;	USHORT			packet_receive_window_size;	USHORT			packet_transmit_delay;	USHORT			reserved_1;    } _pack PPTP_INCOMING_CALL_REPLY;typedef _struct PPTP_INCOMING_CALL_CONNECTED    {	USHORT			peers_call_id;	USHORT			reserved_1;	ULONG 			connect_speed;	USHORT  		packet_receive_window_size;	USHORT	    	packet_transmit_delay;	ULONG			framing_type;    } _pack PPTP_INCOMING_CALL_CONNECTED;typedef _struct PPTP_CALL_CLEAR_REQUEST    {    USHORT			call_id;    USHORT          reserved_1;    } _pack PPTP_CALL_CLEAR_REQUEST;typedef _struct PPTP_CALL_DISCONNECT_NOTIFY    {    USHORT			call_id;    BYTE    	    result_code;    BYTE		    error_code;    USHORT			cause_code;    USHORT			reserved_1;    BYTE       		call_statistics[128];    } _pack PPTP_CALL_DISCONNECT_NOTIFY;typedef _struct PPTP_WAN_ERROR_NOTIFY    {    USHORT			peers_call_id;    USHORT			reserved_1;    ULONG			crc_errors;    ULONG			framing_errors;    ULONG			hardware_overruns;    ULONG			buffer_overruns;    ULONG			timeout_errors;    ULONG			alignment_errors;    } _pack PPTP_WAN_ERROR_NOTIFY;typedef _struct PPTP_SET_LINK_INFO    {	USHORT			peers_call_id;	USHORT			reserved_1;	ULONG			send_accm_value;	ULONG			receive_accm_value;    } _pack PPTP_SET_LINK_INFO;typedef _union UNION_PPTP_CONTROL_MESSAGE    {	PPTP_GENERIC_CONTROL_MESSAGE			generic;	PPTP_START_CONTROL_CONNECTION_REQUEST 	start_control_connection_request;	PPTP_START_CONTROL_CONNECTION_REPLY		start_control_connection_reply;	PPTP_STOP_CONTROL_CONNECTION_REQUEST	stop_control_connection_request;	PPTP_STOP_CONTROL_CONNECTION_REPLY		stop_control_connection_reply;	PPTP_ECHO_REQUEST						echo_request;	PPTP_ECHO_REPLY							echo_reply;	PPTP_OUTGOING_CALL_REQUEST				outgoing_call_request;	PPTP_OUTGOING_CALL_REPLY				outgoing_call_reply;	PPTP_INCOMING_CALL_REQUEST				incoming_call_request;	PPTP_INCOMING_CALL_REPLY				incoming_call_reply;	PPTP_INCOMING_CALL_CONNECTED			incoming_call_connected;	PPTP_CALL_CLEAR_REQUEST					call_clear_request;	PPTP_CALL_DISCONNECT_NOTIFY 			call_disconnect_notify;	PPTP_WAN_ERROR_NOTIFY					wan_error_notify;	PPTP_SET_LINK_INFO 						set_link_info;    } _pack UNION_PPTP_CONTROL_MESSAGE;typedef _struct PPTP_CONTROL_PACKET    {	IP_HEADER 				 	  	ip_header;	TCP_HEADER       		  		tcp_header;	PPTP_MESSAGE_HEADER				pptp_header;	PPTP_CONTROL_MESSAGE_HEADER		control_header;	UNION_PPTP_CONTROL_MESSAGE		message;    } _pack PPTP_CONTROL_PACKET;/* PptpControlMessageType values */#define PPTP_START_SESSION_REQUEST	 1#define PPTP_START_SESSION_REPLY	 2#define PPTP_STOP_SESSION_REQUEST	 3#define PPTP_STOP_SESSION_REPLY		 4#define PPTP_ECHO_REQUEST		     5#define PPTP_ECHO_REPLY			     6#define PPTP_OUT_CALL_REQUEST		 7#define PPTP_OUT_CALL_REPLY		     8#define PPTP_IN_CALL_REQUEST		 9#define PPTP_IN_CALL_REPLY		     10#define PPTP_INCOMING_CALL_CONNECTED 11#define PPTP_CALL_CLEAR_REQUEST		 12#define PPTP_CALL_DISCONNECT_NOTIFY	 13#define PPTP_WAN_ERROR_NOTIFY		 14#define PPTP_SET_LINK_INFO		     15/* function declarations */STATUS natPPTPPTInit(void);		/* PPTP Pass-thru ALG agent initialization function */STATUS natPPTPPTPTEnd(void);void natPPTPXlatShow(void);#endif	/* __INCnatPPTPPTAlgh */

⌨️ 快捷键说明

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