diff options
author | Guy Harris <guy@alum.mit.edu> | 2012-08-03 01:58:12 +0000 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2012-08-03 01:58:12 +0000 |
commit | 307e13d9f2aefaa968f89d0bd065dbae5c992b64 (patch) | |
tree | 317ebe993472042cb8f010ad24276da1be0c5e98 /epan/dissectors/packet-ax25-nol3.c | |
parent | ad3c303f16673438e94223dda25ec5be5e46408d (diff) |
Move the list of AX.25 protocol IDs to epan/ax25_pids.h. Use it in
packet-ax25.c and packet-arp.c.
Add an "ax25.pid" dissector table for those protocol IDs, use it in the
AX.25 dissector, and have dissectors register in that table with their
protocol IDs.
Get rid of some unneeded includes.
Clean up some "AX25"s in user-visible strings - say "AX.25" instead.
Clean up some indentation.
svn path=/trunk/; revision=44235
Diffstat (limited to 'epan/dissectors/packet-ax25-nol3.c')
-rw-r--r-- | epan/dissectors/packet-ax25-nol3.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/epan/dissectors/packet-ax25-nol3.c b/epan/dissectors/packet-ax25-nol3.c index ddaa168093..881afa529f 100644 --- a/epan/dissectors/packet-ax25-nol3.c +++ b/epan/dissectors/packet-ax25-nol3.c @@ -62,6 +62,7 @@ #include <epan/packet.h> #include <epan/prefs.h> #include <epan/emem.h> +#include <epan/ax25_pids.h> #define STRLEN 80 @@ -265,10 +266,7 @@ proto_register_ax25_nol3(void) }; /* Register the protocol name and description */ - proto_ax25_nol3 = proto_register_protocol("AX25 no Layer 3", "AX25 no L3", "ax25_nol3"); - - /* Register the dissector */ - register_dissector( "ax25_nol3", dissect_ax25_nol3, proto_ax25_nol3 ); + proto_ax25_nol3 = proto_register_protocol("AX.25 no Layer 3", "AX.25 no L3", "ax25_nol3"); /* Required function calls to register the header fields and subtrees used */ proto_register_field_array( proto_ax25_nol3, hf, array_length(hf ) ); @@ -307,6 +305,7 @@ proto_reg_handoff_ax25_nol3(void) static gboolean inited = FALSE; if( !inited ) { + dissector_add_uint( "ax25.pid", AX25_P_NO_L3, create_dissector_handle( dissect_ax25_nol3, proto_ax25_nol3 ) ); /* */ |