Commit Graph

45 Commits

Author SHA1 Message Date
Guy Harris a64894be20 Fix up some comments.
svn path=/trunk/; revision=8731
2003-10-17 23:43:21 +00:00
Ronnie Sahlberg f82175b33a Add Raw Ethernet "encapsulation type" to framerelay.
This option allows proper dissection of those FrameRelay circuits where
raw ethernet is stashed without any encapsulation into the payload.

svn path=/trunk/; revision=8406
2003-09-06 12:31:32 +00:00
Guy Harris ea4ff6a749 From Josef Korelus <jkor [AT] quick.cz>: GPRS Network
Service-over-Frame-Relay support, including preference for Frame Relay
to select FRF 3.2/Cisco HDLC encapsulation or encapsulation of GPRS NS
PDUs.

svn path=/trunk/; revision=8362
2003-09-03 22:26:38 +00:00
Guy Harris afd3103ba2 Don't include <epan/conversation.h> if you don't need it.
svn path=/trunk/; revision=8361
2003-09-03 20:58:09 +00:00
Guy Harris e076cb925f Q.933 dissector. (Not complete.)
svn path=/trunk/; revision=8350
2003-09-03 05:39:21 +00:00
Guy Harris b58b71ec66 The first of those Trillium URLs referred to a collection of
specifications for their Frame Relay software products, not protocol
specifications.

svn path=/trunk/; revision=8348
2003-09-02 23:42:01 +00:00
Guy Harris 61deaa76a1 Fix up references to stuff on the Trillium Web site.
The control field is extended in Frame Relay (i.e., I and S frames have
two-byte control fields).

svn path=/trunk/; revision=8347
2003-09-02 23:37:48 +00:00
Guy Harris 79697e6fe4 As noted earlier, Q.922 doesn't really specify the NLPID-based
encapsulation, so don't tag the packet as having "Q.922 Encapsulation"
if it has NLPID-based encapsulation.  Don't tag it with "Cisco
Encapsulation", either - both of those can be inferred from the dissection.

svn path=/trunk/; revision=8336
2003-09-02 21:06:16 +00:00
Guy Harris 454806eeff Use "dissect_xdlc_control()" to dissect the control field of Frame Relay
packets that have one.  Add an argument to "dissect_xdlc_control()" to
indicate whether it should append the information to the Info field or
just put it in the Info field.

Use the #defines for the DLCI bitfields to extract the DLCI bits when
constructing the DLCI.

