Diameter C++ API and
Open Diameter Project
Yoshihiro Ohba
Victor Fajardo
Dilip Patel
IETF55 AAA WG Diameter C++ API and Open Diamet 1
er project
Diameter C++ API
• Design policy
– Leveraging object-oriented nature of C++
– Reuse what is already defined in the C API as
much as possible
• Document
– draft-ohba-aaa-diameter-cxxapi-00.txt
– Sample code in Appendix
IETF55 AAA WG Diameter C++ API and Open Diamet 2
er project
Why C++ API?
• Since classes are hierarchically defined, it is easy
to reuse and extend what is already defined
• C++ has a built-in exception handling mechanism
for providing a better way of handling errors
• Better handling of callback functions
– A set of variables and associated functions can be
passed in a single argument as a pointer to a class
instance
IETF55 AAA WG Diameter C++ API and Open Diamet 3
er project
Basic Structure of the API
• Element data-type definitions
– No member functions
– Type definitions in the C API are reused
• Parser class definitions
– Classes for assembling/reassembling messages and
AVPs
• Session/Event/Message Control class definitions
– Classes for handling sessions, events and sending
messages
IETF55 AAA WG Diameter C++ API and Open Diamet 4
er project
Open Diameter Project
• History
– “Open Source Diameter” Project created in SourceForge in Jan 2002, by David
Frascone
– “OpenDiameter” Project created in Oct 2002 by Toshiba America Research, Inc.
(TARI)
– The two projects were merged into “Open Diameter” project in Nov 2002
• URL
– http://www.opendiameter.org (project home page)
– http://sourceforge.net/projects/diameter (CVS repository, tar archives, ML)
• Source code
– Using the C++ API, (Java-based implementation is also planned)
– Thread-safe
– Using ACE (Adaptive Communication Environment) library to archive OS-
independency and employ typical design patterns
– Using XML for Command & AVP dictionary and configuration files
– Libraries are under Lesser GPL (LGPL)
– Daemon programs will be under GPL
IETF55 AAA WG Diameter C++ API and Open Diamet 5
er project
Open Diameter Architecture
The Main Thread Timer, signal, thread, connection and
configuration management
Session Manager(libdiameter) Parser(libdiamparser)
AVP
Per-session
Event … Session Container
Pool
Parser
Serializer DB DB
Pool of …
Threads
Transport&Routing Manager(libdiameter)
Per-peer
Message … Peer Routing
Queues DB DB
Per-connection …
Threads
Transport Connections
IETF55 AAA WG Diameter C++ API and Open Diamet 6
er project
• Can the C++ API be a work item of the
WG?
– We believe that the C++ API (as well as the C
API) and the Open Diameter project can help
the community deploy Diameter quickly
IETF55 AAA WG Diameter C++ API and Open Diamet 7
er project