qwc
qwc

Reputation: 343

Network protocol structure definitions in machine readable form (xml,json,other?)?

I am looking for network protocol structure definitions in structured machine readable form, like xml, json or an other description language I'm currently not aware of. (e.g. yaml)

I'm talking here about the standard stuff: Ethernet, IP, TCP, UDP, ICMP, etc. and everything else that can run through a network [cable and wireless]. Everything that can be sniffed with wireshark for example.

What I need for my upcoming project are all these protocol definitions in machine readable form, I do not care about in which clothing these definitions come along, I just need them.

Searching the 'interwebs' for such a "universal protocol structure definition" is like to look for a needle in a haystack and throws up everything, but that what I'm looking for.

I even cursorily checked the available code of wireshark in the hope to find something usable. (Which was not the case or I weren't looking deep enough...)

Does none exist and do I have to invent a new schema for the task?

Or does it just hide before my eyes in hours of search?

Thanks in advance, experts of stackoverflow. :)

[Edit:] Some further clarification:

Upvotes: 4

Views: 332

Answers (2)

qwc
qwc

Reputation: 343

Because I were not able to find a dictionary for network protocols, I started one.

See: https://github.com/qwc/network-protocol-dictionary

At the time of writing the answer the dictionary is nearly as old as my question and because of some lack of time the repository is still in a very rough state. But it will grow with time. :)

Upvotes: 1

Malt
Malt

Reputation: 30285

How about Java code? It has the benefit of being platform independent.

For instance take a look at JNetPcap. It's an open source Java wrapper for libpcap.

It has all kinds of pure Java packet decoders for a a wide range of protocols. Package org.jnetpcap.protocol contains the header definitions of each of the supported protocols (e.g. org.jnetpcap.protocol.network.Ipv4). You can use these out of the box, or extend them.

Upvotes: 0

Related Questions