This repository has been archived on 2020-12-30. You can view files and clone it, but cannot push or open issues or pull requests.
Go to file
Marcel M. Otte b094071f73 fixed ipv6 according to schema 2016-09-20 07:39:15 +02:00
protocols fixed ipv6 according to schema 2016-09-20 07:39:15 +02:00
.gitignore removed project files from eclipse and pycharm because of annoying always changes and added both to gitignore 2016-09-18 18:41:41 +02:00
README.md ditched kwalify for python with jsonschema and pyyaml. 2016-09-18 18:35:20 +02:00
example.yml first working jsonschema (written in yaml...) for the protocol part only. 2016-09-18 16:30:45 +02:00
schema.yml tested schema of extensions and validated ipv6 against 2016-09-20 07:38:52 +02:00
structure-schema.yml added field prop 'reflength' to reference another field as length info 2015-02-24 20:31:27 +01:00
transition-schema.yml made own schema for layer transition ids and updated protocols and lists 2015-01-04 22:34:34 +01:00
validate.py updated schema to check if oneOf length, reflength or data is set. 2016-09-18 18:18:22 +02:00

README.md

Network Protocol Dictionary

This is a YAML network protocol dictionary for all (binary based) OSI-Layer 1-4 protocols, eg. Ethernet, IP, TCP, UDP, etc.

  • What this dictionary should be:

    • A complete machine readable structure definition dictionary for all binary based network protocols
    • Addon: some protocol documentation from wikipedia or RFCs for display use.
    • A reference for building a network packet from scratch in an application, mostly for applications dealing with network packets.
  • What it is clearly NOT:

    • Currently: complete.
    • A replacement for reading RFCs: Dependencies and constraints are NOT defined in this dictionary
    • A source for implementing network stacks

Why?

I have a project where I want to use a non platform dependent source for network protocol structures so I want to avoid using the defined structures in the OS includes which depend on the operating system used at program execution. Simple, isn't it?

How to add a new protocol

Requirements:

  • Python 3.5
    • jsonschema
    • PyYaml
  • (the old kwalify schemas are still present, but deprecated.)

Howto:

  • Clone.
  • Check structure-schema.yml.
  • Write protocol file in ./protocols/osi[layer]/[protocolname].yml.
  • Validate structure with 'python validate.py -f [path/to/protocolname].yml' or all at once with 'python validate.py --all'
  • Set up a merge request.
  • Be happy.

How to use this dictionary

Currently not recommended, because the project lacks deeper tests than just schema validation. ;)

  • Clone.
  • Get a YAML library for your program language. Or get a converter for JSON or XML, to use these markup languages.
  • Load desired protocol files, or all of them.
  • Use resulting data structures to build protocol packet structures.

This repository will provide examples or useable code snippets for specific programming languages in the future...