These changes are the raw update to qemu-2.6.
[kvmfornfv.git] / qemu / roms / SLOF / lib / libvirtio / virtio-net.h
1 /******************************************************************************
2  * Copyright (c) 2011 IBM Corporation
3  * All rights reserved.
4  * This program and the accompanying materials
5  * are made available under the terms of the BSD License
6  * which accompanies this distribution, and is available at
7  * http://www.opensource.org/licenses/bsd-license.php
8  *
9  * Contributors:
10  *     IBM Corporation - initial implementation
11  *****************************************************************************/
12
13 #ifndef VIRTIO_NET_H
14 #define VIRTIO_NET_H
15
16 #include <netdriver.h>
17
18 #define RX_QUEUE_SIZE           128
19 #define BUFFER_ENTRY_SIZE       1514
20
21 enum {
22         VQ_RX = 0,      /* Receive Queue */
23         VQ_TX = 1,      /* Transmit Queue */
24 };
25
26 /* VIRTIO_NET Feature bits */
27 #define VIRTIO_NET_F_MAC       (1 << 5)
28
29 extern net_driver_t *virtionet_open(struct virtio_device *dev);
30 extern void virtionet_close(net_driver_t *driver);
31 extern int virtionet_read(char *buf, int len);
32 extern int virtionet_write(char *buf, int len);
33
34 #endif