Xen Test Framework
Functions | Variables
xenbus.c File Reference
#include <xtf/atomic.h>
#include <xtf/bitops.h>
#include <xtf/hypercall.h>
#include <xtf/lib.h>
#include <xtf/traps.h>
#include <xtf/xenbus.h>
+ Include dependency graph for xenbus.c:

Go to the source code of this file.

Functions

void init_xenbus (xenbus_interface_t *ring, evtchn_port_t port)
 
static void xenbus_write (const void *data, size_t len)
 
static void xenbus_read (void *data, size_t len)
 
int xenstore_init (void)
 Initialise XTF ready for xenstore communication. More...
 
const char * xenstore_read (const char *path)
 Issue a XS_READ operation for key, waiting synchronously for the reply. More...
 

Variables

static xenbus_interface_txb_ring
 
static evtchn_port_t xb_port
 
static char payload [XENSTORE_PAYLOAD_MAX+1]
 

Function Documentation

◆ init_xenbus()

void init_xenbus ( xenbus_interface_t ring,
evtchn_port_t  port 
)

Definition at line 12 of file xenbus.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ xenbus_write()

static void xenbus_write ( const void *  data,
size_t  len 
)
static

Definition at line 25 of file xenbus.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ xenbus_read()

static void xenbus_read ( void *  data,
size_t  len 
)
static

Definition at line 69 of file xenbus.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ xenstore_init()

int xenstore_init ( void  )

Initialise XTF ready for xenstore communication.

May fail if there is no xenbus ring found.

Definition at line 109 of file xenbus.c.

+ Here is the caller graph for this function:

◆ xenstore_read()

const char * xenstore_read ( const char *  key)

Issue a XS_READ operation for key, waiting synchronously for the reply.

Returns NULL on error. The current implementation unmarshals data into a static buffer, so the return pointer is only valid until a subsequent xenstore operation.

Definition at line 115 of file xenbus.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Variable Documentation

◆ xb_ring

xenbus_interface_t* xb_ring
static

Definition at line 8 of file xenbus.c.

◆ xb_port

evtchn_port_t xb_port
static

Definition at line 9 of file xenbus.c.

◆ payload

char payload[XENSTORE_PAYLOAD_MAX+1]
static

Definition at line 10 of file xenbus.c.