The Assimilation Project
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
AuthListener class.

Class for listening, authenticating, and obeying packets from the Collective Authority. More...

Collaboration diagram for AuthListener class.:

Macros

#define ONESEC   1000000
 

Functions

FSTATIC gboolean _authlistener_got_frameset (Listener *self, FrameSet *fs, NetAddr *addr)
 Function called when a FrameSet class arrived from the given NetAddr class. More...
 
FSTATIC void _authlistener_associate (Listener *self, NetGSource *transport)
 
FSTATIC void _authlistener_dissociate (Listener *self)
 
FSTATIC void _authlistener_finalize (AssimObj *aself)
 Finalize a Listener. More...
 
AuthListenerauthlistener_new (gsize objsize, ObeyFrameSetTypeMap *map, ConfigContext *config, gboolean autoack)
 Construct a new Listener - setting up GSource and timeout data structures for it. More...
 
typedef struct _ObeyFrameSetTypeMap ObeyFrameSetTypeMap
 
typedef void(* AuthListenerAction )(AuthListener *, FrameSet *, NetAddr *)
 

Detailed Description

Class for listening, authenticating, and obeying packets from the Collective Authority.

Macro Definition Documentation

#define ONESEC   1000000

Definition at line 43 of file authlistener.c.

Typedef Documentation

typedef void(* AuthListenerAction)(AuthListener *, FrameSet *, NetAddr *)

Definition at line 48 of file authlistener.h.

Definition at line 36 of file authlistener.h.

Function Documentation

FSTATIC void _authlistener_associate ( Listener self,
NetGSource transport 
)

Definition at line 72 of file authlistener.c.

References _NetGSource::addListener, CASTTOCLASS, _Listener::dissociate, _Listener::transport, and transport.

Referenced by authlistener_new().

Here is the caller graph for this function:

FSTATIC void _authlistener_dissociate ( Listener self)

Definition at line 89 of file authlistener.c.

References _NetGSource::addListener, CASTTOCLASS, and _Listener::transport.

Referenced by authlistener_new().

Here is the caller graph for this function:

FSTATIC void _authlistener_finalize ( AssimObj aself)

Finalize a Listener.

Parameters
[in,out]aselfListener to finalize

Definition at line 108 of file authlistener.c.

References _listener_finalize(), and CASTTOCLASS.

Referenced by authlistener_new().

Here is the call graph for this function:

Here is the caller graph for this function:

FSTATIC gboolean _authlistener_got_frameset ( Listener self,
FrameSet fs,
NetAddr addr 
)

Function called when a FrameSet class arrived from the given NetAddr class.

Todo:
need to authorize the sender of this FrameSet class before acting on it...

Definition at line 47 of file authlistener.c.

References __FUNCTION__, _AuthListener::actionmap, _AuthListener::autoack, _FrameSet::baseclass, CASTTOCLASS, DUMP3, _FrameSet::fstype, and UNREF.

Referenced by authlistener_new().

Here is the caller graph for this function:

AuthListener* authlistener_new ( gsize  objsize,
ObeyFrameSetTypeMap map,
ConfigContext config,
gboolean  autoack 
)

Construct a new Listener - setting up GSource and timeout data structures for it.

Create an AuthListener.

This can be used directly or by derived classes.

Parameters
[in]objsizesize of Listener structure (0 for sizeof(Listener))
[in]mapNULL-terminated map of FrameSet types to action functions -
[in,out]configconfiguration context
[in]autoackTRUE if the authlistener should do the ACKing for us

Definition at line 123 of file authlistener.c.

References _authlistener_associate(), _authlistener_dissociate(), _authlistener_finalize(), _authlistener_got_frameset(), _AssimObj::_finalize, _ObeyFrameSetTypeMap::action, _AuthListener::actionmap, _Listener::associate, _AuthListener::autoack, _Listener::baseclass, _AuthListener::baseclass, BINDDEBUG, _Listener::dissociate, _ObeyFrameSetTypeMap::framesettype, _Listener::got_frameset, listener_new(), and NEWSUBCLASS.

Referenced by main(), and nano_start_full().

Here is the call graph for this function:

Here is the caller graph for this function: