From: Lei Xia Date: Sat, 29 Jan 2011 23:33:12 +0000 (-0600) Subject: Palacios Network Direct Bridge interface update X-Git-Url: http://v3vee.org/palacios/gitweb/gitweb.cgi?a=commitdiff_plain;h=66b370cefc9758a276f488fb4c944a8429feed8c;p=palacios.git Palacios Network Direct Bridge interface update --- diff --git a/palacios/include/palacios/vmm_packet.h b/palacios/include/palacios/vmm_packet.h index f343821..8360adc 100644 --- a/palacios/include/palacios/vmm_packet.h +++ b/palacios/include/palacios/vmm_packet.h @@ -26,13 +26,14 @@ #ifdef __V3VEE__ int V3_send_raw(const char * pkt, uint32_t len); +int V3_register_mac(const char mac[6], struct v3_vm_info * vm); #endif struct v3_packet_hooks { int (*send)(const char * pkt, unsigned int size, void * private_data); - + int (*register_mac)(const char * mac, struct v3_vm_info * vm); }; extern void V3_Init_Packet(struct v3_packet_hooks * hooks); diff --git a/palacios/src/palacios/vmm_packet.c b/palacios/src/palacios/vmm_packet.c index 252bf11..2d0814b 100644 --- a/palacios/src/palacios/vmm_packet.c +++ b/palacios/src/palacios/vmm_packet.c @@ -32,6 +32,11 @@ int V3_send_raw(const char * pkt, uint32_t len) { } +int V3_register_mac(const char mac[6], struct v3_vm_info * vm){ + + return packet_hooks->register_mac(mac, vm); +} + void V3_Init_Packet(struct v3_packet_hooks * hooks) { packet_hooks = hooks; PrintDebug("V3 raw packet interface inited\n");