XenevaOS
Loading...
Searching...
No Matches
Classes | Macros | Functions
main.cpp File Reference
#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>
Include dependency graph for main.cpp:

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[])
 

Macro Definition Documentation

◆ BUF_SIZE

#define BUF_SIZE   2048

◆ C16

#define C16 (   o)    (*(volatile uint16_t*)(g_common + (o)))

◆ C32

#define C32 (   o)    (*(volatile uint32_t*)(g_common + (o)))

◆ C8

#define C8 (   o)    (*(volatile uint8_t*)(g_common + (o)))

◆ NET_DEVICE

#define NET_DEVICE   0x1041

◆ NET_HDR

#define NET_HDR   12 /* virtio_net_hdr with num_buffers */

◆ NET_VENDOR

#define NET_VENDOR   0x1AF4

◆ QSZ

#define QSZ   32 /* descriptors per queue */

◆ VIRTIO_STATUS_ACK

#define VIRTIO_STATUS_ACK   1

◆ VIRTIO_STATUS_DRIVER

#define VIRTIO_STATUS_DRIVER   2

◆ VIRTIO_STATUS_DRIVER_OK

#define VIRTIO_STATUS_DRIVER_OK   4

◆ VIRTIO_STATUS_FEATURES_OK

#define VIRTIO_STATUS_FEATURES_OK   8

◆ VIRTQ_DESC_F_WRITE

#define VIRTQ_DESC_F_WRITE   2

Function Documentation

◆ main()

int main ( int  argc,
char *  argv[] 
)