1#ifndef __PPPOL2TP_H 2#define __PPPOL2TP_H 3 4#include <asm/types.h> 5 6#define PX_PROTO_OL2TP 2 /* Now L2TP also, by MJ. */ 7 8#define PPPIOCDETACH _IOW('t', 60, int) /* detach from ppp unit/chan */ 9#define PPPIOCCONNECT _IOW('t', 58, int) /* attach to ppp channel */ 10#define PPPIOCATTCHAN _IOW('t', 56, int) /* attach to ppp channel */ 11#define PPPIOCGCHAN _IOR('t', 55, int) /* get ppp channel number */ 12 13 14/* Structure used to bind() the socket to a particular socket & tunnel */ 15struct pppol2tp_addr 16{ 17 pid_t pid; /* pid that owns the fd. 18 * 0 => current */ 19 int fd; /* FD of UDP socket to use */ 20 21 struct sockaddr_in addr; /* IP address and port to send to */ 22 23 __u16 s_tunnel, s_session; /* For matching incoming packets */ 24 __u16 d_tunnel, d_session; /* For sending outgoing packets */ 25}; 26 27 28/* Foxconn, add start by MJ. for pppol2tp. 01/21/2010 */ 29struct sockaddr_pppol2tp { 30 sa_family_t sa_family; /* address family, AF_PPPOX */ 31 unsigned int sa_protocol; /* protocol identifier */ 32 struct pppol2tp_addr pppol2tp; 33}__attribute__ ((packed)); 34/* Foxconn, add end by MJ. for pppol2tp. 01/21/2010 */ 35 36#endif 37 38