svn path=/trunk/; revision=8335
2003-09-02 19:18:52 +00:00
Guy Harris 7cb23da0fb Don't show the DTE/DCE direction indicators if they're not supplied.
svn path=/trunk/; revision=8334
2003-09-02 18:45:06 +00:00
Guy Harris 8aee4ddf4a Q.933 doesn't define the use of an NLPID in the payload of a Frame Relay
packet (Q.922 doesn't really do so, either, but...).

Do a full dissection of the octets of the address field, don't just
assume a 2-octet address field.

Clear the Info column.

svn path=/trunk/; revision=8333
2003-09-02 18:33:11 +00:00
Guy Harris daeac95d4a Don't export "osinl_subdissector_table" or "ppp_subdissector_table" -
have other dissectors that use them fetch them with
"find_dissector_table()".

svn path=/trunk/; revision=7601
2003-04-29 17:56:49 +00:00
Guy Harris f88816e60f Add WTAP_ENCAP_FRELAY_WITH_PHDR for use with Frame Relay capture files
that have direction information.

Support writing WTAP_ENCAP_FRELAY_WITH_PHDR and WTAP_ENCAP_PPP_WITH_PHDR
captures out in libpcap format - we throw away the direction
information, but so it goes.

When reading/writing Windows Sniffer format, read and write the
direction flag.

svn path=/trunk/; revision=7052
2003-01-31 01:02:14 +00:00
Guy Harris 28c1a65e85 Add in a notion of "circuits", which are for virtual circuit-oriented
protocols (where there's a virtual circuit ID of some sort in packets)
what conversations are for protocols ultimately running atop
connectionless network layers.  Have circuit type and ID values in the
"packet_info" structure.

Have the Frame Relay dissector set the circuit type and ID values, and
have the Wellfleet compression protocol set up circuit information and
store compression information with the circuit.

svn path=/trunk/; revision=6469
2002-10-22 08:22:07 +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
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 5d929e0e8f From Motonori Shindo: support for reading CoSine L2 debug output.
svn path=/trunk/; revision=5922
2002-07-31 19:27:57 +00:00
Guy Harris ee5ca25d31 Include files from the "epan" directory and subdirectories thereof with
"epan/..." pathnames, so as to avoid collisions with header files in any
of the directories in which we look (e.g., "proto.h", as some other
package has its own "proto.h" file which it installs in the top-level
include directory).

Don't add "-I" flags to search "epan", as that's no longer necessary
(and we want includes of "epan" headers to fail if the "epan/" is left
out, so that we don't re-introduce includes lacking "epan/").

svn path=/trunk/; revision=4586
2002-01-21 07:37:49 +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
Guy Harris 75cc056222 Attach a descriptive name field type and base to dissector tables; that
specifies how the selector values used as keys in those tables are to be
displayed, and the title to use when displaying the table.

Use that information in the code to display the initial and current
entries of various dissector tables.

Have the dissector for BACnet APDUs register itself by name, and have
the BACnet NPDU dissector call it iff the BAC_CONTROL_NET bit isn't set,
rather than doing it with a dissector table.

svn path=/trunk/; revision=4358
2001-12-08 06:41:48 +00:00
Guy Harris bced8711f6 Make "dissector_add()", "dissector_delete()", and "dissector_change()"
take a dissector handle as an argument, rather than a pointer to a
dissector function and a protocol ID.  Associate dissector handles with
dissector table entries.

svn path=/trunk/; revision=4308
2001-12-03 04:00:26 +00:00
Guy Harris 8eba148155 An NLPID of 1 means T.70 when used as an X.263/ISO 9577 initial protocol
identifier, but means X.29 when used as an X.263/ISO 9577 secondary
protocol identifier.

Add support for the IPv6 NLPID, and Ethernet type, in more places.

Fix up the handling of the user data of a CALL REQUEST packet to more
correctly distinguish between user data containing an NLPID and user
data containing an X.264/ISO 11570 UN TPDU.  If it's an NLPID, use
"nlpid_vals" to show its value.

Put that user data in a subtree.

Create a new "x.25.spi" dissector table, for protocols running atop
X.25, rather than having a built-in switch statement, so that other
protocols can register themselves by NLPID.

svn path=/trunk/; revision=4300
2001-12-02 00:07:46 +00:00
Guy Harris 9161ba8e7f Make "fr_subdissector_table" static - it's not used outside the Frame
Relay dissector.

svn path=/trunk/; revision=4298
2001-11-30 04:39:45 +00:00
Guy Harris 95267f647a Get rid of some code to set "pinfo->current_proto"; let the Ethereal
infrastructure do it for the dissectors.

Make some WCP dissector routines static.

svn path=/trunk/; revision=4283
2001-11-27 07:36:23 +00:00
Guy Harris 07b2709f8a Change "conversation_set_dissector()" to take a dissector handle, rather
than a pointer to a dissector function, as an argument.

This means that the conversation dissector is called through
"call_dissector()", so the dissector itself doesn't have to worry about
checking whether the protocol is enabled or setting
"pinfo->current_proto", so get rid of the code that does that in
conversation dissectors.  Also, make the conversation dissectors static.

Get rid of some direct calls to dissectors; replace them with calls
through handles, and, again, get rid of code to check whether a protocol
is enabled and set "pinfo->current_proto" where that code isn't needed.
Make those dissectors static if they aren't already static.

Add a routine "create_dissector_handle()" to create a dissector handle
without registering it by name, if the dissector isn't used outside the
module in which it's defined.

svn path=/trunk/; revision=4281
2001-11-27 07:13:32 +00:00
Ed Warnicke 4877553530 Switched from using CHECK_DISPLAY_AS_DATA to using CHECK_DISPLAY_AS_X
which also takes a handle as an argument and thus doesn't call
dissect_data directly.

svn path=/trunk/; revision=4270
2001-11-26 05:13:14 +00:00
Ed Warnicke c97f7034a8 Moved from using dissect_data to using call_dissector()
svn path=/trunk/; revision=4266
2001-11-26 01:03:35 +00:00
Guy Harris 8412393197 From Joerg Mayer: explicitly fill in all members of a
"header_field_info" structure, including the ones that are later set by
the routines to register fields.

svn path=/trunk/; revision=3561
2001-06-18 02:18:27 +00:00
Guy Harris 2aa31bea47 Move the declaration of "etype_vals[]" from "epan/packet.h" to
"etypes.h".

svn path=/trunk/; revision=3314
2001-04-17 06:43:21 +00:00
Guy Harris 734e904045 In various Frame Relay and PPP routines that set the length of the
top-level protocol tree items, use "offset" to set the length, rather
than fetching the length of the item - "offset" is the offset from the
beginning of the Frame Relay or PPP header just past the last field
processed in that header, so it indicates how much of the header we've
processed.

svn path=/trunk/; revision=3215
2001-03-31 10:35:54 +00:00
Guy Harris 6556578270 Call the encapsulation described in Annex E of Q.933 "Q.933
Encapsulation", not "IETF Encapsulation" - RFC's 1490 and 2427 include
stuff from that appendix, but say that Annex E is the authoritative
source for that information.

Include the second byte of the Cisco HDLC type in the top-level protocol
tree item.

svn path=/trunk/; revision=3213
2001-03-30 11:14:41 +00:00
Guy Harris a8cbb073d4 NLPID's of 0x08 and 0x09 should be labeled as Q.933 and LMI,
respectively, not Q.931 and Q.2931, in Frame Relay.

When dissecting Q.933-style multiprotocol encapsulated Frame Relay
frames, use the "osinl" dissector table to check for OSI network layer
protocols, include the NLPID in the tvbuff you hand to
"dissector_try_port()" with that dissector table, and put the NLPID into
the protocol tree as an invisible item - the NLPID is considered part of
the PDU for those protocols, so you have to include it in the tvbuff,
and the dissector will put it into the protocol tree.

Also, make sure the top-level entry for the Frame Relay protocol
includes all the bytes preceding the payload, and none of the payload
bytes.

Export a routine to do Q.933-style dissection, and have the WCP
dissector call it, rather than duplicating that code in the WCP
dissector.

Don't register OSI network layer protocols with the "fr.ietf" dissector
table; it's now sufficient to register them with the "osinl" dissector
table, as the Frame Relay dissector now checks that.

Get rid of unnecessary checks for protocols being enabled (if the
dissector is always called through handles or dissector tables, the
common code for handles and dissector tables will do the checks for
you).

Get rid of some unnecessary #includes.

svn path=/trunk/; revision=3211
2001-03-30 10:51:50 +00:00
Guy Harris 41904dc303 Add WCP to the list of Ethernet types in "etype_vals[]", and add
"compressed" to the list of NLPIDs in "nlpid_vals[]".

Use "nlpid_vals" for the Frame Relay NLPID field.

svn path=/trunk/; revision=3206
2001-03-29 08:05:07 +00:00
Guy Harris 8f43649bcb Add a macro to extract the DLCI from the address field.
Extract the DLCI only once.

svn path=/trunk/; revision=3178
2001-03-23 23:56:03 +00:00
Guy Harris 5632391770 Pull the NLPID for Wellfleet compression into "nlpid.h".
svn path=/trunk/; revision=3173
2001-03-23 21:49:23 +00:00
Jeff Foster c400685ad6 Updated the frame relay dissector - dissect-fr.c
Added the LMI dissector for frame relay - dissect-lmi.c
Added Wellfleet compression dissector - dissect-wcp.c

svn path=/trunk/; revision=3168
2001-03-23 19:22:02 +00:00
Guy Harris 7ecac8fbd0 Add a new Wiretap encapsulation type for Cisco HDLC. Map the NetBSD
DLT_HDLC to it.

Make a separate dissector for Cisco HDLC, and add a dissector for Cisco
SLARP.  Have the PPP dissector call the Cisco HDLC dissector if the
address field is the Cisco HDLC unicast or multicast address.  Use the
Cisco HDLC dissector for the Cisco HDLC Wiretap encapsulation type.

Add a new dissector table "chdlctype", for Cisco HDLC packet types
(they're *almost* the same as Ethernet types, but 0x8035 is SLARP, not
Reverse ARP, and 0x2000 is the Cisco Discovery protocol, for example),
replacing "fr.chdlc".

Have a "chdlctype()" routine, similar to "ethertype()", used both by the
Cisco HDLC and Frame Relay dissectors.  Have a "chdlc_vals[]"
"value_string" table for Cisco HDLC types and protocol names.  Split the
packet type field in the Frame Relay dissector into separate SNAP and
Cisco HDLC fields, and give them the Ethernet type and Cisco HDLC type
"value_string" tables, respectively.

svn path=/trunk/; revision=3133
2001-03-15 09:11:03 +00:00
Guy Harris 32d63ecb30 Remove more "CHECK_DISPLAY_AS_DATA()" calls and "pinfo->current_proto ="
statements.

Move the setting of the Protocol column in various dissectors before
anything is fetched from the packet, and also clear the Info column at
that point in those and some other dissectors, so that if an exception
is thrown, the columns don't reflect the previous protocol.

"Tvbuffify" the Mobile IP dissector (it took old-style arguments, and
then converted them into tvbuff arguments, so there wasn't much to do,
other than to fix references to "fd" to refer to "pinfo->fd").

In the SCTP dissector, refer to the port type and source and destination
ports through "pinfo" rather than through the global "pi", as it's a
tvbuffified dissector.

In the SMTP and Time Protocol dissectors, use "pinfo->match_port" rather
than "TCP_PORT_SMTP" when checking whether the packet is a request or
reply, just in case somebody makes a non-standard port be dissected as
SMTP or Time.  (Also, remove a bogus comment from the Time dissector; it
was probably cut-and-pasted from the TFTP dissector.)

svn path=/trunk/; revision=2938
2001-01-25 06:14:14 +00:00
Guy Harris 914d1da71f Make GRE use a dissector table for its protocol types, and register
dissectors for protcools that can be encapsulated inside GRE in that
table.

Fix a bug in the handling of WCCPv2 IP encapsulation (it was
constructing the next tvbuff before, rather than after, advancing the
offset past the redirection header).

svn path=/trunk/; revision=2893
2001-01-13 07:47:49 +00:00
Guy Harris 039bd984c0 Make the stuff to handle SNAP frames (OUI, PID, payload) a routine of
its own; it's used not only by LLC, but by Frame Relay with RFC 2427 and
ATM with RFC 2684.

Support for RFC 2427-encapsulation Frame Relay packets, from Paul
Ionescu.

Get rid of the CISCO_IP PPP protocol type - Cisco HDLC uses, in most
cases, Ethernet packet types, so use ETHERTYPE_IP instead (they're both
0x0800).

svn path=/trunk/; revision=2854
2001-01-10 09:07:35 +00:00
Guy Harris 0998433430 Register the IPX dissector, make it static, and call it through a
handle.

Call the IP dissector through a handle in the Frame Relay dissector.

svn path=/trunk/; revision=2851
2001-01-09 09:59:28 +00:00
Guy Harris 43ccfd8054 Add an additional "protocol index" argument to "{old_}dissector_add()",
"{old_}heur_dissector_add()", "{old_}conv_dissector_add()", and
"register_dissector()", so that an entry in those tables has associated
with it the protocol index of the protocol the dissector handles (or -1,
if there is no protocol index for it).

This is for future use in a number of places.

(Arguably, "proto_register_protocol()" should take a dissector pointer
as an argument, but

	1) it'd have to handle both regular and heuristic dissectors;

	2) making it take either a "dissector_t" or a union of that and
	   a "heur_dissector_t" introduces some painful header-file
	   interdependencies

so I'm punting on that for now.  As with other Ethereal internal APIs,
these APIs are subject to change in the future, at least until Ethereal
1.0 comes out....)

svn path=/trunk/; revision=2849
2001-01-09 06:32:10 +00:00
Guy Harris 3f75680191 Code to handle Frame Relay Sniffer captures, from Jeff Foster.
Code to register the Frame Relay dissector to handle Frame Relay
captures, from Paul Ionescu.

svn path=/trunk/; revision=2845
2001-01-08 22:18:22 +00:00
Guy Harris c6381f45b0 Fix the Frame Relay dissector to call subdissectors regardless of
whether a full protocol tree dissection is being done or not.

svn path=/trunk/; revision=2843
2001-01-07 22:18:32 +00:00
Guy Harris 6cc7a2e804 Frame Relay and Frame-Relay-over-GRE support, from Paul Ionescu.
Fix the GRE dissector to call subdissectors regardless of whether a full
protocol tree dissection is being done or not.

svn path=/trunk/; revision=2842
2001-01-07 22:08:31 +00:00