win-pvdrivers
view xennet/xennet.h @ 74:06b4321b7068
Created a common AllocagePages routine in xen_windows.h
Updated xennet and xenvbd to use it.
Updated xennet's method of getting the virtual address from the Mdl
Updated xennet and xenvbd to use it.
Updated xennet's method of getting the virtual address from the Mdl
author | James Harper <james.harper@bendigoit.com.au> |
---|---|
date | Thu Dec 20 21:37:20 2007 +1100 (2007-12-20) |
parents | d5df0038627d |
children | dfa772949c6e |
line source
1 /*
2 PV Drivers for Windows Xen HVM Domains
3 Copyright (C) 2007 James Harper
4 Copyright (C) 2007 Andrew Grover <andy.grover@oracle.com>
6 This program is free software; you can redistribute it and/or
7 modify it under the terms of the GNU General Public License
8 as published by the Free Software Foundation; either version 2
9 of the License, or (at your option) any later version.
11 This program is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with this program; if not, write to the Free Software
18 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
19 */
21 #pragma warning(disable: 4201)
22 #pragma warning(disable: 4214)
24 #include <wdm.h>
25 #include <wdf.h>
26 #include <wdfminiport.h>
27 #include <initguid.h>
28 #define NDIS_MINIPORT_DRIVER
29 #define NDIS51_MINIPORT 1
30 #include <ndis.h>
31 #define NDIS_MAJOR_VER 5
32 #define NDIS_MINOR_VER 1
34 #define NTSTRSAFE_LIB
35 #include <ntstrsafe.h>
37 #define __DRIVER_NAME "XenNet"
39 #include <xen_windows.h>
40 #include <memory.h>
41 #include <grant_table.h>
42 #include <event_channel.h>
43 #include <hvm/params.h>
44 #include <hvm/hvm_op.h>
45 #include <evtchn_public.h>
46 #include <xenbus_public.h>
47 #include <xen_public.h>
48 #include <gnttbl_public.h>
49 #include <io/ring.h>
50 #include <io/netif.h>
51 #define XENNET_POOL_TAG (ULONG) 'XenN'
53 #define NAME_SIZE 64
55 #define ETH_ALEN 6
57 /* TODO: crank this up if we support higher mtus? */
58 #define XN_DATA_SIZE 1500
59 #define XN_HDR_SIZE 14
60 #define XN_MIN_PKT_SIZE 60
61 #define XN_MAX_PKT_SIZE (XN_HDR_SIZE + XN_DATA_SIZE)
63 #define XN_MAX_SEND_PKTS 16
65 #define XENSOURCE_MAC_HDR 0x00163E
66 #define XN_VENDOR_DESC "Xensource"