|
XenevaOS
|
#include <_xeneva.h>#include <stdio.h>#include <string.h>#include <sys/_kefile.h>#include <sys/_keproc.h>#include <sys/_ketime.h>#include <hwdev.h>#include <netsrv.h>
Classes | |
| struct | VqDesc |
| struct | VqAvail |
| struct | VqUsed |
| struct | Queue |
Macros | |
| #define | NET_VENDOR 0x1AF4 |
| #define | NET_DEVICE 0x1041 |
| #define | VIRTIO_STATUS_ACK 1 |
| #define | VIRTIO_STATUS_DRIVER 2 |
| #define | VIRTIO_STATUS_DRIVER_OK 4 |
| #define | VIRTIO_STATUS_FEATURES_OK 8 |
| #define | VIRTQ_DESC_F_WRITE 2 |
| #define | QSZ 32 /* descriptors per queue */ |
| #define | BUF_SIZE 2048 |
| #define | NET_HDR 12 /* virtio_net_hdr with num_buffers */ |
| #define | C8(o) (*(volatile uint8_t*)(g_common + (o))) |
| #define | C16(o) (*(volatile uint16_t*)(g_common + (o))) |
| #define | C32(o) (*(volatile uint32_t*)(g_common + (o))) |
Functions | |
| int | main (int argc, char *argv[]) |
| #define BUF_SIZE 2048 |
| #define C16 | ( | o | ) | (*(volatile uint16_t*)(g_common + (o))) |
| #define C32 | ( | o | ) | (*(volatile uint32_t*)(g_common + (o))) |
| #define C8 | ( | o | ) | (*(volatile uint8_t*)(g_common + (o))) |
| #define NET_DEVICE 0x1041 |
| #define NET_HDR 12 /* virtio_net_hdr with num_buffers */ |
| #define NET_VENDOR 0x1AF4 |
| #define QSZ 32 /* descriptors per queue */ |
| #define VIRTIO_STATUS_ACK 1 |
| #define VIRTIO_STATUS_DRIVER 2 |
| #define VIRTIO_STATUS_DRIVER_OK 4 |
| #define VIRTIO_STATUS_FEATURES_OK 8 |
| #define VIRTQ_DESC_F_WRITE 2 |
| int main | ( | int | argc, |
| char * | argv[] | ||
| ) |