X-Git-Url: http://v3vee.org/palacios/gitweb/gitweb.cgi?a=blobdiff_plain;f=linux_module%2Fpalacios-vnet.h;h=6989b1528713b0f76a1305f0ff76629006e49910;hb=a34275476494aeabed460b284a70cfc9b66a9896;hp=b3e54509f1e7292d8f17064a93bb5b717f26acf1;hpb=e39ac677ad4eb2c2db111ce08eb6172c61f5001f;p=palacios.git diff --git a/linux_module/palacios-vnet.h b/linux_module/palacios-vnet.h index b3e5450..6989b15 100644 --- a/linux_module/palacios-vnet.h +++ b/linux_module/palacios-vnet.h @@ -1,13 +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_vnet_init(void); -int palacios_init_vnet_bridge(void); #endif