The standard gateway that interconnect module across process. More...
Inherits NLNET::CModuleBase, NLNET::CModuleGateway, and NLNET::CModuleSocket.
Classes | |
| struct | TKnownModuleInfo |
| A structure to hold foreign proxy information. More... | |
Public Member Functions | |
| CStandardGateway () | |
| ~CStandardGateway () | |
| CModuleProxy * | getModuleProxy (TModuleId proxyId) |
| virtual const std::string & | getGatewayName () const |
| Return the local name of the gateway. | |
| virtual const std::string & | getFullyQualifiedGatewayName () const |
| Return the Fully Qualified Gateway Name (FQGN). | |
| virtual void | createTransport (const std::string &transportClass, const std::string &instanceName) |
| Create and bind to this gateway a new transport. | |
| virtual void | deleteTransport (const std::string &instanceName) |
| Delete a transport (this will close any open route). | |
| virtual void | setTransportPeerInvisible (const std::string &transportInstanceName, bool peerInvisible) |
| Activate/stop peer invisible mode on a transport. | |
| virtual void | setTransportFirewallMode (const std::string &transportInstanceName, bool firewalled) throw (EGatewayFirewallBreak) |
| Activate/stop firewalling mode on a transport. | |
| virtual void | transportCommand (const TParsedCommandLine &commandLine) |
| Send a command to a transport. | |
| virtual IGatewayTransport * | getGatewayTransport (const std::string &transportName) const |
| Return a pointer on the named transport interface, or NULL if the transport is unknown. | |
| virtual uint32 | getTransportCount () const |
| Return the number of transport currently active on this gateway. | |
| virtual uint32 | getRouteCount () const |
| Return the number route available. | |
| virtual uint32 | getReceivedPingCount () const |
| Return the number of ping received. This is incremented by special "GW_PING" message for unit testing. | |
| virtual void | onRouteAdded (CGatewayRoute *route) |
| A new route a added by a transport. | |
| virtual void | onRouteRemoved (CGatewayRoute *route) |
| A route is removed by a transport. | |
| virtual void | onReceiveMessage (CGatewayRoute *from, const CMessage &msgin) |
| A transport have received a message. | |
| virtual void | createSecurityPlugin (const std::string &className) |
| create a security plug-in. | |
| virtual void | sendSecurityCommand (const TParsedCommandLine &command) |
| Send a command to the security plug-in. | |
| virtual void | removeSecurityPlugin () |
| Remove the security plug-in. | |
| void | setSecurityData (IModuleProxy *proxy, TSecurityData *securityData) |
| Set a security data block. | |
| bool | removeSecurityData (IModuleProxy *proxy, uint8 dataTag) |
| Clear a block of security data The block is identified by the data tag. | |
| void | replaceAllSecurityDatas (IModuleProxy *proxy, TSecurityData *securityData) |
| void | forceSecurityUpdate (IModuleProxy *proxy) |
| Ask the gateway to resend the security data. | |
| void | onReceiveModuleMessage (CGatewayRoute *from, const CMessage &msgin) |
| A gateway receive module operation. | |
| void | onReceiveModuleMessageHeader (CGatewayRoute *from, const CMessage &msgin) |
| void | onReceiveModuleUpdate (CGatewayRoute *from, const CMessage &msgin) |
| A gateway receive a general update message. | |
| void | onReceiveModuleAdd (CGatewayRoute *from, const CMessage &msgin) |
| A gateway send new modules informations. | |
| void | onReceiveModuleRemove (CGatewayRoute *from, const CMessage &msgin) |
| void | onReceiveModuleDistanceUpdate (CGatewayRoute *from, const CMessage &msgin) |
| void | onReceiveModuleSecurityUpdate (CGatewayRoute *from, const CMessage &msgin) |
| virtual void | onAddModuleProxy (IModuleProxy *addedModule) |
| Callback called when the gateway has received some new module and eventually, need to disclose the module information to the connected gateway. | |
| virtual void | onRemoveModuleProxy (IModuleProxy *removedModule) |
| Callback called when a module become unavailable, either because it is unplugged from it's socket, or, the gateway that disclosed it has been disconnected. | |
| virtual void | discloseModule (IModuleProxy *moduleProxy) throw (EGatewayNotConnected) |
| Disclose module information to a connected gateway. | |
| virtual IModuleProxy * | getPluggedModuleProxy (IModule *pluggedModule) |
| Retrieve the proxy for a locally plugged module. | |
| virtual uint32 | getProxyCount () const |
| Return the number of proxies managed by this gateway. | |
| virtual void | getModuleProxyList (std::vector< IModuleProxy * > &resultList) const |
| Fill a vector with the list of proxies managed here. The module are filled in ascending proxy id order. | |
| virtual void | sendModuleMessage (IModuleProxy *senderProxy, IModuleProxy *addresseeProxy, const NLNET::CMessage &message) |
| Callback called when a message arrive from a gateway and need to be dispatched. | |
| virtual void | dispatchModuleMessage (IModuleProxy *senderProxy, IModuleProxy *addresseeProxy, const CMessage &message) |
| Send a message to the module plugged in this gateway. | |
| bool | initModule (const TParsedCommandLine &initInfo) |
| Module initialization. | |
| std::string | buildModuleManifest () const |
| Building of the manifest string can involve interceptors. | |
| void | onServiceUp (const std::string &, NLNET::TServiceId) |
| A Nel layer 5 service has started. | |
| void | onServiceDown (const std::string &, NLNET::TServiceId) |
| A Nel layer 5 service has stopped. | |
| void | onModuleUpdate () |
| Regular update from application. | |
| void | onApplicationExit () |
| The service main loop is terminating it job', all module while be disconnected and removed after this callback. | |
| void | onModuleUp (IModuleProxy *) |
| Called by a socket to inform this module that another module has been created OR has been made accessible (due to a gateway connection). | |
| void | onModuleDown (IModuleProxy *) |
| Called by a socket to inform this module that another module has been deleted OR has been no more accessible (due to some gateway disconnection). | |
| bool | onProcessModuleMessage (IModuleProxy *, const CMessage &message) |
| Called internally by basic module imp to process the message by application code. | |
| void | onModuleSecurityChange (IModuleProxy *) |
| Called by a socket to inform this module that the security data attached to a proxy have changed. | |
| void | onModuleSocketEvent (IModuleSocket *, TModuleSocketEvent) |
| const std::string & | getSocketName () |
| Ask derived class to obtain the socket name. | |
| void | _sendModuleMessage (IModule *senderModule, TModuleId destModuleProxyId, const NLNET::CMessage &message) throw (EModuleNotReachable, EModuleNotPluggedHere) |
| virtual void | _broadcastModuleMessage (IModule *senderModule, const NLNET::CMessage &message) throw (EModuleNotPluggedHere) |
| void | onModulePlugged (IModule *pluggedModule) |
| Called just after a module is plugged in the socket. | |
| void | onModuleUnplugged (IModule *unpluggedModule) |
| Called just after a module as been effectively unplugged from a socket. | |
| void | removeForeignModule (CGatewayRoute *route, TModuleId foreignModuleId) |
| void | sendModuleDistanceUpdate (IModuleProxy *proxy) |
| bool | isModuleProxyVisible (IModuleProxy *proxy, CGatewayRoute *route) |
| Check if a module can be seen by a route. | |
| void | discloseModuleToRoute (CGatewayRoute *route, IModuleProxy *proxy) |
| Disclose module information to a gateway route. | |
| void | undiscloseModuleToRoute (CGatewayRoute *route, IModuleProxy *proxy) |
| Undisclose module information to a gateway route. | |
| void | updateModuleDistanceToRoute (CGatewayRoute *route, IModuleProxy *proxy) |
| the distance of a module need to be update to peers | |
| void | updateModuleSecurityDataToRoute (CGatewayRoute *route, IModuleProxy *proxy) |
| The security data need to be updated to peers. | |
| void | sendPendingModuleUpdate (CGatewayRoute *route) |
| void | getModuleList (std::vector< IModuleProxy * > &resultList) |
| Fill the resultList with the list of module that are reachable with this socket. | |
| NLMISC_COMMAND_HANDLER_TABLE_END | NLMISC_CLASS_COMMAND_DECL (securityRemove) |
| NLMISC_CLASS_COMMAND_DECL (securityCommand) | |
| NLMISC_CLASS_COMMAND_DECL (securityCreate) | |
| NLMISC_CLASS_COMMAND_DECL (securityListAvailableClass) | |
| NLMISC_CLASS_COMMAND_DECL (transportRemove) | |
| NLMISC_CLASS_COMMAND_DECL (transportCmd) | |
| NLMISC_CLASS_COMMAND_DECL (transportOptions) | |
| NLMISC_CLASS_COMMAND_DECL (transportAdd) | |
| NLMISC_CLASS_COMMAND_DECL (transportListAvailableClass) | |
| NLMISC_CLASS_COMMAND_DECL (dump) | |
| base module command table | |
Private Types | |
| typedef map< TModuleId, TModuleProxyPtr > | TModuleProxies |
| typedef CTwinMap< TStringId, TModuleProxyPtr > | TNamedProxyIdx |
| typedef multimap< TStringId, TKnownModuleInfo > | TKnownModuleInfos |
| typedef map< TModuleId, TModuleId > | TLocalModuleIndex |
| typedef map< std::string, IGatewayTransport * > | TTransportList |
| typedef set< CGatewayRoute * > | TRouteList |
| typedef std::list< TLocalMessage > | TLocalMessageList |
Private Attributes | |
| TModuleProxies | _ModuleProxies |
| Module proxies managed by this gateway. The map key is the module proxy id. | |
| TNamedProxyIdx | _NameToProxyIdx |
| Index of name to proxy id. | |
| TKnownModuleInfos | _KnownModules |
| List of known foreign module info. | |
| TLocalModuleIndex | _LocalModuleIndex |
| Translation table to find module proxies for locally plugged module The map key is the local module id, the data is the associated proxy id. | |
| TTransportList | _Transports |
| the list of active transport | |
| TRouteList | _Routes |
| CGatewaySecurity * | _SecurityPlugin |
| The security plug-in (if any). | |
| uint32 | _PingCounter |
| Ping counter for debug purpose. | |
| TLocalMessageList | _LocalMessages |
| List of local message waiting dispatching at next update. | |
The standard gateway that interconnect module across process.
Definition at line 253 of file module_gateway.cpp.
typedef multimap<TStringId, TKnownModuleInfo> NLNET::CStandardGateway::TKnownModuleInfos [private] |
Definition at line 275 of file module_gateway.cpp.
typedef std::list<TLocalMessage> NLNET::CStandardGateway::TLocalMessageList [private] |
Definition at line 299 of file module_gateway.cpp.
typedef map<TModuleId, TModuleId> NLNET::CStandardGateway::TLocalModuleIndex [private] |
Definition at line 280 of file module_gateway.cpp.
typedef map<TModuleId, TModuleProxyPtr> NLNET::CStandardGateway::TModuleProxies [private] |
Definition at line 258 of file module_gateway.cpp.
typedef CTwinMap<TStringId, TModuleProxyPtr> NLNET::CStandardGateway::TNamedProxyIdx [private] |
Definition at line 262 of file module_gateway.cpp.
typedef set<CGatewayRoute*> NLNET::CStandardGateway::TRouteList [private] |
Definition at line 289 of file module_gateway.cpp.
typedef map<std::string, IGatewayTransport*> NLNET::CStandardGateway::TTransportList [private] |
Definition at line 285 of file module_gateway.cpp.
| NLNET::CStandardGateway::CStandardGateway | ( | ) | [inline] |
Definition at line 305 of file module_gateway.cpp.
| NLNET::CStandardGateway::~CStandardGateway | ( | ) | [inline] |
Definition at line 311 of file module_gateway.cpp.
References NLNET::CModuleSocket::_PluggedModules, _SecurityPlugin, _Transports, deleteTransport(), NLMISC::CTwinMap< TypeA, TypeB >::getAToBMap(), removeSecurityPlugin(), NLNET::CModuleGateway::unregisterGateway(), and NLNET::CModuleSocket::unregisterSocket().
| virtual void NLNET::CStandardGateway::_broadcastModuleMessage | ( | IModule * | senderModule, | |
| const NLNET::CMessage & | message | |||
| ) | throw (EModuleNotPluggedHere) [inline, virtual] |
Implements NLNET::CModuleSocket.
Definition at line 1594 of file module_gateway.cpp.
References _LocalModuleIndex, _ModuleProxies, H_AUTO, nlassert, and NLNET::IModuleProxy::sendModuleMessage().
| void NLNET::CStandardGateway::_sendModuleMessage | ( | IModule * | senderModule, | |
| TModuleId | destModuleProxyId, | |||
| const NLNET::CMessage & | message | |||
| ) | throw (EModuleNotReachable, EModuleNotPluggedHere) [inline, virtual] |
Implements NLNET::CModuleSocket.
Definition at line 1570 of file module_gateway.cpp.
References _LocalModuleIndex, _ModuleProxies, nlassert, and sendModuleMessage().
| std::string NLNET::CStandardGateway::buildModuleManifest | ( | ) | const [inline, virtual] |
Building of the manifest string can involve interceptors.
The system will call this function on each interceptor and concatenate the returned strings to build the manifest string. A default implementation is given that return an emty string.
Reimplemented from NLNET::IModuleInterceptable.
Definition at line 1458 of file module_gateway.cpp.
| virtual void NLNET::CStandardGateway::createSecurityPlugin | ( | const std::string & | className | ) | [inline, virtual] |
create a security plug-in.
There must be no security plug-in currently created.
Implements NLNET::IModuleGateway.
Definition at line 669 of file module_gateway.cpp.
References _ModuleProxies, _SecurityPlugin, NLNET::CGatewaySecurity::TCtorParam::Gateway, NLMISC_GET_FACTORY, nlwarning, and NLNET::CGatewaySecurity::onNewProxy().
Referenced by NLMISC_CLASS_COMMAND_DECL().
| virtual void NLNET::CStandardGateway::createTransport | ( | const std::string & | transportClass, | |
| const std::string & | instanceName | |||
| ) | [inline, virtual] |
Create and bind to this gateway a new transport.
Implements NLNET::IModuleGateway.
Definition at line 355 of file module_gateway.cpp.
References _Transports, NLNET::IGatewayTransport::TCtorParam::Gateway, nldebug, NLMISC_GET_FACTORY, and nlwarning.
Referenced by NLMISC_CLASS_COMMAND_DECL().
| virtual void NLNET::CStandardGateway::deleteTransport | ( | const std::string & | instanceName | ) | [inline, virtual] |
Delete a transport (this will close any open route).
Implements NLNET::IModuleGateway.
Definition at line 382 of file module_gateway.cpp.
References _Transports, nldebug, and nlwarning.
Referenced by NLMISC_CLASS_COMMAND_DECL(), onApplicationExit(), and ~CStandardGateway().
| virtual void NLNET::CStandardGateway::discloseModule | ( | IModuleProxy * | moduleProxy | ) | throw (EGatewayNotConnected) [inline, virtual] |
Disclose module information to a connected gateway.
This can also be this gateway itself.
Implements NLNET::IModuleGateway.
Definition at line 1255 of file module_gateway.cpp.
References NLNET::IModule::_onModuleUp(), NLNET::CModuleSocket::_PluggedModules, NLMISC::CTwinMap< TypeA, TypeB >::getAToBMap(), NLNET::IModule::getModuleId(), and nlassert.
Referenced by onAddModuleProxy().
| void NLNET::CStandardGateway::discloseModuleToRoute | ( | CGatewayRoute * | route, | |
| IModuleProxy * | proxy | |||
| ) | [inline] |
Disclose module information to a gateway route.
Definition at line 1936 of file module_gateway.cpp.
References NLNET::CGatewayRoute::TPendingEvent::EventType, NLNET::IModuleProxy::getModuleProxyId(), NLNET::CGatewayRoute::TPendingEvent::ModuleId, NLNET::CGatewayRoute::PendingEvents, and NLNET::CGatewayRoute::pet_disclose_module.
Referenced by onAddModuleProxy(), onRouteAdded(), sendModuleMessage(), setTransportFirewallMode(), and setTransportPeerInvisible().
| virtual void NLNET::CStandardGateway::dispatchModuleMessage | ( | IModuleProxy * | senderProxy, | |
| IModuleProxy * | addresseeProxy, | |||
| const CMessage & | message | |||
| ) | [inline, virtual] |
Send a message to the module plugged in this gateway.
You can override this method to change the dispatching, add filtering, message hacking or interceptor.
Implements NLNET::IModuleGateway.
Definition at line 1403 of file module_gateway.cpp.
References NLNET::CModuleSocket::_PluggedModules, NLNET::CMessage::Except, NLMISC::CTwinMap< TypeA, TypeB >::getB(), NLNET::IModuleProxy::getForeignModuleId(), NLNET::IModuleProxy::getGatewayRoute(), NLNET::IModuleProxy::getModuleName(), NLNET::CMessage::getName(), NLNET::CMessage::getType(), H_AUTO, nlassert, nlwarning, NLNET::IModule::onReceiveModuleMessage(), NLNET::CMessage::Request, NLNET::IModuleProxy::sendModuleMessage(), and NLNET::CMessage::setType().
Referenced by onModuleUpdate(), and sendModuleMessage().
| void NLNET::CStandardGateway::forceSecurityUpdate | ( | IModuleProxy * | proxy | ) | [inline] |
Ask the gateway to resend the security data.
The plug-in call this method after having changed the security info for a plug-in outside of the onNewProxy call.
Definition at line 804 of file module_gateway.cpp.
References _Routes, isModuleProxyVisible(), and updateModuleSecurityDataToRoute().
Referenced by NLNET::CGatewaySecurity::forceSecurityUpdate().
| virtual const std::string& NLNET::CStandardGateway::getFullyQualifiedGatewayName | ( | ) | const [inline, virtual] |
Return the Fully Qualified Gateway Name (FQGN).
Implements NLNET::IModuleGateway.
Definition at line 349 of file module_gateway.cpp.
References NLNET::CModuleBase::getModuleFullyQualifiedName().
| virtual const std::string& NLNET::CStandardGateway::getGatewayName | ( | ) | const [inline, virtual] |
Return the local name of the gateway.
Implements NLNET::IModuleGateway.
Definition at line 345 of file module_gateway.cpp.
References NLNET::CModuleBase::getModuleName().
Referenced by onReceiveModuleAdd(), onReceiveModuleDistanceUpdate(), and removeForeignModule().
| virtual IGatewayTransport* NLNET::CStandardGateway::getGatewayTransport | ( | const std::string & | transportName | ) | const [inline, virtual] |
Return a pointer on the named transport interface, or NULL if the transport is unknown.
Implements NLNET::IModuleGateway.
Definition at line 538 of file module_gateway.cpp.
References _Transports.
| void NLNET::CStandardGateway::getModuleList | ( | std::vector< IModuleProxy * > & | resultList | ) | [inline, virtual] |
Fill the resultList with the list of module that are reachable with this socket.
Note that the result vector is not cleared before filling.
Implements NLNET::IModuleSocket.
Definition at line 2100 of file module_gateway.cpp.
References _ModuleProxies.
| CModuleProxy* NLNET::CStandardGateway::getModuleProxy | ( | TModuleId | proxyId | ) | [inline] |
Definition at line 334 of file module_gateway.cpp.
References _ModuleProxies.
Referenced by onModuleUpdate(), onReceiveModuleSecurityUpdate(), and sendPendingModuleUpdate().
| virtual void NLNET::CStandardGateway::getModuleProxyList | ( | std::vector< IModuleProxy * > & | resultList | ) | const [inline, virtual] |
Fill a vector with the list of proxies managed here. The module are filled in ascending proxy id order.
Implements NLNET::IModuleGateway.
Definition at line 1293 of file module_gateway.cpp.
References _ModuleProxies.
| virtual IModuleProxy* NLNET::CStandardGateway::getPluggedModuleProxy | ( | IModule * | pluggedModule | ) | [inline, virtual] |
Retrieve the proxy for a locally plugged module.
Each local module plugged in a gateway has an associated proxy. This method return this proxy or NULL if the module is not plugged here.
Implements NLNET::IModuleGateway.
Definition at line 1273 of file module_gateway.cpp.
References _LocalModuleIndex, _ModuleProxies, NLNET::IModule::getModuleId(), and nlassert.
| virtual uint32 NLNET::CStandardGateway::getProxyCount | ( | ) | const [inline, virtual] |
Return the number of proxies managed by this gateway.
Implements NLNET::IModuleGateway.
Definition at line 1287 of file module_gateway.cpp.
References _ModuleProxies.
| virtual uint32 NLNET::CStandardGateway::getReceivedPingCount | ( | ) | const [inline, virtual] |
Return the number of ping received. This is incremented by special "GW_PING" message for unit testing.
Implements NLNET::IModuleGateway.
Definition at line 558 of file module_gateway.cpp.
References _PingCounter.
| virtual uint32 NLNET::CStandardGateway::getRouteCount | ( | ) | const [inline, virtual] |
Return the number route available.
Implements NLNET::IModuleGateway.
Definition at line 553 of file module_gateway.cpp.
References _Routes.
| const std::string& NLNET::CStandardGateway::getSocketName | ( | ) | [inline, virtual] |
Ask derived class to obtain the socket name.
Implements NLNET::IModuleSocket.
Definition at line 1565 of file module_gateway.cpp.
References NLNET::CModuleBase::getModuleName().
| virtual uint32 NLNET::CStandardGateway::getTransportCount | ( | ) | const [inline, virtual] |
Return the number of transport currently active on this gateway.
Implements NLNET::IModuleGateway.
Definition at line 548 of file module_gateway.cpp.
References _Transports.
| bool NLNET::CStandardGateway::initModule | ( | const TParsedCommandLine & | initInfo | ) | [inline, virtual] |
Module initialization.
If the initialization return false, then the module manager deleted the module immediately.
Reimplemented from NLNET::CModuleBase.
Definition at line 1446 of file module_gateway.cpp.
References NLNET::CModuleGateway::registerGateway(), and NLNET::CModuleSocket::registerSocket().
| bool NLNET::CStandardGateway::isModuleProxyVisible | ( | IModuleProxy * | proxy, | |
| CGatewayRoute * | route | |||
| ) | [inline] |
Check if a module can be seen by a route.
Definition at line 1891 of file module_gateway.cpp.
References NLNET::CGatewayRoute::FirewallDisclosed, NLNET::IGatewayTransport::Firewalled, NLNET::CGatewayRoute::ForeignToLocalIdx, NLNET::IModuleProxy::getGatewayRoute(), NLNET::IModuleProxy::getModuleProxyId(), NLNET::CGatewayRoute::getTransport(), and NLNET::IGatewayTransport::PeerInvisible.
Referenced by forceSecurityUpdate(), onAddModuleProxy(), onReceiveModuleSecurityUpdate(), onRemoveModuleProxy(), onRouteAdded(), sendModuleDistanceUpdate(), and sendModuleMessage().
| NLNET::CStandardGateway::NLMISC_CLASS_COMMAND_DECL | ( | dump | ) | [inline] |
base module command table
Reimplemented from NLNET::CModuleBase.
Definition at line 2328 of file module_gateway.cpp.
References NLNET::CModuleSocket::_PluggedModules, _Transports, NLNET::IGatewayTransport::dump(), NL3D::dump(), NLNET::IGatewayTransport::Firewalled, NLMISC::CTwinMap< TypeA, TypeB >::getAToBMap(), NLNET::IGatewayTransport::getClassName(), NLNET::IModule::getModuleClassName(), NLNET::IModule::getModuleId(), NLNET::IModule::getModuleName(), NLMISC_CLASS_COMMAND_CALL_BASE, and NLNET::IGatewayTransport::PeerInvisible.
| NLNET::CStandardGateway::NLMISC_CLASS_COMMAND_DECL | ( | transportListAvailableClass | ) | [inline] |
Definition at line 2307 of file module_gateway.cpp.
References NLMISC_GET_FACTORY, and NLNET::nlunreferenced().
| NLNET::CStandardGateway::NLMISC_CLASS_COMMAND_DECL | ( | transportAdd | ) | [inline] |
Definition at line 2288 of file module_gateway.cpp.
References _Transports, createTransport(), and NLNET::nlunreferenced().
| NLNET::CStandardGateway::NLMISC_CLASS_COMMAND_DECL | ( | transportOptions | ) | [inline] |
Definition at line 2248 of file module_gateway.cpp.
References _Transports, NLNET::nlunreferenced(), NLNET::TParsedCommandLine::parseParamList(), setTransportFirewallMode(), setTransportPeerInvisible(), and NLNET::TParsedCommandLine::SubParams.
| NLNET::CStandardGateway::NLMISC_CLASS_COMMAND_DECL | ( | transportCmd | ) | [inline] |
Definition at line 2231 of file module_gateway.cpp.
References NLNET::nlunreferenced(), NLNET::TParsedCommandLine::parseParamList(), and transportCommand().
| NLNET::CStandardGateway::NLMISC_CLASS_COMMAND_DECL | ( | transportRemove | ) | [inline] |
Definition at line 2217 of file module_gateway.cpp.
References deleteTransport(), and NLNET::nlunreferenced().
| NLNET::CStandardGateway::NLMISC_CLASS_COMMAND_DECL | ( | securityListAvailableClass | ) | [inline] |
Definition at line 2195 of file module_gateway.cpp.
References NLMISC_GET_FACTORY, and NLNET::nlunreferenced().
| NLNET::CStandardGateway::NLMISC_CLASS_COMMAND_DECL | ( | securityCreate | ) | [inline] |
Definition at line 2172 of file module_gateway.cpp.
References _SecurityPlugin, createSecurityPlugin(), NLNET::CModuleBase::getModuleName(), and NLNET::nlunreferenced().
| NLNET::CStandardGateway::NLMISC_CLASS_COMMAND_DECL | ( | securityCommand | ) | [inline] |
Definition at line 2141 of file module_gateway.cpp.
References _SecurityPlugin, NLNET::nlunreferenced(), NLNET::TParsedCommandLine::parseParamList(), sendSecurityCommand(), and NLNET::TParsedCommandLine::SubParams.
| NLMISC_COMMAND_HANDLER_TABLE_END NLNET::CStandardGateway::NLMISC_CLASS_COMMAND_DECL | ( | securityRemove | ) | [inline] |
Definition at line 2123 of file module_gateway.cpp.
References _SecurityPlugin, NLNET::nlunreferenced(), and removeSecurityPlugin().
| virtual void NLNET::CStandardGateway::onAddModuleProxy | ( | IModuleProxy * | addedModule | ) | [inline, virtual] |
Callback called when the gateway has received some new module and eventually, need to disclose the module information to the connected gateway.
The default behavior is to disclose the module to all connected gateway.
Implements NLNET::IModuleGateway.
Definition at line 1201 of file module_gateway.cpp.
References _Routes, discloseModule(), discloseModuleToRoute(), H_AUTO, and isModuleProxyVisible().
Referenced by onModulePlugged(), and onReceiveModuleAdd().
| void NLNET::CStandardGateway::onApplicationExit | ( | ) | [inline, virtual] |
The service main loop is terminating it job', all module while be disconnected and removed after this callback.
Implements NLNET::IModule.
Definition at line 1525 of file module_gateway.cpp.
References _Transports, and deleteTransport().
| void NLNET::CStandardGateway::onModuleDown | ( | IModuleProxy * | moduleProxy | ) | [inline, virtual] |
Called by a socket to inform this module that another module has been deleted OR has been no more accessible (due to some gateway disconnection).
Implements NLNET::IModuleInterceptable.
Definition at line 1537 of file module_gateway.cpp.
| void NLNET::CStandardGateway::onModulePlugged | ( | IModule * | pluggedModule | ) | [inline, virtual] |
Called just after a module is plugged in the socket.
Implements NLNET::IModuleSocket.
Definition at line 1611 of file module_gateway.cpp.
References _LocalModuleIndex, _ModuleProxies, _NameToProxyIdx, NLNET::IModule::_onModuleUp(), NLMISC::CTwinMap< TypeA, TypeB >::add(), NLNET::IModuleManager::createModuleProxy(), NLNET::IModuleProxy::getForeignModuleId(), NLNET::IModuleProxy::getGatewayRoute(), NLNET::IModuleManager::getInstance(), NLNET::IModule::getModuleClassName(), NLNET::IModule::getModuleFullyQualifiedName(), NLNET::IModule::getModuleId(), NLNET::IModule::getModuleManifest(), NLNET::IModule::getModuleName(), NLNET::CModuleBase::getModuleName(), nldebug, and onAddModuleProxy().
| void NLNET::CStandardGateway::onModuleSecurityChange | ( | IModuleProxy * | moduleProxy | ) | [inline, virtual] |
Called by a socket to inform this module that the security data attached to a proxy have changed.
Implements NLNET::IModuleInterceptable.
Definition at line 1553 of file module_gateway.cpp.
| void NLNET::CStandardGateway::onModuleSocketEvent | ( | IModuleSocket * | , | |
| TModuleSocketEvent | ||||
| ) | [inline, virtual] |
Implements NLNET::IModule.
Definition at line 1557 of file module_gateway.cpp.
| void NLNET::CStandardGateway::onModuleUnplugged | ( | IModule * | unpluggedModule | ) | [inline, virtual] |
Called just after a module as been effectively unplugged from a socket.
the gateway do the rest of the job
Implements NLNET::IModuleSocket.
Definition at line 1667 of file module_gateway.cpp.
References _LocalMessages, _LocalModuleIndex, _ModuleProxies, _NameToProxyIdx, NLNET::IModule::_onModuleDown(), NLNET::TLocalMessage::AddresseProxyId, NLNET::IModuleProxy::getForeignModuleId(), NLNET::IModuleProxy::getGatewayRoute(), NLNET::IModuleManager::getInstance(), NLNET::IModule::getModuleId(), NLNET::IModule::getModuleName(), NLNET::CModuleBase::getModuleName(), NLNET::CMessage::getName(), NLNET::TLocalMessage::Message, nlassert, nldebug, nlwarning, onRemoveModuleProxy(), NLNET::IModuleManager::releaseModuleProxy(), NLMISC::CTwinMap< TypeA, TypeB >::removeWithB(), and NLNET::TLocalMessage::SenderProxyId.
| void NLNET::CStandardGateway::onModuleUp | ( | IModuleProxy * | moduleProxy | ) | [inline, virtual] |
Called by a socket to inform this module that another module has been created OR has been made accessible (due to a gateway connection).
Implements NLNET::IModuleInterceptable.
Definition at line 1534 of file module_gateway.cpp.
| void NLNET::CStandardGateway::onModuleUpdate | ( | ) | [inline, virtual] |
Regular update from application.
If the application is a service, then it call CModuleManager::updateModules at each service loop. If the application is a regular application, then you have to call manually CModuleManager::updateModules at regular intervals.
Implements NLNET::IModule.
Definition at line 1470 of file module_gateway.cpp.
References _LocalMessages, _Routes, _Transports, NLNET::TLocalMessage::AddresseProxyId, dispatchModuleMessage(), getModuleProxy(), NLNET::CMessage::getName(), H_AUTO, NLNET::TLocalMessage::Message, nlwarning, NLNET::TLocalMessage::SenderProxyId, sendPendingModuleUpdate(), and NLNET::IGatewayTransport::update().
| bool NLNET::CStandardGateway::onProcessModuleMessage | ( | IModuleProxy * | senderModuleProxy, | |
| const CMessage & | message | |||
| ) | [inline, virtual] |
Called internally by basic module imp to process the message by application code.
The system will call each interceptor until one return true.
Implements NLNET::IModuleInterceptable.
Definition at line 1540 of file module_gateway.cpp.
References _PingCounter, and NLNET::CMessage::getName().
| virtual void NLNET::CStandardGateway::onReceiveMessage | ( | CGatewayRoute * | from, | |
| const CMessage & | msgin | |||
| ) | [inline, virtual] |
A transport have received a message.
Implements NLNET::IModuleGateway.
Definition at line 630 of file module_gateway.cpp.
References NLNET::CMessage::getName(), H_AUTO, NLNET::CModuleMessageHeaderCodec::mt_invalid, NLNET::CGatewayRoute::NextMessageType, onReceiveModuleMessage(), onReceiveModuleMessageHeader(), and onReceiveModuleUpdate().
| void NLNET::CStandardGateway::onReceiveModuleAdd | ( | CGatewayRoute * | from, | |
| const CMessage & | msgin | |||
| ) | [inline] |
A gateway send new modules informations.
store the module information
Definition at line 925 of file module_gateway.cpp.
References NLNET::CModuleProxy::_Distance, _KnownModules, _ModuleProxies, _NameToProxyIdx, NLNET::CModuleProxy::_Route, NLNET::CModuleProxy::_SecurityData, _SecurityPlugin, NLMISC::CTwinMap< TypeA, TypeB >::add(), NLNET::IModuleManager::createModuleProxy(), NLNET::CStandardGateway::TKnownModuleInfo::ForeignProxyId, NLNET::CGatewayRoute::ForeignToLocalIdx, NLMISC::CTwinMap< TypeA, TypeB >::getB(), getGatewayName(), NLNET::IModuleManager::getInstance(), NLNET::IModuleProxy::getModuleDistance(), NLNET::IModuleProxy::getModuleProxyId(), H_AUTO, NLNET::TModuleDescCodec::ModuleClass, NLNET::CStandardGateway::TKnownModuleInfo::ModuleClassId, NLNET::TModuleDescCodec::ModuleDistance, NLNET::CStandardGateway::TKnownModuleInfo::ModuleDistance, NLNET::TModuleDescCodec::ModuleFullName, NLNET::TModuleDescCodec::ModuleManifest, NLNET::TModuleDescCodec::ModuleProxyId, nldebug, nlRead, onAddModuleProxy(), NLNET::CGatewaySecurity::onNewProxy(), NLNET::CGatewaySecurity::onNewSecurityData(), NLNET::CStandardGateway::TKnownModuleInfo::Route, NLNET::TModuleDescCodec::SecDesc, NLNET::TSecurityDataDesc::SecurityData, and sendModuleDistanceUpdate().
Referenced by onReceiveModuleUpdate().
| void NLNET::CStandardGateway::onReceiveModuleDistanceUpdate | ( | CGatewayRoute * | from, | |
| const CMessage & | msgin | |||
| ) | [inline] |
Definition at line 1035 of file module_gateway.cpp.
References _KnownModules, _ModuleProxies, NLNET::CStandardGateway::TKnownModuleInfo::ForeignProxyId, NLNET::CGatewayRoute::ForeignToLocalIdx, getGatewayName(), H_AUTO, NLNET::CStandardGateway::TKnownModuleInfo::ModuleDistance, nlassert, nldebug, nlRead, nlwarning, NLNET::CStandardGateway::TKnownModuleInfo::Route, and sendModuleDistanceUpdate().
Referenced by onReceiveModuleUpdate().
| void NLNET::CStandardGateway::onReceiveModuleMessage | ( | CGatewayRoute * | from, | |
| const CMessage & | msgin | |||
| ) | [inline] |
A gateway receive module operation.
Definition at line 823 of file module_gateway.cpp.
References _ModuleProxies, NLNET::CMessage::getName(), H_AUTO, NLNET::CModuleMessageHeaderCodec::mt_invalid, NLNET::CGatewayRoute::NextAddresseeProxyId, NLNET::CGatewayRoute::NextMessageType, NLNET::CGatewayRoute::NextSenderProxyId, nlwarning, and sendModuleMessage().
Referenced by onReceiveMessage().
| void NLNET::CStandardGateway::onReceiveModuleMessageHeader | ( | CGatewayRoute * | from, | |
| const CMessage & | msgin | |||
| ) | [inline] |
Definition at line 857 of file module_gateway.cpp.
References NLNET::CModuleMessageHeaderCodec::decode(), NLNET::CGatewayRoute::ForeignToLocalIdx, H_AUTO, NLNET::CModuleMessageHeaderCodec::mt_invalid, NLNET::CGatewayRoute::NextAddresseeProxyId, NLNET::CGatewayRoute::NextMessageType, NLNET::CGatewayRoute::NextSenderProxyId, and nlwarning.
Referenced by onReceiveMessage().
| void NLNET::CStandardGateway::onReceiveModuleRemove | ( | CGatewayRoute * | from, | |
| const CMessage & | msgin | |||
| ) | [inline] |
Definition at line 1026 of file module_gateway.cpp.
References H_AUTO, nlRead, and removeForeignModule().
Referenced by onReceiveModuleUpdate().
| void NLNET::CStandardGateway::onReceiveModuleSecurityUpdate | ( | CGatewayRoute * | from, | |
| const CMessage & | msgin | |||
| ) | [inline] |
Definition at line 1136 of file module_gateway.cpp.
References NLNET::CModuleSocket::_PluggedModules, _Routes, _SecurityPlugin, NLNET::CGatewayRoute::ForeignToLocalIdx, NLMISC::CTwinMap< TypeA, TypeB >::getAToBMap(), getModuleProxy(), H_AUTO, isModuleProxyVisible(), NLNET::TModuleSecurityChangeMsg::ModuleId, nlRead, nlwarning, NLNET::IModuleInterceptable::onModuleSecurityChange(), NLNET::CGatewaySecurity::onNewSecurityData(), replaceAllSecurityDatas(), NLNET::TModuleSecurityChangeMsg::SecDesc, NLNET::TSecurityDataDesc::SecurityData, and updateModuleSecurityDataToRoute().
Referenced by onReceiveModuleUpdate().
| void NLNET::CStandardGateway::onReceiveModuleUpdate | ( | CGatewayRoute * | from, | |
| const CMessage & | msgin | |||
| ) | [inline] |
A gateway receive a general update message.
Definition at line 886 of file module_gateway.cpp.
References NLNET::CMessage::getPos(), H_AUTO, NLNET::CMessage::length(), nlRead, nlstop, onReceiveModuleAdd(), onReceiveModuleDistanceUpdate(), onReceiveModuleRemove(), onReceiveModuleSecurityUpdate(), NLNET::CGatewayRoute::pet_disclose_module, NLNET::CGatewayRoute::pet_undisclose_module, NLNET::CGatewayRoute::pet_update_distance, and NLNET::CGatewayRoute::pet_update_security.
Referenced by onReceiveMessage().
| virtual void NLNET::CStandardGateway::onRemoveModuleProxy | ( | IModuleProxy * | removedModule | ) | [inline, virtual] |
Callback called when a module become unavailable, either because it is unplugged from it's socket, or, the gateway that disclosed it has been disconnected.
Implements NLNET::IModuleGateway.
Definition at line 1222 of file module_gateway.cpp.
References NLNET::IModule::_onModuleDown(), NLNET::CModuleSocket::_PluggedModules, _Routes, NLMISC::CTwinMap< TypeA, TypeB >::getAToBMap(), NLNET::IModuleProxy::getForeignModuleId(), NLNET::IModuleProxy::getGatewayRoute(), NLNET::IModule::getModuleId(), H_AUTO, isModuleProxyVisible(), and undiscloseModuleToRoute().
Referenced by onModuleUnplugged(), and removeForeignModule().
| virtual void NLNET::CStandardGateway::onRouteAdded | ( | CGatewayRoute * | route | ) | [inline, virtual] |
A new route a added by a transport.
Implements NLNET::IModuleGateway.
Definition at line 563 of file module_gateway.cpp.
References _ModuleProxies, _Routes, discloseModuleToRoute(), isModuleProxyVisible(), and nlassert.
| virtual void NLNET::CStandardGateway::onRouteRemoved | ( | CGatewayRoute * | route | ) | [inline, virtual] |
A route is removed by a transport.
Implements NLNET::IModuleGateway.
Definition at line 588 of file module_gateway.cpp.
References _Routes, NLNET::CGatewayRoute::FirewallDisclosed, NLNET::CGatewayRoute::ForeignToLocalIdx, NLNET::CModuleMessageHeaderCodec::mt_invalid, NLNET::CGatewayRoute::NextAddresseeProxyId, NLNET::CGatewayRoute::NextMessageType, NLNET::CGatewayRoute::NextSenderProxyId, nlassert, NLNET::CGatewayRoute::PendingEvents, and removeForeignModule().
| void NLNET::CStandardGateway::onServiceDown | ( | const std::string & | serviceName, | |
| NLNET::TServiceId | serviceId | |||
| ) | [inline, virtual] |
A Nel layer 5 service has stopped.
Implements NLNET::IModule.
Definition at line 1467 of file module_gateway.cpp.
| void NLNET::CStandardGateway::onServiceUp | ( | const std::string & | serviceName, | |
| NLNET::TServiceId | serviceId | |||
| ) | [inline, virtual] |
A Nel layer 5 service has started.
Implements NLNET::IModule.
Definition at line 1464 of file module_gateway.cpp.
| void NLNET::CStandardGateway::removeForeignModule | ( | CGatewayRoute * | route, | |
| TModuleId | foreignModuleId | |||
| ) | [inline] |
Definition at line 1746 of file module_gateway.cpp.
References NLNET::CModuleProxy::_Distance, NLNET::CModuleProxy::_ForeignModuleId, NLNET::CModuleProxy::_FullyQualifiedModuleName, _KnownModules, _ModuleProxies, _NameToProxyIdx, NLNET::CModuleProxy::_Route, NLNET::CGatewayRoute::ForeignToLocalIdx, getGatewayName(), NLNET::IModuleManager::getInstance(), NLNET::CModuleProxy::getModuleName(), nlassert, nldebug, nlwarning, onRemoveModuleProxy(), NLNET::IModuleManager::releaseModuleProxy(), NLMISC::CTwinMap< TypeA, TypeB >::removeWithB(), NLNET::CStandardGateway::TKnownModuleInfo::Route, and sendModuleDistanceUpdate().
Referenced by onReceiveModuleRemove(), and onRouteRemoved().
| bool NLNET::CStandardGateway::removeSecurityData | ( | IModuleProxy * | proxy, | |
| uint8 | dataTag | |||
| ) | [inline] |
Clear a block of security data The block is identified by the data tag.
Definition at line 750 of file module_gateway.cpp.
References NLNET::TSecurityData::DataTag, NLNET::IModuleProxy::getModuleGateway(), NLNET::TSecurityData::NextItem, and nlassert.
Referenced by NLNET::CGatewaySecurity::removeSecurityData(), and setSecurityData().
| virtual void NLNET::CStandardGateway::removeSecurityPlugin | ( | ) | [inline, virtual] |
Remove the security plug-in.
Implements NLNET::IModuleGateway.
Definition at line 711 of file module_gateway.cpp.
References _SecurityPlugin, nlwarning, and NLNET::CGatewaySecurity::onDelete().
Referenced by NLMISC_CLASS_COMMAND_DECL(), and ~CStandardGateway().
| void NLNET::CStandardGateway::replaceAllSecurityDatas | ( | IModuleProxy * | proxy, | |
| TSecurityData * | securityData | |||
| ) | [inline] |
Definition at line 785 of file module_gateway.cpp.
References NLNET::IModuleProxy::getModuleGateway(), and nlassert.
Referenced by onReceiveModuleSecurityUpdate(), and NLNET::CGatewaySecurity::replaceAllSecurityDatas().
| void NLNET::CStandardGateway::sendModuleDistanceUpdate | ( | IModuleProxy * | proxy | ) | [inline] |
Definition at line 1861 of file module_gateway.cpp.
References _Routes, isModuleProxyVisible(), and updateModuleDistanceToRoute().
Referenced by onReceiveModuleAdd(), onReceiveModuleDistanceUpdate(), and removeForeignModule().
| virtual void NLNET::CStandardGateway::sendModuleMessage | ( | IModuleProxy * | senderProxy, | |
| IModuleProxy * | addresseeProxy, | |||
| const NLNET::CMessage & | message | |||
| ) | [inline, virtual] |
Callback called when a message arrive from a gateway and need to be dispatched.
The default behavior is to route the message in any case to the destination module. You can override this callback to add some message filtering or hacking feature. Send a message to a module.
Implements NLNET::IModuleGateway.
Definition at line 1303 of file module_gateway.cpp.
References _LocalMessages, _ModuleProxies, NLNET::CModuleSocket::_PluggedModules, NLNET::TLocalMessage::AddresseProxyId, NLNET::CMessage::assignFromSubMessage(), discloseModuleToRoute(), dispatchModuleMessage(), NLNET::CModuleMessageHeaderCodec::encode(), NLNET::CGatewayRoute::FirewallDisclosed, NLNET::IGatewayTransport::Firewalled, NLMISC::CTwinMap< TypeA, TypeB >::getB(), NLNET::IModuleProxy::getForeignModuleId(), NLNET::IModuleProxy::getGatewayRoute(), NLNET::CModuleBase::getModuleName(), NLNET::IModuleProxy::getModuleName(), NLNET::IModuleProxy::getModuleProxyId(), NLNET::CMessage::getName(), NLNET::CGatewayRoute::getTransport(), H_AUTO, NLNET::CMessage::hasLockedSubMessage(), NLNET::IModule::isImmediateDispatchingSupported(), isModuleProxyVisible(), NLMISC::IStream::isReading(), NLNET::TLocalMessage::Message, NLNET::CModuleMessageHeaderCodec::mt_oneway, nlassert, nldebug, nlwarning, NLNET::TLocalMessage::SenderProxyId, NLNET::CGatewayRoute::sendMessage(), and sendPendingModuleUpdate().
Referenced by _sendModuleMessage(), and onReceiveModuleMessage().
| void NLNET::CStandardGateway::sendPendingModuleUpdate | ( | CGatewayRoute * | route | ) | [inline] |
Definition at line 1977 of file module_gateway.cpp.
References NLNET::CGatewayRoute::TPendingEvent::EventType, NLNET::IModuleProxy::getFirstSecurityData(), NLNET::IModuleProxy::getModuleDistance(), getModuleProxy(), NLNET::TModuleSecurityChangeMsg::ModuleId, NLNET::CGatewayRoute::TPendingEvent::ModuleId, nlstop, NLNET::CGatewayRoute::PendingEvents, NLNET::CGatewayRoute::pet_disclose_module, NLNET::CGatewayRoute::pet_undisclose_module, NLNET::CGatewayRoute::pet_update_distance, NLNET::CGatewayRoute::pet_update_security, NLNET::TModuleSecurityChangeMsg::SecDesc, NLNET::TSecurityDataDesc::SecurityData, NLNET::CGatewayRoute::sendMessage(), NLMISC::CMemStream::serial(), and NLMISC::IStream::serialShortEnum().
Referenced by onModuleUpdate(), and sendModuleMessage().
| virtual void NLNET::CStandardGateway::sendSecurityCommand | ( | const TParsedCommandLine & | command | ) | [inline, virtual] |
Send a command to the security plug-in.
Implements NLNET::IModuleGateway.
Definition at line 698 of file module_gateway.cpp.
References _SecurityPlugin, nlwarning, and NLNET::CGatewaySecurity::onCommand().
Referenced by NLMISC_CLASS_COMMAND_DECL().
| void NLNET::CStandardGateway::setSecurityData | ( | IModuleProxy * | proxy, | |
| TSecurityData * | securityData | |||
| ) | [inline] |
Set a security data block.
If a bloc of the same type already exist in the list, the new one will replace the existing one.
Definition at line 729 of file module_gateway.cpp.
References NLNET::CModuleProxy::_SecurityData, NLNET::TSecurityData::DataTag, NLNET::IModuleProxy::getModuleGateway(), NLNET::TSecurityData::NextItem, nlassert, and removeSecurityData().
Referenced by NLNET::CGatewaySecurity::setSecurityData().
| virtual void NLNET::CStandardGateway::setTransportFirewallMode | ( | const std::string & | transportInstanceName, | |
| bool | firewalled | |||
| ) | throw (EGatewayFirewallBreak) [inline, virtual] |
Activate/stop firewalling mode on a transport.
set the firewall mode
Implements NLNET::IModuleGateway.
Definition at line 457 of file module_gateway.cpp.
References _ModuleProxies, _Routes, _Transports, discloseModuleToRoute(), NLNET::CGatewayRoute::FirewallDisclosed, NLNET::IGatewayTransport::Firewalled, NLNET::IModuleProxy::getGatewayRoute(), NLNET::IModuleProxy::getModuleProxyId(), NLNET::IGatewayTransport::getRouteCount(), NLNET::CGatewayRoute::getTransport(), nldebug, and nlwarning.
Referenced by NLMISC_CLASS_COMMAND_DECL().
| virtual void NLNET::CStandardGateway::setTransportPeerInvisible | ( | const std::string & | transportInstanceName, | |
| bool | peerInvisible | |||
| ) | [inline, virtual] |
Activate/stop peer invisible mode on a transport.
Implements NLNET::IModuleGateway.
Definition at line 402 of file module_gateway.cpp.
References _ModuleProxies, _Routes, _Transports, discloseModuleToRoute(), NLNET::IGatewayTransport::Firewalled, NLNET::IModuleProxy::getGatewayRoute(), NLNET::CGatewayRoute::getTransport(), nldebug, nlwarning, NLNET::IGatewayTransport::PeerInvisible, and undiscloseModuleToRoute().
Referenced by NLMISC_CLASS_COMMAND_DECL().
| virtual void NLNET::CStandardGateway::transportCommand | ( | const TParsedCommandLine & | commandLine | ) | [inline, virtual] |
Send a command to a transport.
Implements NLNET::IModuleGateway.
Definition at line 511 of file module_gateway.cpp.
References _Transports, nldebug, nlwarning, NLNET::TParsedCommandLine::ParamName, NLNET::TParsedCommandLine::SubParams, and NLNET::TParsedCommandLine::toString().
Referenced by NLMISC_CLASS_COMMAND_DECL().
| void NLNET::CStandardGateway::undiscloseModuleToRoute | ( | CGatewayRoute * | route, | |
| IModuleProxy * | proxy | |||
| ) | [inline] |
Undisclose module information to a gateway route.
Definition at line 1946 of file module_gateway.cpp.
References NLNET::CGatewayRoute::TPendingEvent::EventType, NLNET::CGatewayRoute::FirewallDisclosed, NLNET::IModuleProxy::getModuleProxyId(), NLNET::CGatewayRoute::TPendingEvent::ModuleId, NLNET::CGatewayRoute::PendingEvents, and NLNET::CGatewayRoute::pet_undisclose_module.
Referenced by onRemoveModuleProxy(), and setTransportPeerInvisible().
| void NLNET::CStandardGateway::updateModuleDistanceToRoute | ( | CGatewayRoute * | route, | |
| IModuleProxy * | proxy | |||
| ) | [inline] |
the distance of a module need to be update to peers
Definition at line 1961 of file module_gateway.cpp.
References NLNET::CGatewayRoute::TPendingEvent::EventType, NLNET::IModuleProxy::getModuleProxyId(), NLNET::CGatewayRoute::TPendingEvent::ModuleId, NLNET::CGatewayRoute::PendingEvents, and NLNET::CGatewayRoute::pet_update_distance.
Referenced by sendModuleDistanceUpdate().
| void NLNET::CStandardGateway::updateModuleSecurityDataToRoute | ( | CGatewayRoute * | route, | |
| IModuleProxy * | proxy | |||
| ) | [inline] |
The security data need to be updated to peers.
Definition at line 1969 of file module_gateway.cpp.
References NLNET::CGatewayRoute::TPendingEvent::EventType, NLNET::IModuleProxy::getModuleProxyId(), NLNET::CGatewayRoute::TPendingEvent::ModuleId, NLNET::CGatewayRoute::PendingEvents, and NLNET::CGatewayRoute::pet_update_security.
Referenced by forceSecurityUpdate(), and onReceiveModuleSecurityUpdate().
List of known foreign module info.
Definition at line 278 of file module_gateway.cpp.
Referenced by onReceiveModuleAdd(), onReceiveModuleDistanceUpdate(), and removeForeignModule().
List of local message waiting dispatching at next update.
Definition at line 301 of file module_gateway.cpp.
Referenced by onModuleUnplugged(), onModuleUpdate(), and sendModuleMessage().
Translation table to find module proxies for locally plugged module The map key is the local module id, the data is the associated proxy id.
Definition at line 283 of file module_gateway.cpp.
Referenced by _broadcastModuleMessage(), _sendModuleMessage(), getPluggedModuleProxy(), onModulePlugged(), and onModuleUnplugged().
Module proxies managed by this gateway. The map key is the module proxy id.
Definition at line 260 of file module_gateway.cpp.
Referenced by _broadcastModuleMessage(), _sendModuleMessage(), createSecurityPlugin(), getModuleList(), getModuleProxy(), getModuleProxyList(), getPluggedModuleProxy(), getProxyCount(), onModulePlugged(), onModuleUnplugged(), onReceiveModuleAdd(), onReceiveModuleDistanceUpdate(), onReceiveModuleMessage(), onRouteAdded(), removeForeignModule(), sendModuleMessage(), setTransportFirewallMode(), and setTransportPeerInvisible().
Index of name to proxy id.
Definition at line 264 of file module_gateway.cpp.
Referenced by onModulePlugged(), onModuleUnplugged(), onReceiveModuleAdd(), and removeForeignModule().
uint32 NLNET::CStandardGateway::_PingCounter [private] |
Ping counter for debug purpose.
Definition at line 297 of file module_gateway.cpp.
Referenced by getReceivedPingCount(), and onProcessModuleMessage().
TRouteList NLNET::CStandardGateway::_Routes [private] |
Definition at line 291 of file module_gateway.cpp.
Referenced by forceSecurityUpdate(), getRouteCount(), onAddModuleProxy(), onModuleUpdate(), onReceiveModuleSecurityUpdate(), onRemoveModuleProxy(), onRouteAdded(), onRouteRemoved(), sendModuleDistanceUpdate(), setTransportFirewallMode(), and setTransportPeerInvisible().
The security plug-in (if any).
Definition at line 294 of file module_gateway.cpp.
Referenced by createSecurityPlugin(), NLMISC_CLASS_COMMAND_DECL(), onReceiveModuleAdd(), onReceiveModuleSecurityUpdate(), removeSecurityPlugin(), sendSecurityCommand(), and ~CStandardGateway().
the list of active transport
Definition at line 287 of file module_gateway.cpp.
Referenced by createTransport(), deleteTransport(), getGatewayTransport(), getTransportCount(), NLMISC_CLASS_COMMAND_DECL(), onApplicationExit(), onModuleUpdate(), setTransportFirewallMode(), setTransportPeerInvisible(), transportCommand(), and ~CStandardGateway().
1.6.1