aura  0.1
 All Data Structures Functions Variables Modules Pages
Transport plugins API

Data Structures

struct  aura_transport
 

Functions

void aura_call_fail (struct aura_node *node, struct aura_object *o)
 
void aura_set_status (struct aura_node *node, int status)
 
void aura_set_node_endian (struct aura_node *node, enum aura_endianness en)
 
static void aura_set_transportdata (struct aura_node *node, void *udata)
 
static void * aura_get_transportdata (struct aura_node *node)
 
void aura_queue_buffer (struct list_head *queue, struct aura_buffer *buf)
 
struct aura_bufferaura_peek_buffer (struct list_head *head)
 
struct aura_bufferaura_dequeue_buffer (struct list_head *head)
 
void aura_requeue_buffer (struct list_head *list, struct aura_buffer *buf)
 

Detailed Description

This chapter describes the transport API. You will have to use this API to create your own transports.

To create a transport module you have to do the following:

The simplest example is below:

#include <aura/aura.h>
#include <aura/private.h>
(your code here)
static struct aura_transport dummy = {
.name = "dummy",
.open = dummy_open,
.close = dummy_close,
.loop = dummy_loop,
.buffer_overhead = 16,
.buffer_offset = 8
};
AURA_TRANSPORT(dummy);

Function Documentation

void aura_call_fail ( struct aura_node *  node,
struct aura_object *  o 
)

Report this call as failed to the core

Parameters
node
o
buf

Definition at line 789 of file aura.c.

struct aura_buffer* aura_dequeue_buffer ( struct list_head head)

Dequeue the next buffer from a queue and return it. This functions sets buffer's internal data pointer to the beginning of serialized data by calling aura_buffer_rewind() internally

Parameters
head
Returns

Definition at line 45 of file queue.c.

References aura_buffer_rewind(), and aura_peek_buffer().

Referenced by aura_get_next_event().

static void* aura_get_transportdata ( struct aura_node *  node)
inlinestatic

Get transport-specific data for this node

Parameters
node
udata

Definition at line 69 of file inlines.h.

struct aura_buffer* aura_peek_buffer ( struct list_head head)

Dequeue the next buffer from a queue and

Parameters
head
Returns

Definition at line 28 of file queue.c.

References aura_buffer::qentry.

Referenced by aura_dequeue_buffer().

void aura_queue_buffer ( struct list_head queue,
struct aura_buffer buf 
)

Add an aura_buffer to a queue. This functions sets buffer's internal data pointer to the beginning of serialized data by calling aura_buffer_rewind() internally

Parameters
queue
buf

Definition at line 16 of file queue.c.

References aura_buffer_rewind(), and aura_buffer::qentry.

Referenced by aura_core_start_call().

void aura_requeue_buffer ( struct list_head list,
struct aura_buffer buf 
)

Put the buffer back to the start of the queue.

Parameters
head
Returns

Definition at line 62 of file queue.c.

References aura_buffer::qentry.

void aura_set_node_endian ( struct aura_node *  node,
enum aura_endianness  en 
)

Set node endianness. This function should be called by transport when it knows the remote endianness before any of the actual calls are made.

Parameters
node
en

Definition at line 870 of file aura.c.

void aura_set_status ( struct aura_node *  node,
int  status 
)

Change node status. This function should be called by transport plugins whenever the node changes the status

Parameters
node
status

Definition at line 808 of file aura.c.

static void aura_set_transportdata ( struct aura_node *  node,
void *  udata 
)
inlinestatic

Set transport-specific data for this node

Parameters
node
udata

Definition at line 60 of file inlines.h.