2 * This file is part of the Palacios Virtual Machine Monitor developed
3 * by the V3VEE Project with funding from the United States National
4 * Science Foundation and the Department of Energy.
6 * The V3VEE Project is a joint project between Northwestern University
7 * and the University of New Mexico. You can find out more at
10 * Copyright (c) 2011, Lei Xia <lxia@northwestern.edu>
11 * Copyright (c) 2011, The V3VEE Project <http://www.v3vee.org>
12 * All rights reserved.
14 * This is free software. You are permitted to use, redistribute,
15 * and modify it under the terms of the GNU General Public License
16 * Version 2 (GPLv2). The accompanying COPYING file contains the
17 * full text of the license.
20 #ifndef __PALACIOS_VNET_H__
21 #define __PALACIOS_VNET_H__
23 #include <vnet/vnet.h>
26 typedef enum {UDP, TCP, RAW, NONE} vnet_brg_proto_t;
28 struct vnet_brg_stats{
29 uint64_t pkt_from_vmm;
31 uint64_t pkt_drop_vmm;
32 uint64_t pkt_from_phy;
34 uint64_t pkt_drop_phy;
37 void vnet_brg_delete_link(uint32_t idx);
38 uint32_t vnet_brg_add_link(uint32_t ip, uint16_t port, vnet_brg_proto_t proto);
39 int vnet_brg_link_stats(uint32_t link_idx, struct nic_statistics * stats);
40 int vnet_brg_stats(struct vnet_brg_stats * stats);
43 int vnet_bridge_init(void);
44 void vnet_bridge_deinit(void);
47 int vnet_ctrl_init(void);
48 void vnet_ctrl_deinit(void);