X-Git-Url: http://v3vee.org/palacios/gitweb/gitweb.cgi?a=blobdiff_plain;f=linux_module%2Fpalacios-vnet.h;h=6989b1528713b0f76a1305f0ff76629006e49910;hb=4e43946f01f687361197dc9571b7df02ae20de30;hp=68a1b2682a724093224e7225e06026aad113f400;hpb=f47bc5f7b2fa7169df0c618369224fffb12007b3;p=palacios.git diff --git a/linux_module/palacios-vnet.h b/linux_module/palacios-vnet.h index 68a1b26..6989b15 100644 --- a/linux_module/palacios-vnet.h +++ b/linux_module/palacios-vnet.h @@ -1,16 +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__ -int palacios_vnet_init(void); -int palacios_init_vnet_bridge(void); +#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); -void palacios_vnet_deinit(void); -void palacios_deinit_vnet_bridge(void); #endif