proto.h revision 677833bc953b6cb418c701facbdcf4aa18d6c44e
/*
* TAP-Win32 -- A kernel driver to provide virtual tap device functionality
* on Windows. Originally derived from the CIPE-Win32
* project by Damion K. Wilson, with extensive modifications by
* James Yonan.
*
* All source code which derives from the CIPE-Win32 project is
* Copyright (C) Damion K. Wilson, 2003, and is released under the
* GPL version 2 (see below).
*
* All other source code is Copyright (C) 2002-2005 OpenVPN Solutions LLC,
* and is released under the GPL version 2 (see below).
*
* it under the terms of the GNU General Public License version 2
* as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program (see the file COPYING included with this
* distribution); if not, write to the Free Software Foundation, Inc.,
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
//============================================================
// MAC address, Ethernet header, and ARP
//============================================================
#pragma pack(1)
#define IP_HEADER_SIZE 20
typedef unsigned char MACADDR [6];
typedef unsigned long IPADDR;
//-----------------
// Ethernet address
//-----------------
typedef struct {
} ETH_ADDR;
typedef struct {
} MC_LIST;
//----------------
// Ethernet header
//----------------
typedef struct
{
} ETH_HEADER, *PETH_HEADER;
//----------------
// ARP packet
//----------------
typedef struct
{
# define MAC_ADDR_TYPE 0x0001
# define ARP_REQUEST 0x0001
# define ARP_REPLY 0x0002
}
//----------
// IP Header
//----------
typedef struct {
# define IP_OFFMASK 0x1fff
/* The options start here. */
} IPHDR;
//-----------
// UDP header
//-----------
typedef struct {
} UDPHDR;
//--------------------------
// TCP header, per RFC 793.
//--------------------------
typedef struct {
# define TCPH_FIN_MASK (1<<0)
} TCPHDR;
#define TCPOPT_EOL 0
#define TCPOPT_NOP 1
#define TCPOPT_MAXSEG 2
#define TCPOLEN_MAXSEG 4
#pragma pack()