Barrelfish
Data Structures | Functions
bulk_net_proxy.h File Reference

Proxy for connecting bulk transfer channels over a network connection. More...

Data Structures

struct  bulk_net_proxy
 

Functions

errval_t bulk_net_proxy_listen (struct bulk_net_proxy *p, struct bulk_endpoint_descriptor *desc, struct waitset *ws, size_t buffer_size, const char *card, uint8_t queue, uint16_t port, void(*connected)(struct bulk_net_proxy *))
 
errval_t bulk_net_proxy_connect (struct bulk_net_proxy *p, struct bulk_endpoint_descriptor *desc, struct waitset *ws, size_t buffer_size, const char *card, uint8_t queue, uint32_t ip, uint16_t port, void(*connected)(struct bulk_net_proxy *))
 

Detailed Description

Proxy for connecting bulk transfer channels over a network connection.

Function Documentation

errval_t bulk_net_proxy_connect ( struct bulk_net_proxy p,
struct bulk_endpoint_descriptor desc,
struct waitset ws,
size_t  buffer_size,
const char *  card,
uint8_t  queue,
uint32_t  ip,
uint16_t  port,
void(*)(struct bulk_net_proxy *)  connected 
)

Connect to listening proxy. Note that the proxy will bind to the bulk channel during the initialization phase, before actually receiving a connection request. But transfers on the channel (including the passing of buffers for the receive queue) must only be executed after the connected callback is called.

Parameters
pProxy struct
descBulk endpoint to bind to
wsWaitset
buffer_sizeSize of buffers to be transmitted over this proxy
cardNIC name in barrelfish
queueQueue ID to use
ipIP to connect to (host byte order)
portPort number to connect to (host byte order)
connectedCallback, will be invoked once the connection has been established.
errval_t bulk_net_proxy_listen ( struct bulk_net_proxy p,
struct bulk_endpoint_descriptor desc,
struct waitset ws,
size_t  buffer_size,
const char *  card,
uint8_t  queue,
uint16_t  port,
void(*)(struct bulk_net_proxy *)  connected 
)

Start listening proxy on the specified port. Note that the proxy will bind to the bulk channel during the initialization phase, before actually receiving a connection request. But transfers on the channel (including the passing of buffers for the receive queue) must only be executed after the connected callback is called.

Parameters
pProxy struct
descBulk endpoint to bind to
wsWaitset
buffer_sizeSize of buffers to be transmitted over this proxy
cardNIC name in barrelfish
queueQueue ID to use
portPort number to listen on (host byte order)
connectedCallback, will be invoked once an incoming connection has been established.