X-Git-Url: http://v3vee.org/palacios/gitweb/gitweb.cgi?a=blobdiff_plain;f=linux_module%2Fpalacios-vnet.h;h=6989b1528713b0f76a1305f0ff76629006e49910;hb=a34275476494aeabed460b284a70cfc9b66a9896;hp=edc36874c70b6eca8ce2746fd58258b1378c893b;hpb=d12cdf5b213b2b51d525914a852ceacd2c198b5a;p=palacios.git diff --git a/linux_module/palacios-vnet.h b/linux_module/palacios-vnet.h index edc3687..6989b15 100644 --- a/linux_module/palacios-vnet.h +++ b/linux_module/palacios-vnet.h @@ -1,14 +1,37 @@ /* - * Palacios VNET Linux 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 -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