/* * This file is part of the Palacios Virtual Machine Monitor developed * by the V3VEE Project with funding from the United States National * Science Foundation and the Department of Energy. * * The V3VEE Project is a joint project between Northwestern University * and the University of New Mexico. You can find out more at * http://www.v3vee.org * * Copyright (c) 2010, Lei Xia * Copyright (c) 2010, The V3VEE Project * All rights reserved. * * Author: Lei Xia * * This is free software. You are permitted to use, * redistribute, and modify it as specified in the file "V3VEE_LICENSE". */ #include #include #include #include #include static struct v3_packet_hooks * packet_hooks = 0; int V3_send_raw(const char * pkt, uint32_t len) { V3_ASSERT(packet_hooks); V3_ASSERT(packet_hooks->send); return packet_hooks->send(pkt, len, NULL); } int V3_packet_add_recver(const char * mac, struct v3_vm_info * vm){ return packet_hooks->add_recver(mac, vm); } int V3_packet_del_recver(const char * mac, struct v3_vm_info * vm){ return packet_hooks->del_recver(mac, vm); } void V3_Init_Packet(struct v3_packet_hooks * hooks) { packet_hooks = hooks; PrintDebug("V3 raw packet interface inited\n"); return; }