Palacios Public Git Repository

To checkout Palacios execute

  git clone http://v3vee.org/palacios/palacios.web/palacios.git
This will give you the master branch. You probably want the devel branch or one of the release branches. To switch to the devel branch, simply execute
  cd palacios
  git checkout --track -b devel origin/devel
The other branches are similar.


Add dynamic VMM Driven/Guest Driven mode switch in VNET devices
[palacios-OLD.git] / palacios / include / palacios / vmm_packet.h
index 78585c1..a4ba3e5 100644 (file)
 #define __VMM_PACKET_H__
 
 #include <palacios/vmm.h>
+#include <palacios/vmm_ethernet.h>
 
 #ifdef __V3VEE__
 
-#define V3_send_Raw(pkt, size, data) ({                                \
-           extern struct v3_packet_hooks * packet_hooks;               \
-           int ret;                                                                    \
-           if ((packet_hooks) && (packet_hooks)->send) {       \
-               ret = (packet_hooks)->send(pkt,size,data);              \
-           }                                                   \
-           ret;                                                \
-       })
+int V3_send_raw(const char * pkt, uint32_t len);
+int V3_packet_add_recver(const char * mac, struct v3_vm_info * vm);
+int V3_packet_del_recver(const char * mac, struct v3_vm_info * vm);
 
 #endif
 
-
 struct v3_packet_hooks {
 
-    int (*send)(const char * pkt, const int size, void * private_data);
-
+    int (*send)(const char * pkt, unsigned int size, void * private_data);
+    int (*add_recver)(const char * mac, struct v3_vm_info * vm);
+    int (*del_recver)(const char * mac, struct v3_vm_info * vm);
 };
 
-
 extern void V3_Init_Packet(struct v3_packet_hooks * hooks);
 
 #endif