Main Page   Compound List   File List   Compound Members   File Members  

lib/router.c File Reference

Sysid router. More...

#include "gobj/router.h"
#include "gobj/comm.h"

Compounds

struct  gj_Route_struct
struct  Gj_Router_struct

Typedefs

typedef struct gj_Route_struct gj_Route
 Route structure typedef.


Enumerations

enum  Gj_RouteType_enum {
  GJ_ROUTETYPE_SYSENT
}
 Route types enum.


Functions

int Gj_router_new (Gj_Ctx* ctx)
 Create a new router.

int Gj_router_restore (Gj_Ctx* ctx, Gj_ContainerId id)
 Restore the router from a container. More...

void Gj_router_delete (Gj_Ctx* ctx)
 Delete the router.

int Gj_router_save (Gj_Ctx* ctx, Gj_ContainerId id)
 Save the router to a container. More...

gj_Routegj_router_readRoute (Gj_Ctx* ctx, Gj_Stream* stream)
 Read a route entry from a stream. More...

int Gj_router_readTable (Gj_Ctx* ctx, Gj_Stream* stream)
 Read the routing table from a stream. More...

int gj_router_writeRoute (Gj_Ctx* ctx, gj_Route* route, Gj_Stream* stream)
 Write a route entry to a stream. More...

int Gj_router_writeTable (Gj_Ctx* ctx, Gj_Stream* stream)
 Write the current routing table to a stream. More...

gj_Routegj_router_searchMatch (gj_Route* start, Gj_Sysid* sysid)
 Search the next matching route object containing the given sysid beginning with the given one. More...

Gj_CommGj_router_route (Gj_Ctx* ctx, Gj_Sysid* sysid, Gj_CommParam* param)
 Create a communication to the given system. More...

void Gj_router_addStaticRoute (Gj_Ctx* ctx, Gj_Sysid* sysid, Gj_Id* ifaceid, char* ifaceaddr)
 Add a static route. More...


Detailed Description

Sysid router.


Function Documentation

int Gj_router_restore ( Gj_Ctx * ctx,
Gj_ContainerId id )
 

Restore the router from a container.

Returns:
0 on success, -1 otherwise.

int Gj_router_save ( Gj_Ctx * ctx,
Gj_ContainerId id )
 

Save the router to a container.

Returns:
0 on success, -1 otherwise.

gj_Route * gj_router_readRoute ( Gj_Ctx * ctx,
Gj_Stream * stream )
 

Read a route entry from a stream.

Returns:
A pointer to the new entry on success, 0 otherwise.

For internal use only.

int Gj_router_readTable ( Gj_Ctx * ctx,
Gj_Stream * stream )
 

Read the routing table from a stream.

Returns:
0 on success, -1 otherwise.

int gj_router_writeRoute ( Gj_Ctx * ctx,
gj_Route * route,
Gj_Stream * stream )
 

Write a route entry to a stream.

Returns:
0 on success, -1 otherwise.

For internal use only.

int Gj_router_writeTable ( Gj_Ctx * ctx,
Gj_Stream * stream )
 

Write the current routing table to a stream.

Returns:
0 on success, -1 otherwise.

gj_Route * gj_router_searchMatch ( gj_Route * start,
Gj_Sysid * sysid )
 

Search the next matching route object containing the given sysid beginning with the given one.

Returns:
A pointer to the route object on success, 0 otherwise.

For internal use only.

Gj_Comm * Gj_router_route ( Gj_Ctx * ctx,
Gj_Sysid * sysid,
Gj_CommParam * param )
 

Create a communication to the given system.

Returns:
A pointer to the communication structure to the given system, 0 otherwise.

void Gj_router_addStaticRoute ( Gj_Ctx * ctx,
Gj_Sysid * sysid,
Gj_Id * ifaceid,
char * ifaceaddr )
 

Add a static route.

All ids and strings are DUPLICATED.


Generated at Fri Aug 17 18:28:59 2001 for Gobj by doxygen1.2.1 written by Dimitri van Heesch, © 1997-2000