sub-dissector table is not stored in the header_field_info struct, but
in a separate namespace. Dissector tables are now registered by name
and not by field ID. For example:
udp_dissector_table = register_dissector_table("udp.port");
Because of this different namespace, dissector tables can have names
that are not field names. This is useful for ethertype, since multiple
fields are "ethertypes".
packet-ethertype.c replaces ethertype.c (the name was changed so that it
would be named in the same fashion as all the filenames passed to make-reg-dotc)
Although it registers no protocol or field, it registers one dissector table:
ethertype_dissector_table = register_dissector_table("ethertype");
All protocols that can be called because of an ethertype field now register
that fact with dissector_add() calls.
In this way, one dissector_table services all ethertype fields
(hf_eth_type, hf_llc_type, hf_null_etype, hf_vlan_etype)
Furthermore, the code allows for names of protocols to exist in the
etype_vals, yet a dissector for that protocol doesn't exist. The name
of the dissector is printed in COL_INFO. You're welcome, Richard. :-)
svn path=/trunk/; revision=1848
UDP and into the handoff registration routines for the protocols in
question.
Make the dissectors for those protocols static if they're not called
outside the dissector's source file.
Get rid of header files if all they did was declare dissectors that are
now static; remove declarations of now-static dissectors from header
files that do more than just declare the dissector.
svn path=/trunk/; revision=1823
"ds_set_boolean()" with the first two arguments being DS_LIBRARY_ID and
DS_LIB_PRINT_FULL_OID; this means that, when building with 4.1[.x]
(which we assume is the case if "snmp_set_full_objid" is defined, we
need to include <ucd-snmp/default_store.h>, to define those two values
and to declare "ds_set_boolean()".
svn path=/trunk/; revision=1657
not have been supported in older versions of CMU SNMP. Instead, pick
our own names for the values, and define them appropriately for UCD and
CMU SNMP.
svn path=/trunk/; revision=1322
way, it checks that the type of the variable matches the type it's
claimed to have in the MIB (and indicates if it isn't), it can decode
enumerated types, and it may also use the DISPLAY-HINT string in the
MIB.
Handle unknown types better.
svn path=/trunk/; revision=1293
files you need for the MIB-related routines, so I'm including
<snmp/snmp.h>; unfortunately, that "helpfully" defines a pile of things
we later define, giving rise to a bunch of compiler complaints, so we
undefine them after including <snmp/snmp.h>.
svn path=/trunk/; revision=1285
code, to dissect SNMP PDUs; use the SNMP library code only to translate
OIDs into strings.
Put into the ASN.1 code an annoying hack to cope with the fact that UCD
SNMP makes an OID out of "u_long"s whilst CMU SNMP makes it out of
"u_int"s - have the ASN.1 code make it out of "subid_t"s, and typedef
"subid_t" appropriately depending on the SNMP library you have.
Eventually, we should be able to use "libsmi" instead of a full-blown
SNMP library, and thus possibly work around various aggravations with
the SNMP libraries.
svn path=/trunk/; revision=1280
there are no SNMP libraries to use in a real dissector; this means that
other dissectors don't have to care if there are SNMP libraries, they
can just call "dissect_snmp()" - and this also simplifies "Makefile.am"
and "configure.in" a bit, as they just treat "packet-snmp.c" and
"packet-snmp.h" the same way they treat other dissector source files.
svn path=/trunk/; revision=1214
dynamically-assigned "ett_" integer values, assigned by
"proto_register_subtree_array()"; this:
obviates the need to update "packet.h" whenever you add a new
subtree type - you only have to add a call to
"proto_register_subtree_array()" to a "register" routine and an
array of pointers to "ett_", if they're not already there, and
add a pointer to the new "ett_" variable to the array, if they
are there;
would allow run-time-loaded dissectors to allocate subtree types
when they're loaded.
svn path=/trunk/; revision=1043
SNMP dissection is enabled or not, so that if "register.c" was generated
by scanning a list of files that include "packet-snmp.c" even though
SNMP dissection isn't enabled (the standard "Makefile.in" and
"configure" script won't cause that to happen, but source distributions
such as BSD ports may be set up to do that), and thus includes a call to
"proto_register_snmp()", that won't cause the link to fail.
svn path=/trunk/; revision=931
"asn_parse_header()" and "snmp_constr_parse()" don't actually modify the
data to which their first arguments point - if so, we have bigger
problems; I have no reason to believe they would modify it...).
svn path=/trunk/; revision=921
not like #preprocessor_macros that do not start at
the first column.
So write:
#ifdef FOO
# include <dummy1.h>
# define DUMMY 1
#else
# include <dummy2.h>
# define DUMMY 2
#endif
instead of
#ifdef FOO
#include <dummy1.h>
#define DUMMY 1
#else
#include <dummy2.h>
#define DUMMY 2
#endif
svn path=/trunk/; revision=668
mechanism that is built into ethereal. Wiretap is now used to read all
file formats. Libpcap is used only for capturing.
svn path=/trunk/; revision=342
versions, PDU types, error statuses, and trap types to strings.
Set the protocol column to "SNMP", and set the info column to an error
message if the parse fails (rather than printing a message to the
standard error) and to the PDU type if it succeeds.
svn path=/trunk/; revision=305
if you have the UCD or CMU SNMP library available. If you have the SNMP
library but do not with to have SNMP support, use the
./configure --disable-snmp
option. Otherwise 'configure' finds the SNMP library and uses it.
svn path=/trunk/; revision=281