ia64/xen-unstable

view tools/vnet/vnetd/vnetd.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
line source
1 /*
2 * Copyright (C) 2004 Mike Wray <mike.wray@hp.com>.
3 *
4 * This library is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU Lesser General Public License as
6 * published by the Free Software Foundation; either version 2.1 of the
7 * License, or (at your option) any later version. This library is
8 * distributed in the hope that it will be useful, but WITHOUT ANY
9 * WARRANTY; without even the implied warranty of MERCHANTABILITY or
10 * FITNESS FOR A PARTICULAR PURPOSE.
11 * See the GNU Lesser General Public License for more details.
12 *
13 * You should have received a copy of the GNU Lesser General Public License
14 * along with this library; if not, write to the Free Software Foundation,
15 * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
16 */
17 #ifndef _VNET_VNETD_H_
18 #define _VNET_VNETD_H_
20 #include <asm/types.h>
21 #include <linux/if_ether.h>
22 #include "if_varp.h"
23 #include "varp_util.h"
25 #include "connection.h"
26 #include "sxpr.h"
28 /** Vnetd udp port in host order. */
29 #define VNETD_PORT VARP_PORT
31 /** Vnetd peer port in host order. */
32 #define VNETD_PEER_PORT (VARP_PORT + 1)
34 typedef struct VnetMsgVarp {
35 VarpHdr varph;
36 } VnetMsgVarp;
38 #define VNET_FWD_MAX (1500 + 200)
40 typedef struct VnetMsgFwd {
41 VnetMsgHdr;
42 uint16_t protocol;
43 uint16_t len;
44 uint8_t data[VNET_FWD_MAX];
45 } __attribute__((packed)) VnetMsgFwd;
47 typedef union VnetMsg {
48 VnetMsgHdr hdr;
49 VnetMsgVarp varp;
50 VnetMsgFwd fwd;
51 } VnetMsg;
53 enum {
54 VNET_VARP_ID = VARP_ID,
55 VNET_FWD_ID = 200,
56 };
58 typedef struct Vnetd {
59 unsigned long port;
60 unsigned long peer_port;
61 int verbose;
63 int esp_sock;
64 int etherip_sock;
66 struct sockaddr_in addr;
67 struct sockaddr_in mcast_addr;
69 Sxpr peers;
71 Conn *listen_conn;
72 Conn *udp_conn;
73 Conn *bcast_conn;
75 ConnList *connections;
77 } Vnetd;
79 extern Vnetd *vnetd;
81 #endif /* ! _VNET_VNETD_H_ */