ia64/xen-unstable

view tools/vnet/vnet-module/if_etherip.h @ 8740:3d7ea7972b39

Update patches for linux 2.6.15.

Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
author cl349@firebug.cl.cam.ac.uk
date Thu Feb 02 17:16:00 2006 +0000 (2006-02-02)
parents 06d84bf87159
children 71b0f00f6344
line source
1 /*
2 * Copyright (C) 2004 Mike Wray <mike.wray@hp.com>
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by the
6 * Free Software Foundation; either version 2 of the License, or (at your
7 * option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful, but
10 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
11 * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12 * for more details.
13 *
14 * You should have received a copy of the GNU General Public License along
15 * with this program; if not, write to the Free software Foundation, Inc.,
16 * 59 Temple Place, suite 330, Boston, MA 02111-1307 USA
17 *
18 */
19 #ifndef _VNET_IF_ETHERIP_H_
20 #define _VNET_IF_ETHERIP_H_
22 #define CONFIG_ETHERIP_EXT
24 #ifdef CONFIG_ETHERIP_EXT
26 #define ETHERIP_VERSION 4
28 struct etheriphdr {
29 #if defined(__LITTLE_ENDIAN_BITFIELD)
30 __u16 reserved:12,
31 version:4;
32 #elif defined (__BIG_ENDIAN_BITFIELD)
33 __u16 version:4,
34 reserved:12;
35 #else
36 #error "Please fix <asm/byteorder.h>"
37 #endif
38 __u8 vnet[16];
39 } __attribute__ ((packed));
41 #else
43 #define ETHERIP_VERSION 3
45 struct etheriphdr
46 {
47 #if defined(__LITTLE_ENDIAN_BITFIELD)
48 __u16 reserved:12,
49 version:4;
50 #elif defined (__BIG_ENDIAN_BITFIELD)
51 __u16 version:4,
52 reserved:12;
53 #else
54 #error "Please fix <asm/byteorder.h>"
55 #endif
57 };
58 #endif
61 #ifndef IPPROTO_ETHERIP
62 #define IPPROTO_ETHERIP 97
63 #endif
65 #endif /* ! _VNET_IF_ETHERIP_H_ */