{"id":29538690,"url":"https://github.com/volkds/diameter","last_synced_at":"2025-07-17T05:09:58.795Z","repository":{"id":304533977,"uuid":"1000391300","full_name":"VolkDS/diameter","owner":"VolkDS","description":"Implementation of the Diameter Base Protocol RFC 6733 for C++ language","archived":false,"fork":false,"pushed_at":"2025-07-13T17:07:35.000Z","size":43,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-07-13T19:13:02.000Z","etag":null,"topics":["3gpp","c-plus-plus","cpp","cpp17","diameter","protocol","rfc6733","signaling"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/VolkDS.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-06-11T17:52:42.000Z","updated_at":"2025-07-13T17:07:38.000Z","dependencies_parsed_at":"2025-07-13T19:13:17.452Z","dependency_job_id":"1911edf5-c5df-470b-bc79-c78893cabdc2","html_url":"https://github.com/VolkDS/diameter","commit_stats":null,"previous_names":["volkds/diameter"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/VolkDS/diameter","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/VolkDS%2Fdiameter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/VolkDS%2Fdiameter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/VolkDS%2Fdiameter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/VolkDS%2Fdiameter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/VolkDS","download_url":"https://codeload.github.com/VolkDS/diameter/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/VolkDS%2Fdiameter/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265566786,"owners_count":23789342,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["3gpp","c-plus-plus","cpp","cpp17","diameter","protocol","rfc6733","signaling"],"created_at":"2025-07-17T05:09:55.098Z","updated_at":"2025-07-17T05:09:58.789Z","avatar_url":"https://github.com/VolkDS.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Diameter Protocol Library\n\nLibrary is an implementation of the Diameter Base Protocol [RFC 6733](http://tools.ietf.org/html/rfc6733) for C++ language\n\n## Requirements\n\nYou need to install or clone [Netpacker Library](https://github.com/VolkDS/netpacker) for the project compilation\n```\n$ mkdir -p externals\n$ git clone https://github.com/VolkDS/netpacker externals/netpacker\n```\n\n## Examples\n\nEncode the Message\n```c++\n    #include \u003cdiameter/diameter.h\u003e\n    #include \u003cnetpacker/netpacker.h\u003e\n\n    using namespace diameter::message;\n\n    // Create Diameter Message\n    Message m {\n        {\n            header::ProtocolVersion{header::ProtocolVersionV::V01},\n            header::MessageLength{0},\n            header::CommandFlags{0x80},\n            header::CommandCode{257},\n            header::ApplicationId{0},\n            header::HopByHopIdentifier{0x6ad1d314},\n            header::EndToEndIdentifier{0x77287404}\n        },\n        std::list\u003cavp::AVP\u003e{\n            avp::AVP{264, avp::Flags{avp::Flag::Mandatory}, std::nullopt, avp::DiameterIdentity(\"testhost.epc.mnc000.mcc000.3gppnetwork.org\")},\n            avp::AVP{296, avp::Flags{avp::Flag::Mandatory}, std::nullopt, avp::DiameterIdentity(\"epc.mnc000.mcc000.3gppnetwork.org\")},\n            avp::AVP{257, avp::Flags{avp::Flag::Mandatory}, std::nullopt, avp::Address(\"127.0.0.1\")},\n            avp::AVP{266, avp::Flags{avp::Flag::Mandatory}, std::nullopt, avp::Unsigned32(uint32_t{10415})},\n            avp::AVP{269, avp::Flags{}, std::nullopt, avp::UTF8String(\"ExampleProduct\")},\n            avp::AVP{258, avp::Flags{avp::Flag::Mandatory}, std::nullopt, avp::Unsigned32(uint32_t{4})},\n            avp::AVP{265, avp::Flags{avp::Flag::Mandatory}, std::nullopt, avp::Unsigned32(uint32_t{10415})}\n        }\n    };\n\n    // And serialize it\n    auto data = std::vector\u003cuint8_t\u003e(m.size());\n    netpacker::put(data.begin(), data.end(), m);\n```\n\nDecode the message\n```c++\n    // Receive some data \n    std::string hexed = \\\n        \"010000C080000101000000006AD1D314\" \\\n        \"77287404000001084000003274657374\" \\\n        \"686F73742E6570632E6D6E633030302E\" \\\n        \"6D63633030302E336770706E6574776F\" \\\n        \"726B2E6F726700000000012840000029\" \\\n        \"6570632E6D6E633030302E6D63633030\" \\\n        \"302E336770706E6574776F726B2E6F72\" \\\n        \"67000000000001014000000E00017F00\" \\\n        \"000100000000010A4000000C000028AF\" \\\n        \"0000010D000000164578616D706C6550\" \\\n        \"726F647563740000000001024000000C\" \\\n        \"00000004000001094000000C000028AF\";\n\n    std::vector\u003cuint8_t\u003e data;\n    load_from_hex(hexed, data);\n\n    // And put it to decoder\n    auto pos = data.begin();\n    auto msg = netpacker::get\u003cMessage\u003e(pos, data.end());\n```\n\n### Usage with CMake\n\nIf using CMake, you can use ```add_subdirectory``` for incorporate the library\ndirectly in to one's CMake project.\n```cmake\nadd_subdirectory(diameter)\n```\nAnd link to the library as follows.\n```cmake\ntarget_link_libraries(MyTarget diameter::diameter)\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvolkds%2Fdiameter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvolkds%2Fdiameter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvolkds%2Fdiameter/lists"}