Commit Graph

286 Commits

Author SHA1 Message Date
Guy Harris dcf024f759 Use "address_to_str_buf()" to generate column data for non-resolved
addresses.

svn path=/trunk/; revision=8262
2003-08-26 01:30:48 +00:00
Guy Harris d9c401c74c Create an "address_to_str_buf()" routine, called by "address_to_str()",
which fills in a caller-supplied buffer.

Create "_buf()" versions of various "to_str" routines for various
address types, and create a routine to map SNA FIDs to strings, and use
them to finish up "address_to_str_buf()".

Get rid of the declaration of "sna_fid_type_4_addr_to_str()" in
"packet-sna.h", as that routine has been swallowed up in
"sna_fid_to_str()".

svn path=/trunk/; revision=8260
2003-08-26 01:00:30 +00:00
Guy Harris 2678786425 Pull the stuff done in "dissect_packet()" to initialize a column_info
structure into its own routine; rename "col_init()" to "col_setup()",
and call the new routine "col_init()".

svn path=/trunk/; revision=7467
2003-04-16 05:55:41 +00:00
Guy Harris 24ec2110d1 Add the notion of a "fence" to columns. A dissector can set the fence
to "protect" what's currently in the column, so that attempts to clear
the column will only clear stuff after the fence and attempts to
overwrite the column will append stuff after the fence.  This, for
example, allows a dissector to arrange that the Info column contain
information for its protocol and for protocols running atop it.

svn path=/trunk/; revision=7466
2003-04-16 04:52:55 +00:00
Guy Harris 5f09391096 Thou shalt not cast pointers of unknown alignment to pointers to
multi-byte integral quantities and blithely dereference them, lest thou
enrage those of us who work on machines that trap on unaligned
references.

svn path=/trunk/; revision=7021
2003-01-28 18:35:40 +00:00
Guy Harris e120160577 From Dinesh Dutt:
- A new decoder called MDSHDR which decodes the internal header of the
      Cisco MDS switch (this is different from the Boardwalk header).
    - Support for some more new columns as part of FC support.
    - Fixed the decoding of the Special Frame in FCIP.
    - Fixed the decoding of credit management type field in FLOGI/PLOGI frame
      in FC-ELS.

svn path=/trunk/; revision=6974
2003-01-22 06:26:36 +00:00
Guy Harris 92d90f4f28 Add a new type of column for the circuit ID (Frame Relay DLCI, ISDN
channel number, X.25 logical channel number).

Clean up white space and the like, and get rid of unnecessary arguments
to "col_set_port()".

svn path=/trunk/; revision=6772
2002-12-10 01:17:21 +00:00
Guy Harris 644d19129a From Alfred Koebler: add support for a column for the interface and
direction in Firewall-1 monitor files.

svn path=/trunk/; revision=6771
2002-12-10 00:12:59 +00:00
Gerald Combs b60b1414c3 From Dinesh Dutt: Add Fibre Channel support, including FCIP, Basic FC
header, Extended Link Service, Interswitch Link Service, FCP, and IPFC.

svn path=/trunk/; revision=6757
2002-12-08 02:32:36 +00:00
Guy Harris eccad76867 Show all 6 digits of precision in the time stamp column when displaying
absolute time stamps (we were already doing that for relative and delta
time stamps).

svn path=/trunk/; revision=6735
2002-12-03 02:38:39 +00:00
Guy Harris 8414298f89 Make the format argument to the "col_XXX_fstr()" routines, and the "str"
argument to "col_append_str()", const pointers; they're not modified by
the routines in question.

svn path=/trunk/; revision=6725
2002-12-02 23:34:40 +00:00
Guy Harris 5ae19d6256 Instead of tweaking a "Protocol configuration options" extension header
item to look more-or-less like a PPP packet, just dissect it in place
and hand off to the appropriate subdissector using the PPP dissector's
handoff table (which we export, along with its value_string table for
protocol IDs, which we use to report the protocol ID symbolically).

This means there's no point in having a configurable option to control
whether to do that tweaking; make it an obsolete option.

Bring "col_get_writable()" back from the dead, and have the GTP
dissector save the current "writable" flag for columns, mark the columns
non-writable before calling the subdissector for the PPP configuration
protocol, and restore the state of the writable flag, rather than
putting the columns back after the PPP configuration protocol's
dissector is done.

Fix some more typos in comments.

