Produits Support Open Source Company
 
 
 
Home > Wiki > ejabberd core modules

Article - Talk ejabberd core modules

Return to ejabberd module development

Router (ejabberd_router)

This module is the main router for XMPP packets on each node. It routes packets based on their destination domains. It has two tables: local and global routes. First, the destination domain of each packet is searched in local table. If found, the packet is routed to the appropriate process. Else, it searches in global table, and routes to the appropriate ejabberd node or process. If it does not exists in either tables, then the packet is sends to the S2S manager.

Local router (ejabberd_local)

This module routes packets which have a destination domain equal to one of the virtual host name of the server. If destination JID has a non-empty user part, then it routes packets to the session manager, else it is processed depending on it’s content.

Session manager (ejabberd_sm)

Handle the currently opened sessions.

This module routes packets to local users. It determines which user resource the packet must be sent via the presence table. If this resource is connected to this node, it is routed to the C2S manager. If it’s connected via another node, then the packet is sent to the session manager on that node.

Utilities (jlib)

Various helper functions. Modules should include the jlib.hrl file in order to use the records defined by this module.

Modules utilities (gen_mod)

Utility functions useful in a module. This module also define the “gen_mod” behavior.

XML utilities (xml)

Various utilities to manipulate XML packets.

Relational database (ejabberd_odbc)

Used to run SQL queries.

 
 
 
Valid HTML 4.01!   Valid CSS!