ia64/xen-unstable

view tools/vnet/vnet-module/vif.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_VIF_H_
20 #define _VNET_VIF_H_
22 #include <if_varp.h>
23 struct net_device;
25 /** Key for entries in the vif table. */
26 typedef struct VifKey {
27 VnetId vnet;
28 Vmac vmac;
29 } VifKey;
31 typedef struct Vif {
32 VnetId vnet;
33 Vmac vmac;
34 struct net_device *dev;
35 atomic_t refcount;
36 } Vif;
38 struct HashTable;
39 extern struct HashTable *vif_table;
41 extern void vif_print(void);
43 extern void vif_decref(Vif *vif);
44 extern void vif_incref(Vif *vif);
46 extern int vif_create(struct VnetId *vnet, Vmac *vmac, Vif **vif);
48 extern int vif_create(VnetId *vnet, Vmac *vmac, Vif **vif);
49 extern int vif_add(struct VnetId *vnet, Vmac *vmac, Vif **vif);
50 extern int vif_lookup(struct VnetId *vnet, Vmac *vmac, Vif **vif);
51 extern int vif_remove(struct VnetId *vnet, Vmac *vmac);
52 extern void vif_purge(void);
54 extern int vif_init(void);
55 extern void vif_exit(void);
57 #endif