Coder Social home page Coder Social logo

eryx67 / diameter-xml-dictionary Goto Github PK

View Code? Open in Web Editor NEW
1.0 2.0 2.0 24 KB

Utility for quickly generating XML and ASN.1 dictionaries for Diameter protocol

License: BSD 3-Clause "New" or "Revised" License

Haskell 100.00%
diameter xml asn-1 dictionary

diameter-xml-dictionary's Introduction

Diameter-Xml-Dict

This is a simple utility for quickly generating XML Dictionary or ASN.1 for Diameter Protocol dictionaries from 3GPP or IETF documents.

Install

You need Stack to be installed locally.

stack install

Usage

Generating XML Example:

diameter-xml-dict  --application-id 16777236 --application-name 3GPP-29-214 --vendor-id 10415 --vendor-name 3GPP \
    --csv test-data/3GPP_TS_29_214.csv --bnf test-data/3GPP_TS_29_214.bnf xml > 3GPP_TS_29_214.xml

Generating ASN.1 Example:

diameter-xml-dict  --application-id 16777236 --application-name ThreeGPP-29-214 --vendor-id 10415 --vendor-name 3GPP \
    --csv test-data/3GPP_TS_29_214.csv --bnf test-data/3GPP_TS_29_214.bnf asn1 > 3GPP_TS_29_214.asn1

To generate dictionary you need two files:

  • AVP descriptions in CSV format
  • descriptions of commands, grouped AVPs, enumerated AVPs in BNF-like notation

Look in test-data directory for examples.

CSV file

CSV file format follows common for 3GPP and IETF tabular format for AVPs

"Attribute Name","Code","Section","Data","MUST","MAY","SHLD NOT","MUST NOT","Encr","Applicability"

You can easily extract this table from PDF document with such free tool as Tabula.

BNF file

BNF file format follows common for Diameter RFCs, 3GPP and IETF formats for commands descriptions as described in Diameter Base Protocol.

So you mostly need to copy/paste them from document.

  1. Commands
COMMAND-NAME ::= <Diameter-Header: COMMAND-CODE, R-BIT, P-BIT >
...
  1. Grouped AVPs
AVP-NAME ::= <AVP-Header: AVP-CODE >
...
  1. Enumerated AVPs
AVP-NAME ::= <AVP-Enumerated: AVP-CODE >
<MEMBER-NAME [:MEMBER-CODE]>
...
  1. Imports (for ASN.1)
DICTIONARY-NAME ::= <AVP-Import>
<AVP-NAME>
...

diameter-xml-dictionary's People

Contributors

eryx67 avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.