X-Git-Url: http://v3vee.org/palacios/gitweb/gitweb.cgi?a=blobdiff_plain;f=palacios%2Finclude%2Fvnet%2Fvnet.h;h=b123d5926f1f392d7d975452b4254b62edc4e974;hb=002d46c777ac52048d0a3e82c80821ad3c8fef46;hp=3bc1344d431280b06272b97cc169ee467d6fa2d3;hpb=93cce2634cfa81b8f031efa3ef0cbc53f6ead560;p=palacios.git diff --git a/palacios/include/vnet/vnet.h b/palacios/include/vnet/vnet.h index 3bc1344..b123d59 100644 --- a/palacios/include/vnet/vnet.h +++ b/palacios/include/vnet/vnet.h @@ -20,10 +20,11 @@ * redistribute, and modify it as specified in the file "V3VEE_LICENSE". */ -#ifndef __VNET_CORE_H__ -#define __VNET_CORE_H__ +#ifndef __VNET_H__ +#define __VNET_H__ #include +#include #include #include @@ -100,8 +101,13 @@ int v3_vnet_add_bridge(struct v3_vm_info * vm, struct v3_vnet_bridge_ops * ops, uint8_t type, void * priv_data); + +void v3_vnet_del_bridge(uint8_t type); + int v3_vnet_add_route(struct v3_vnet_route route); -int v3_vnet_send_pkt(struct v3_vnet_pkt * pkt, void * private_data, int synchronize); +void v3_vnet_del_route(uint32_t route_idx); + +int v3_vnet_send_pkt(struct v3_vnet_pkt * pkt, void * private_data); int v3_vnet_find_dev(uint8_t * mac); int v3_vnet_stat(struct vnet_stat * stats); @@ -111,13 +117,18 @@ struct v3_vnet_dev_ops { int (*input)(struct v3_vm_info * vm, struct v3_vnet_pkt * pkt, void * dev_data); + + /* return >0 means there are more pkts in the queue to be sent */ + int (*poll)(struct v3_vm_info * vm, + int quote, + void * dev_data); }; int v3_init_vnet(void); void v3_deinit_vnet(void); int v3_vnet_add_dev(struct v3_vm_info * info, uint8_t * mac, - struct v3_vnet_dev_ops * ops, + struct v3_vnet_dev_ops * ops, int quote, int poll_state, void * priv_data); int v3_vnet_del_dev(int dev_id);