1 /******************************************************************************
2 * Copyright (c) 2011 IBM Corporation
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
10 * IBM Corporation - initial implementation
11 *****************************************************************************/
16 #include <netdriver.h>
18 #define RX_QUEUE_SIZE 128
19 #define BUFFER_ENTRY_SIZE 1514
22 VQ_RX = 0, /* Receive Queue */
23 VQ_TX = 1, /* Transmit Queue */
26 /* VIRTIO_NET Feature bits */
27 #define VIRTIO_NET_F_MAC (1 << 5)
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);