Commit Graph

4 Commits

Author SHA1 Message Date
Guy Harris
688a79e7cb Use strlcpy(), rather than snprintf(), to avoid null format string warnings.
Include the appropriate headers to declare strlcpy() and snprintf().
2016-08-06 15:05:30 -07:00
Gisle Vanem
c4ae1ca64b add a missing declaration in netdissect.c 2016-08-06 16:29:40 +01:00
Guy Harris
6080cff326 Move more libsmi stuff to netdissect.c.
Have the call to smiLoadModule() be in a nd_load_smi_module() routine.
Have it set a *global* flag indicating whether a module has been loaded;
that's not per-netdissect_options.  Use that global flag in print-snmp.c
- and don't test it once per loop iteration, it's not going to change
while the loop is running.

Have a routine to return the version of the library if we're built with
it or NULL if we're not.

That removes the last of the code that tests USE_LIBSMI or uses libsmi
from tcpdump.c.
2016-08-04 14:35:35 -07:00
Guy Harris
bab54e3e56 Add netdissect.c. 2016-08-04 13:25:04 -07:00