1 2#include <linux/ppp_channel.h> 3#include <net/sock.h> 4 5/* Fxcn port-S Wins, 0714-09 */ 6//#define uchar unsigned char 7//#define ushort unsigned short 8//#define ulong unsigned long 9//#define uint unsigned int 10/* Fxcn port-E Wins, 0714-09 */ 11 12#define PPP_NETWORK_LAYER 0x3FFF 13#define PPP_NW_LAYER 0x3F 14 15#define PPP_PROTOCOL_PPPOE 1 16#define PPP_PROTOCOL_PPTP 2 17#ifdef INCLUDE_L2TP 18#define PPP_PROTOCOL_L2TP 3 /* Foxconn added, zacker, 02/01/2010, @l2tp */ 19#endif 20 21/* Foxconn added start, pptp, Winster Chan, 06/26/2006 */ 22struct ppp_info { 23 unsigned int protocol_type; 24 struct ppp_channel *pchan; 25}; 26 27struct sock_info { 28 unsigned int protocol_type; 29 struct sock *sk; 30}; 31 32#define ETH_MAC_LEN 6 33#define SEQ_PRESENT 0x01 34#define ACK_PRESENT 0x02 35 36#define PPP_PROTO_IP 0x0021 /* Internet Protocol */ 37 38struct num_info { 39 unsigned char flag_a_s; /* Flag for sequence & acknowledgement number */ 40 unsigned long gre_seq; /* Sequence number of GRE header */ 41 unsigned long gre_ack; /* Acknowledgement number of GRE header */ 42}; 43 44struct hdr_info { 45 unsigned char eth_smac[ETH_MAC_LEN]; /* Source MAC address */ 46 unsigned char eth_dmac[ETH_MAC_LEN]; /* Destination MAC address */ 47 unsigned long ip_saddr; /* Source IP address */ 48 unsigned long ip_daddr; /* Destination IP address */ 49 struct num_info seq_ack; 50}; 51 52struct mac_hdr { 53 unsigned char smac[ETH_MAC_LEN]; /* Source MAC address */ 54 unsigned char dmac[ETH_MAC_LEN]; /* Destination MAC address */ 55 unsigned short type; 56}; 57 58struct addr_info { 59 unsigned long src_addr; /* Source IP address */ 60 unsigned long dst_addr; /* Destination IP address */ 61}; 62/* Foxconn added end, pptp, Winster Chan, 06/26/2006 */ 63