Commit Graph

7 Commits

Author SHA1 Message Date
Jörg Mayer 7c4176d868 Removed trailing whitespaces from .h and .c files using the
winapi_cleanup tool written by Patrik Stridvall for the wine
project.

svn path=/trunk/; revision=6117
2002-08-28 21:04:11 +00:00
Guy Harris abfac9ae93 From Kan Sasaki: added some VSAs from the FreeRadius dictionary files
and other changes to RADIUS.

Export the Q.931 cause location and code values, and use them in the
RADIUS dissector for ACC cause codes and values.

Make "CHAP" all caps, as it should be, and use InterCaps in AppleTalk
(Apple does).

The CHAP Challenge is an octet string, not a text string - the
FreeRadius dictionary has an error there.

In "rdconvertinttostr()", if there's no value_string table, just print
the value numerically, don't call "rd_match_strval()".

Don't pass a null value_string pointer to "rd_match_strval_attrib()" -
just report the value, without attempting to find a string for it.

svn path=/trunk/; revision=5460
2002-05-14 09:24:27 +00:00
Guy Harris 9baeab5cab Call the Q.931 dissector through a handle.
Update Gerald's e-mail address.

svn path=/trunk/; revision=3462
2001-05-27 07:27:21 +00:00
Laurent Deniel 6a480953a9 Miscellaneous code cleaning
- add <stdarg.h> or <varargs.h> in snprintf.h
  and remove those inclusions in the other #ifdef NEED_SNPRINTF_H codes

- remove the check of multiple inclusions in source (.c)  code
  (there is a bit loss of _cpp_ performance, but I prefer the gain of
   code reading and maintenance; and nowadays, disk caches and VM are
   correctly optimized ;-).

- protect all (well almost) header files against multiple inclusions

- add header (i.e. GPL license) in some include files

- reorganize a bit the way header files are included:

  First:
  #include <system_include_files>
  #include <external_package_include_files (e.g. gtk, glib etc.)>
  Then
  #include "ethereal_include_files"

  with the correct HAVE_XXX or NEED_XXX protections.

- add some HAVE_XXX checks before including some system header files

- add the same HAVE_XXX in wiretap as in ethereal

Please forgive me, if I break something (I've only compiled and regression
tested on Linux).

svn path=/trunk/; revision=2254
2000-08-11 13:37:21 +00:00
Guy Harris 10ea13ed18 Add "tvb_reported_length()" to get the "reported length" of a tvbuff
(i.e., the amount of data that was in the packet, even if not all of it
was captured), for use when dissecting packets containing data that
fills the packet (we want the dissector to try to dissect all of it; if
it runs past the end of the captured data, we want it to throw an
exception so that we'll put a "Short Frame" note in the protocol tree).

This means we always want a tvbuff to have a real reported length value,
so we make it an unsigned integer, and don't bother checking it for -1,
as it should never be -1.

If the reported length passed in to "tvb_set_subset()" is -1, set the
reported length to the reported length of the tvbuff of which the new
tvbuff will be a subset minus the offset in that tvbuff of the subset,
so that "-1" means "what's left of the packet after we chop off the
header".  This is necessary in order to ensure that all tvbuffs have a
real reported length value.

Have "dissect_packet()" set the reported length of the top-level tvbuff
to the reported length of the frame, so that we start out with a tvbuff
with a real reported length value.

Have "tvb_offset_exists()" return FALSE if the offset is past the end of
the tvbuff.

If the offset passed to it is postitive, have "compute_offset_length()"
check for that it's not more than one byte past the end of the tvbuff -
if it's just past the end, we don't want the check to fail, as we don't
want attempts to create a subset tvbuff containing zero bytes to fail;
that would be done if a captured packet was all header and no payload,
and we'd want the dissector of the payload, not the dissector of the
header, to throw an exception, as the problem isn't with the protocol
for the header, it's with the protocol for the payload.

Convert the ATM dissector, the SSCOP dissector, the Q.2931 dissector,
and the Q.931 dissector to use tvbuffs.

Make the LAPD dissector set up a tvbuff for the Q.931 dissector (it's
not converted yet).

svn path=/trunk/; revision=2023
2000-05-29 08:57:42 +00:00
Gilbert Ramirez ddfa11e870 Create a header file for every packet-*.c file. Prune the packet.h file.
This change allows you to add a new packet-*.c file and not cause a
recompilation of everything that #include's packet.h

Add the plugin_api.[ch] files ot the plugins/Makefile.am packaging list.

Add #define YY_NO_UNPUT 1 to the lex source so that the yyunput symbol
is not defined, squelching a compiler complaint when compiling the generated
C file.

svn path=/trunk/; revision=1637
2000-02-15 21:06:58 +00:00
Guy Harris d1c36982c6 Fixes to Q.931 dissector, and additions from a recent copy of Q.931.
Export some functions from the Q.931 dissector, so the Q.2931 dissector
can use them.

Add a pile of information element dissection to the Q.2931 dissector.

svn path=/trunk/; revision=1104
1999-11-25 10:01:18 +00:00