X-Git-Url: http://v3vee.org/palacios/gitweb/gitweb.cgi?a=blobdiff_plain;f=linux_module%2Fpalacios-vnet.h;h=47d8ed9061be5d050fc1e12617571a20805c9122;hb=f549b22853dfed86175cdf110e9f56bbdb934271;hp=edc36874c70b6eca8ce2746fd58258b1378c893b;hpb=d12cdf5b213b2b51d525914a852ceacd2c198b5a;p=palacios.releases.git diff --git a/linux_module/palacios-vnet.h b/linux_module/palacios-vnet.h index edc3687..47d8ed9 100644 --- a/linux_module/palacios-vnet.h +++ b/linux_module/palacios-vnet.h @@ -1,14 +1,52 @@ /* - * Palacios VNET Linux Bridge - * (c) Lei Xia, 2010 + * This file is part of the Palacios Virtual Machine Monitor developed + * by the V3VEE Project with funding from the United States National + * Science Foundation and the Department of Energy. + * + * The V3VEE Project is a joint project between Northwestern University + * and the University of New Mexico. You can find out more at + * http://www.v3vee.org + * + * Copyright (c) 2011, Lei Xia + * Copyright (c) 2011, The V3VEE Project + * All rights reserved. + * + * This is free software. You are permitted to use, redistribute, + * and modify it under the terms of the GNU General Public License + * Version 2 (GPLv2). The accompanying COPYING file contains the + * full text of the license. */ -#ifndef __PALACIOS_VNET_BRIDGE_H__ -#define __PALACIOS_VNET_BRIDGE_H__ +#ifndef __PALACIOS_VNET_H__ +#define __PALACIOS_VNET_H__ #include -int palacios_init_vnet(void); + +typedef enum {UDP, TCP, RAW, NONE} vnet_brg_proto_t; + +struct vnet_brg_stats{ + uint64_t pkt_from_vmm; + uint64_t pkt_to_vmm; + uint64_t pkt_drop_vmm; + uint64_t pkt_from_phy; + uint64_t pkt_to_phy; + uint64_t pkt_drop_phy; +}; + +void vnet_brg_delete_link(uint32_t idx); +uint32_t vnet_brg_add_link(uint32_t ip, uint16_t port, vnet_brg_proto_t proto); +int vnet_brg_link_stats(uint32_t link_idx, struct nic_statistics * stats); +int vnet_brg_stats(struct vnet_brg_stats * stats); + + +int vnet_bridge_init(void); +void vnet_bridge_deinit(void); + + +int vnet_ctrl_init(void); +void vnet_ctrl_deinit(void); + #endif