This is a static archive of our old Q&A Site. Please post any new questions and answers at ask.wireshark.org.

Multiple Header Files

0

I am working on a network-layer dissector for a prototypical protocol (that's a mouthful) that is an alternative to IP; an eXpressive Internet Architecture. The addressing scheme for this protocol includes the use of DAGs, which require a few header files and a .c source file that defines various functions for operating on the DAGs.

I would like to keep the header files intact and separate, rather than incorporating them all into packet-xip.c and packet-xip.h. This would make the dissector file cleaner and the headers easy to update as our research continues. Is there a preferred mechanism for including multiple header/source files? For example, a new directory in the epan directory seems like it would be a nice fit, but I am unsure if this would preclude the possibility of having a patch with our protocols approved in the future.

Thank you for any advice.

asked 13 Jun '12, 18:04

Cody's gravatar image

Cody
11225
accept rate: 0%

edited 13 Jun '12, 18:05


One Answer:

1

See, for example, the dissector for the Zigbee protocol; there are several packet-zbee-XXX.[ch] files, or look at the XMPP dissector, which has a bunch of packet-xmpp-XXX.[ch] files. The best thing to do would be to have packet-xip.c and various packet-xip-*.c files, plus accompanying header files.

answered 13 Jun '12, 21:28

Guy%20Harris's gravatar image

Guy Harris ♦♦
17.4k335196
accept rate: 19%

edited 13 Jun '12, 21:29