Don't register the IP dissector in the "ppp.protocol" table in the GTP
dissector's handoff registration routine - it's already being done in
the IP dissector's handoff routine.

Fix the name for CHAP to match what RFC 1994 calls it (if the name
changed, it should be changed in all places, but, at least according to
this message, a while ago, from Bob Sutterfield, "since the RFC defines
the protocol, the RFC defines the name":

	http://mail-index.netbsd.org/netbsd-help/1996/05/16/0011.html

and the RFC defines the name as "PPP Challenge Handshake Authentication
Protocol (CHAP)").

svn path=/trunk/; revision=6617
2002-11-11 19:23:14 +00:00
Guy Harris dc1bd10215 Put a leading "0x" in front of the hex value for ARCNET addresses when
generating a filter expression to match the address, so it's parsed
correctly (as a hex number rather than a string) if there are
non-decimal digits (A through F).

svn path=/trunk/; revision=6481
2002-10-23 04:23:03 +00:00
Guy Harris dbfeea3620 The Frame Relay DLCI is a virtual circuit identifer, not a source or
destination address, so yank out the AT_DLCI stuff.

Clean up indentation.

svn path=/trunk/; revision=6455
2002-10-19 00:40:05 +00:00
Guy Harris a4d1704b63 "addr->data", not "addr", points to the DLCI.
svn path=/trunk/; revision=6454
2002-10-19 00:10:50 +00:00
Guy Harris bdda1b8b08 Put in code to handle AT_DLCI.
svn path=/trunk/; revision=6453
2002-10-18 22:10:53 +00:00
Guy Harris c7cacdf4b7 Add an AT_ARCNET address type for ARCNET addresses, and have the ARCNET
dissector set the source and destination link-layer addresses.

svn path=/trunk/; revision=6452
2002-10-18 21:40:13 +00:00
Guy Harris e0e7122674 Add a new port type, PT_IPX, for IPX socket numbers; set "pinfo->ptype",
"pinfo->srcport", and "pinfo->destport" appropriately in the IPX
dissector.  Add support for PT_IPX port types in display columns.

Have an "spx.socket" dissector table, similar to the "ipx.socket"
dissector table, and have the SPX dissector use that, with the IPX
socket numbers from "pinfo->srcport" and "pinfo->destport", so that
dissectors for protocols that run atop SPX can register with particular
socket numbers.  (Think of it as similar to what would have been the
case had the IP header had 16-bit source and destination port numbers,
and had TCP and UDP used those port numbers rather than having port
numbers in their headers.)  Also, have the SPX dissector dissect
subprotocols regardless of whether we're building a protocol tree or not.

Use the dissector handle for the IPX message dissector for both IPX
socket numbers; there's no need to create separate handles for both
registrations.

Have NDPS register as a subdissector of the SPX dissector, using
"spx.socket", and get rid of the duplicate SPX dissection in the NDPS
dissector.

Make the NDPS dissector set the columns regardless of whether a protocol
tree is being built, and clean up the dissector (fixing some bugs).

Get rid of unneeded includes in "packet-ndps.c".

svn path=/trunk/; revision=6424
2002-10-15 04:31:00 +00:00
Jörg Mayer 48be4e530d 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=6116
2002-08-28 20:41:00 +00:00
Jörg Mayer 3105ee542f Replace the types from sys/types.h and netinet/in.h by their glib.h
equivalents for the epan/ directory but leave winsock2.h in inet_pton.c
and inet_ntop.c for now (can't estimate the consequences).

svn path=/trunk/; revision=5928
2002-08-02 21:29:45 +00:00
Guy Harris 96033b671b From Didier Gautheron:
Add Zone Information Protocol support.

	Rename "ddp.dst.socket" and "ddp.src.socket" to "ddp.dst_socket"
	and "ddp.src_socket", as the socket number is no longer
	considered part of the DDP address.

svn path=/trunk/; revision=5800
2002-06-29 21:27:39 +00:00
Guy Harris 431cae49a1 There are no "ipx.src" or "ipx.dst" filterable fields.
svn path=/trunk/; revision=5787
2002-06-28 22:58:39 +00:00
Guy Harris 6ecde9ff17 From Didier Gautheron: move port number from AppleTalk addresses to
separate column, and put in hidden fields for AppleTalk source and
destination addresses.

svn path=/trunk/; revision=5778
2002-06-28 20:13:03 +00:00
Guy Harris d7f36eaa5f There's no need to dynamically allocate the string buffer in
"col_prepend_fstr()" - just put it on the stack, and give it the size of
the largest string you'll stuff into it.

svn path=/trunk/; revision=4649
2002-01-31 08:03:39 +00:00
Guy Harris b539bcadd5 Don't include "inet_v6defs.h" in "column-utils.c"; nothing from it is
necessary.

Don't use "alloca()", as it's not guaranteed to be present on all
platforms.

svn path=/trunk/; revision=4644
2002-01-31 00:51:36 +00:00
Guy Harris c873f79156 Support for capturing on, and reading captures from, OpenBSD firewall
logging virtual interface, from Mike Frantzen.

svn path=/trunk/; revision=4616
2002-01-29 08:44:53 +00:00
Guy Harris 30a043931e From Jirka Novak:
Support for generating filter expressions based on packet list
	    column values
	Support for adding filter expressions generated from column or
	    protocol tree field values to the current expression rather
	    than replacing the current expression

svn path=/trunk/; revision=4522
2002-01-11 08:21:02 +00:00
Guy Harris 0823c63775 The packet length is an unsigned quantity; print it with "%u".
If we get an illegal column type in "fill_in_columns()", crash.

svn path=/trunk/; revision=4373
2001-12-10 02:15:54 +00:00
Guy Harris 23319ff023 Move the pointer to the "column_info" structure in the "frame_data"
structure to the "packet_info" structure; only stuff that's permanently
stored with each frame should be in the "frame_data" structure, and the
"column_info" structure is not guaranteed to hold the column values for
that frame at all times - it was only in the "frame_data" structure so
that it could be passed to dissectors, and, as all dissectors are now
passed a pointer to a "packet_info" structure, it could just as well be
put in the "packet_info" structure.

That saves memory, by shrinking the "frame_data" structure (there's one
of those per frame), and also lets us clean up the code a bit.

svn path=/trunk/; revision=4370
2001-12-10 00:26:21 +00:00
Gilbert Ramirez 8743a4a8a7 Remove the global packet_info called "pi". Dissectors now only
access their own "pinfo". A packet_info is stored in epan_dissect_t,
which is created for the dissection of a single packet.

GUI functions which need to access the packet_info of the currently
selected packet used to use "pi"; now they use cfile.edt->pi. cfile's
"edt" member is the epan_dissect_t of the currently-selected packet.

The functionality of blank_packetinfo() was moved into
dissect_packet(), as that's the only place that called blank_packetinfo(),
after a spurious call to blank_packetinfo() was removed from
packet_list_select_cb().

svn path=/trunk/; revision=4246
2001-11-21 23:16:26 +00:00
Guy Harris 07c2ce1bad Get rid of no-longer-necessary includes of <sys/time.h>.
svn path=/trunk/; revision=3936
2001-09-14 07:23:34 +00:00
Guy Harris 1d42c94b05 Make the resolution for time values be nanoseconds rather than
microseconds.

Fix some "signed vs. unsigned" comparison warnings.

svn path=/trunk/; revision=3934
2001-09-14 07:10:13 +00:00
Guy Harris b7255e108a Fixes, from Scott Renfro, for some calls to "localtime()" that didn't
check whether the call succeeded (it doesn't always do so on Windows,
for example).

svn path=/trunk/; revision=3722
2001-07-15 19:14:03 +00:00
Guy Harris 9b99fdd7ab Don't use "u_int" for IPv4 addresses in "column-utils.c", as that'll
require that it drag in <winsock.h> on Windows; instead, use "guint32".

svn path=/trunk/; revision=3245
2001-04-02 10:38:26 +00:00
Guy Harris 13681cf12b Include <sys/time.h> as well as <time.h> in "column-utils.c" and
"value_string.c", as they include "epan/to_str.h", and that uses "struct
timeval" in some function prototypes.

In "to_str.c", include <sys/types.h> before including <netinet/in.h>; on
at least some platforms, definitions in <netinet/in.h> require types
defined in <sys/types.h>.

In "to_str.c", include <sys/socket.h>, so that AF_INET6 is defined.

svn path=/trunk/; revision=3238
2001-04-02 02:30:06 +00:00
Ed Warnicke cd6ad9d4c0 Moved the the remaining column related routines out of packet.{c,h}
and into column-utils{c,h}.

svn path=/trunk/; revision=3231
2001-04-01 07:32:35 +00:00