Files
xen/tools/vnet/vnet-module/vif.h
T
cl349@firebug.cl.cam.ac.uk eec8a20f38 Vnet update.
Fix the tools/vnet makefiles so that vnets will compile
and includes updates to the vnet implementation.
Vnet ids are increased to 128 bits. The vnet module will
insmod whether xen-br0 exists or not.
Signed-off-by: Mike Wray <mike.wray@hp.com>
Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
2005-08-26 10:52:53 +00:00

58 lines
1.6 KiB
C

/*
* Copyright (C) 2004 Mike Wray <mike.wray@hp.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by the
* Free Software Foundation; either version 2 of the License, or (at your
* option) any later version.
*
* 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; if not, write to the Free software Foundation, Inc.,
* 59 Temple Place, suite 330, Boston, MA 02111-1307 USA
*
*/
#ifndef _VNET_VIF_H_
#define _VNET_VIF_H_
#include <if_varp.h>
struct net_device;
/** Key for entries in the vif table. */
typedef struct VifKey {
VnetId vnet;
Vmac vmac;
} VifKey;
typedef struct Vif {
VnetId vnet;
Vmac vmac;
struct net_device *dev;
atomic_t refcount;
} Vif;
struct HashTable;
extern struct HashTable *vif_table;
extern void vif_print(void);
extern void vif_decref(Vif *vif);
extern void vif_incref(Vif *vif);
extern int vif_create(struct VnetId *vnet, Vmac *vmac, Vif **vif);
extern int vif_create(VnetId *vnet, Vmac *vmac, Vif **vif);
extern int vif_add(struct VnetId *vnet, Vmac *vmac, Vif **vif);
extern int vif_lookup(struct VnetId *vnet, Vmac *vmac, Vif **vif);
extern int vif_remove(struct VnetId *vnet, Vmac *vmac);
extern void vif_purge(void);
extern int vif_init(void);
extern void vif_exit(void);
#endif