The Assimilation Project  based on Assimilation version 1.1.6.1462601511
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, gboolean(*authenticator)(const FrameSet *fs, NetAddr *))
 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 49 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 82 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 99 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 118 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.

Definition at line 47 of file authlistener.c.

References __FUNCTION__, cma.drawwithdot::action, _AuthListener::actionmap, _AuthListener::authenticator, _AuthListener::autoack, _NetAddr::baseclass, _FrameSet::baseclass, CASTTOCLASS, DUMP3, frameset_sender_identity(), frameset_sender_key_id(), FREE, _FrameSet::fstype, _AssimObj::toString, and UNREF.

Referenced by authlistener_new().

Here is the call graph for this function:

Here is the caller graph for this function:

AuthListener* authlistener_new ( gsize  objsize,
ObeyFrameSetTypeMap map,
ConfigContext config,
gboolean  autoack,
gboolean(*)(const FrameSet *fs, NetAddr *)  authenticator 
)

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
[in]authenticatorAuthentication function

Definition at line 133 of file authlistener.c.

References _authlistener_associate(), _authlistener_dissociate(), _authlistener_finalize(), _authlistener_got_frameset(), _AssimObj::_finalize, _ObeyFrameSetTypeMap::action, _AuthListener::actionmap, _Listener::associate, _AuthListener::authenticator, _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: