X-Git-Url: http://v3vee.org/palacios/gitweb/gitweb.cgi?a=blobdiff_plain;f=linux_module%2Fpalacios-vnet.h;h=6989b1528713b0f76a1305f0ff76629006e49910;hb=da0b4bb80de755529f47b9ca57ccb0c2cefae15b;hp=010b99a9997599b515930e92210c6c63457f769e;hpb=6ed3385440a7d82f4529bb9433d1a5489351c378;p=palacios.git diff --git a/linux_module/palacios-vnet.h b/linux_module/palacios-vnet.h index 010b99a..6989b15 100644 --- a/linux_module/palacios-vnet.h +++ b/linux_module/palacios-vnet.h @@ -1,12 +1,37 @@ /* - * Palacios VNET Host Bridge - * (c) Lei Xia, 2010 + * Lei Xia 2010 */ -#ifndef __PALACIOS_VNET_BRIDGE_H__ -#define __PALACIOS_VNET_BRIDGE_H__ +#ifndef __PALACIOS_VNET_H__ +#define __PALACIOS_VNET_H__ + +#include + + +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); -int palacios_init_vnet(void); #endif