Commit Graph

135 Commits

Author SHA1 Message Date
Anders Broman 26372ed66a Add doxygen hints.
svn path=/trunk/; revision=44882
2012-09-12 10:27:37 +00:00
Jakub Zawadzki 5ad3e5331e MT: move global frame_end_routines to packet_info.
svn path=/trunk/; revision=44748
2012-09-03 12:00:40 +00:00
Jakub Zawadzki bf81b42e1e Update Free Software Foundation address.
(COPYING will be updated in next commit)

svn path=/trunk/; revision=43536
2012-06-28 22:56:06 +00:00
Jeff Morriss d4fdd6ad52 Only propose decoding PPID 0 if that PPID is in the currently-selected frame.
(I used PPID 0xffffffff as an end-of-list marker so that PPID can no longer
be used in this dialog; if someone starts using that PPID then we'll have
to put a count of PPIDs in pinfo.)

svn path=/trunk/; revision=42991
2012-06-01 21:18:59 +00:00
Jeff Morriss 89cfdc3559 Fix https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=3315 -
make Save-As/Displayed/All-Packets save not only the displayed packets but
also any other packets needed (e.g., for reassembly) to fully dissect the
displayed packets.

This works only for the "All packets" case; choosing only the Selected packet,
the Marked packets, or a range of packets would require actually storing which
packets depend on which (too much memory) or going through the packet list many
times (too slow).  Also, this behavior is always the case: you can't save the
displayed packets without their dependencies (I don't see why this would be
desirable).

So far this is done for SCTP and things using the reassembly routines (TCP has
been tested).

The Win32 dialog was modified but hasn't been tested yet.

One confusing aspect of the UI is that the Displayed count in the Save-As
dialog does not match the number of displayed packets.  (I tried renaming the
button "Displayed + Dependencies" but it looked too big.)  The tooltip tries
to explain this and the fact that this works only in the All-Packets case;
suggestions for improvement are welcome.


Implementation details:

Dissectors (or the reassembly code) can list frames which were needed to
build the current frame's tree.  If the current frame passes the display
filter then each listed frame is marked as "depended upon" (this takes up the
last free frame_data flag).

When performing a Save-As/Displayed/All-Packets then choose packets which
passed the dfilter _or_ are depended upon.

svn path=/trunk/; revision=41216
2012-02-28 03:19:49 +00:00
Chris Maynard 647c5c0b27 packet_info's in_error_pkt is now a bitfield like in_gre_pkt.
svn path=/trunk/; revision=39764
2011-11-08 18:39:11 +00:00
Chris Maynard d55d8781b8 Improve ICMP conversation tracking, especially when capturing on multiple interfaces and one of them is a GRE tunnel. Resolves bug 5770, which was reopened.
svn path=/trunk/; revision=39757
2011-11-08 17:25:22 +00:00
Stig Bjørlykke 82e0b65038 Added a private hash table to transport string values between dissectors.
This works between C and Lua.

In C the pinfo.private_table pointer must be initialized using
g_hash_table_new (g_str_hash, g_str_equal);

In Lua the values are available using pinfo.private.<key>, and the
table is created automatically on first usage.  It's possible to use
this datatypes: nil, boolean, number and string, but every value
is converted to string so numbers must be converted using tonumber()
on usage.  Boolean is either nil or an empty string.

svn path=/trunk/; revision=39461
2011-10-18 17:46:00 +00:00
Guy Harris a8bc4a0d13 Rename the routines that handle dissector tables with unsigned integer
keys to have _uint in their names, to match the routines that handle
dissector tables with string keys.  (Using _port can confuse people into
thinking they're intended solely for use with TCP/UDP/etc. ports when,
in fact, they work better for things such as Ethernet types, where the
binding of particular values to particular protocols are a lot
stronger.)

svn path=/trunk/; revision=35224
2010-12-20 05:35:29 +00:00
Gerald Combs 1bac7c2610 From Chris Maynard via bug 4014:
This trivial patch merely displays the ICMP ID and sequence # in the Info
column.

svn path=/trunk/; revision=33056
2010-06-02 18:13:00 +00:00
Kovarththanan Rajaratnam b3b9be09c7 We track all protocols that appear in each packet in the frame dissector. This is an expensive operation because we:
* Disable the TRY_TO_FAKE_THIS_ITEM optimization
* Use GString to store the protocols

We should only do this if the 'hf_frame_protocols' is referenced (unlikely)

svn path=/trunk/; revision=29733
2009-09-06 07:55:17 +00:00
Anders Broman a98ce52e80 From Artem Tamazov:
Added: PW ATM 1:1, AAL5 SDU, AAL5 PDU support + BFD fix + PW ATM OAM fix

svn path=/trunk/; revision=28881
2009-06-29 19:24:14 +00:00
Anders Broman c2509b0b3f Handle Detach and Service request, make it possible to set direction on link(UL/DL).
svn path=/trunk/; revision=28648
2009-06-06 17:03:34 +00:00
Gerald Combs f5e8e21ce2 From Owen Kirby via bug 3431:
The attached patch file adds dissectors for the ZigBee protocol stack, 
which runs atop the IEEE 802.15.4 dissector. Also included is the
dissector for the ZigBee Encapsulation Protocol (packet-zep.c), used by
the Exegin Q51 protocol analyzer.

From me:

Fix a bunch of gcc (the compiler, not me) warnings.

svn path=/trunk/; revision=28429
2009-05-20 19:29:39 +00:00
Anders Broman e0cf1679e3 From Francesco Fondelli:
New ATM PW (with/without CW) dissector, RFC 4717
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=3375

svn path=/trunk/; revision=27955
2009-04-04 11:48:19 +00:00
Stephen Fisher 18f3436e85 Add support for reading Apple's Bluetooth PacketLogger capture files to
wiretap.  Modify various other locations to accommodate the fact that
PacketLogger files do not specify the direction of packets. 


svn path=/trunk/; revision=27463
2009-02-16 07:24:04 +00:00
Tomas Kukosa 99295ee0d2 put the SCTP PPI for current DATA chunk into packet_info (and ppid array renamed to ppids)
svn path=/trunk/; revision=26958
2008-12-10 11:04:36 +00:00
Jaap Keuter e86825b8f8 From Francesco Fondelli:
Attached is a patch for:
- PW Associated Channel Header dissection as per RFC 4385
- PW MPLS Control Word dissection as per RFC 4385
- mpls subdissector table indexed by label value
- enhanced "what's past last mpls label?" heuristic
- Ethernet PW (w/o CW) support as per RFC 4448

svn path=/trunk/; revision=25730
2008-07-13 17:19:33 +00:00
Jaap Keuter 1987d5e3af Update comments.
svn path=/trunk/; revision=24600
2008-03-10 17:33:53 +00:00
Ulf Lamping 5c86e7fd4c add pinfo fields clnp_srcref and clnp_dstref to the clnp dissector, similar to the srcport / destport already existing. As simply using srcport / destport for this will confuse mixed protocol usage (like RFC1006 ISOonTCP), I've added explicit clnp fields.
This way, protocols on top of COTP / CLNP have at least a chance to do reassembling correct.

svn path=/trunk/; revision=22473
2007-08-08 22:53:14 +00:00
Ulf Lamping 12aed7290c - add PDInterfaceFSUDataAdjust block
- start to implement an AR conversation handler

svn path=/trunk/; revision=22444
2007-08-03 19:29:34 +00:00
Guy Harris 230c951306 From Stephen Donnelly of Endace:
The code for reading ERF files has not been significantly
	updated since 2004.  This patch brings it up to date with a
	number of changes.

	1) Increase number of decodable ERF types from 7 to 12. This
	   covers newer DAG card models and firmware updates.

	2) Fix timestamp conversion. Was calculating only microsecond
	   precision, now displaying with nanosecond resolution.  Hardware
	   precision is 7.5 to 30 ns depending on model.

	3) Allow the user to specify HDLC encapsulation as 'chdlc',
	   'ppp_serial', 'frelay' or 'mtp2'.  This is needed because the
	   ERF HDLC capture formats do not include information on what
	   protocol is used at the next level.  This is currently done via
	   an environment variable 'ERF_HDLC_ENCAP' and is analagous to the
	   existing 'ERF_ATM_ENCAP' variable.

	   If the user does not specify an HDLC encapsulation it tries to
	   guess, and falls back to MTP2 for backwards compatibility with
	   Florent's existing behaviour.

	   I know environment variables are ugly, suggestions are welcome.

	4) When reading HDLC captures as MTP2, use
	   WTAP_ENCAP_MTP2_WITH_PHDR rather than WTAP_ENCAP_MTP2.  This
	   allows us to put the 'Multi-Channel ERF' record 'channel
	   number' field into the MTP2 pseudo header > 'link_number'
	   field.  This is then displayed in Frame information, and can
	   be filtered on.  (Would be nice if it could be made a display
	   column?)

	Because the ERF record does not specify whether Annex A is used
	or not, we pass MTP2_ANNEX_A_USED_UNKNOWN and allow the existing
	user preference to decide.

Move the MTP2_ANNEX_A_ definitions into Wiretap, make the annex_a_used
field a guint8, and change MTP2_ANNEX_A_USED_UNKNOWN to 2 so it fits in
a guint8.  (This means that if you can save an ERF MTP2 file as a
libpcap file, the pseudo-header will have MTP2_ANNEX_A_USED_UNKNOWN in
it.)

svn path=/trunk/; revision=22067
2007-06-08 17:06:13 +00:00
Luis Ontanon 5fa8e75149 packet_info.c and packet.c
add sccp_info to struct _packet_info (Sorry but the way private_data works and the fact that TCAP uses it and BSSAP/RANAP can be tunnelled on GSMMAP over TCAP makes it impossible to avoid)

SCCP
- Have SCCP to have a TAP,
- Fix associations so that every message belongs to the association.
- Export message type values so that they can be used by a tap listener

RANAP
 - Have RANAP information attached to the sccp_info 

BSSAP + GSM_A
- Have DTAP, BSSMAP and BSSAP info attached to the sccp_info

svn path=/trunk/; revision=21076
2007-03-21 00:48:46 +00:00
Jörg Mayer 147d66441e dcerpc_procedure_name is actually a const char*, not just char*
svn path=/trunk/; revision=21010
2007-03-09 13:13:44 +00:00
Ronnie Sahlberg 8ed1260c2c add a field in pinfo where dcerpc/pidl can store the name of the current dcerpc procedure
use this field in the policy handle helper to indicate not only which frames the handle was opened/close in but also the name of the function that opened it.
eventually, when other pidl support infrastructure is developed it would be nice if this could be expanded to also contain the name of the object/handle opened.



svn path=/trunk/; revision=20895
2007-02-21 20:21:11 +00:00
Ronnie Sahlberg 5a0ba5b0c7 fix for bug 1200
there used to be a bug in tcp reassembly that even if the dissector only asked for x more bytes from the next segment   the entire segment would still be added to reassembly.
this caused some issues when there was a new multisegment pdu that started at the end of the segment   but this bug was fixed when tcp reassembly was refactored semi-recently.


there was also another "bug" in the http reassembly that it would only ask for one more byte at a time when doing reassembly.
this did work well however when we still had the bug in tcp reassembly   but made wireshark become very very very slow once this tcp bug was fixed  since it is very very very slow to reassemble a huge http pdu just one byte at a time.


this patch adds partial support (what we need for http   which does not use tcp_dissect_pdus() ) for the desegmentation flag : DESEGMENT_ONE_MORE_SEGMENT and also to the http dissector   so that reassembly of http headers spanning multiple semgents now become fast again



svn path=/trunk/; revision=19859
2006-11-07 13:19:31 +00:00
Ronnie Sahlberg cd02551610 add a tcp_tree field to packet_info so that we can access the tree from tcp_dissect_pdus() (and others if need be)
in tcp_dissect_pdus()  add a field ( tcp.pdu.size ) to the tree that displays the pdu size.



svn path=/trunk/; revision=19655
2006-10-22 00:21:40 +00:00
Ronnie Sahlberg f956bad366 we need a new pinfo member field so that we can pass data from the core usb dissector to future class dissectors
svn path=/trunk/; revision=19576
2006-10-17 14:13:49 +00:00
Ronnie Sahlberg 6d3c94a53a implement support to reassemble tcp sessions until the end of the session (FIN)
add required code to the http (and others) code in req_resp_hdrs.c to signal to tcp
when it wants a session to be reassembled to the FIN.

This is currently done for all HTTP packets where we have a Content-type in the header but no content-length.




svn path=/trunk/; revision=19185
2006-09-10 14:03:08 +00:00
Ulf Lamping f4c7cae6b0 add various enhancements to the CBA-ACCO dissector, including an added profinet_type field to the packet_info struct
svn path=/trunk/; revision=18615
2006-06-29 19:46:51 +00:00
Ronnie Sahlberg 89f022b12b name change
svn path=/trunk/; revision=18197
2006-05-21 05:12:17 +00:00
Jörg Mayer 30a8557868 More 'char*' -> 'const char*' changes to fix warnings.
svn path=/trunk/; revision=15015
2005-07-23 11:41:25 +00:00
Anders Broman f01b2b6197 From Mike Duigou:
A few doxygen updates and an improved section on 
writing dissectors that don't use tcp_dissect_pdus().

svn path=/trunk/; revision=14537
2005-06-03 06:35:44 +00:00
Michael Tüxen 23d022349d - Add support for libpcap files for MTP2 with a per packet header
indicating the direction, narrowband/broadband, and interface number.
- Add support to display the direction and interface number.
- Add support to packet-mtp2.c to use the broadband/narrowband indication.

svn path=/trunk/; revision=14265
2005-05-02 14:07:33 +00:00
Guy Harris 90f8224360 Have GSS-API subdissectors supply a "data is encrypted" flag to their
callers, so that they can tell "no decrypted tvbuff because I couldn't
decrypt it" from "no decrypted tvbuff because it's not encrypted in the
first place".  Set that based on the Kerberos seal algorithm field in
the SPNEGO Kerberos 5 wrap dissector code.

Use that to determine whether the GSS-API encapsulated data in LDAP is
encrypted or not., rather than using a heuristic.

Set the length of the SASL blob tvbuff based on the SASL length and the
length of the tvbuff from which it's consstructed, rather than setting
it to the SASL length.

svn path=/trunk/; revision=13780
2005-03-16 21:59:25 +00:00
Ronnie Sahlberg 1564a2d2d3 add two nice defines for how to decrypt a GSSKRB tvb
dce has slightly different padding and checksumming so we have to tell decrypt_arcfour() about it.



svn path=/trunk/; revision=13689
2005-03-10 08:52:59 +00:00
Ronnie Sahlberg 9d20ee0a39 gssapi decryption nees a few new fields to pass the blobs from application layer dissector all the way down to spnego or friends and back.
svn path=/trunk/; revision=13658
2005-03-08 09:43:36 +00:00
Guy Harris 9105f362c2 Make the DCE transport type an "int" so that -1 is a valid value and the
compiler doesn't say "that's unsigned, it can't possibly be equal to -1".

svn path=/trunk/; revision=13526
2005-02-25 23:44:44 +00:00
Ronnie Sahlberg 4a338216da pinfo->private_data was a quite subptimal idea
change the decodeas for dcerpc so that it actually works again for dcerpc over smb



svn path=/trunk/; revision=13515
2005-02-25 10:30:21 +00:00
Gerald Combs 561fbc8b25 Add a field called "frame.protocols" which shows the protocols present
in the frame.   The filter "frame.protocols contains ip:icmp:ip" could
be used to find any ICMP packets containing IP headers.

Clean up whitespace.

svn path=/trunk/; revision=13118
2005-01-19 04:49:29 +00:00
Michael Tüxen 3ae576310c Add the capability to chose to remap the fist two PPIDS in each SCTP packet to a different dissector.
svn path=/trunk/; revision=11912
2004-09-06 15:04:27 +00:00
Ulf Lamping 4777e5ef7b From Eric Wedel: backend things for "Decode As" of DCE-RPC interfaces
svn path=/trunk/; revision=11894
2004-09-04 11:35:26 +00:00
Guy Harris 2ad97737fe Pull the address (and port and circuit type) stuff out of
"epan/packet_info.h" and put it in "epan/address.h".

Use the AT_ values from "epan/address.h" for address types in the
interface lists rather than having our own FAM_ enums.

svn path=/trunk/; revision=11427
2004-07-19 02:27:17 +00:00
Guy Harris 8a8b883450 Set the svn:eol-style property on all text files to "native", so that
they have LF at the end of the line on UN*X and CR/LF on Windows;
hopefully this means that if a CR/LF version is checked in on Windows,
the CRs will be stripped so that they show up only when checked out on
Windows, not on UN*X.

svn path=/trunk/; revision=11400
2004-07-18 00:24:25 +00:00
Ronnie Sahlberg e790073f3a Updates from Richard v d Hoff
IAX2 updates and a CRC16 routine

svn path=/trunk/; revision=11233
2004-06-25 06:31:47 +00:00
Guy Harris 30b2831847 Add support for DLT_APPLE_IP_OVER_IEEE_1394.
svn path=/trunk/; revision=10446
2004-03-23 01:02:41 +00:00
Guy Harris d4b00639d6 From Jeff Morriss:
support the ISUP CIC as a circuit ID;

	add a preference option to control whether to put the CIC into
	the Info column or not.

svn path=/trunk/; revision=10265
2004-02-29 08:47:11 +00:00
Guy Harris 354b911d05 Add a "saved_can_desegment" field to the "packet_info" structure, so
that dissectors for pass-through proxying protocols such as SOCKS can
allow the subdissectors they call to ask that desegmentation be done.

svn path=/trunk/; revision=9488
2003-12-29 22:44:50 +00:00
Olivier Biot 2a6e130e10 Move the GSM SMS dissection to a dedicated subdissector (currently still within
packet-smpp.c).

Now the higher-level protocols show up without the need of unfolding the SMPP
dissector tree.

Add a new address type AT_STRINGZ, and use it for GSM SMS message reassembly.

Get rid of the different UDH IE subtrees, and replace them with one subtree
for all UDH IEs.

Add debug logging to SMPP and SMPP GSM SMS dissectors.

Move the Short Message reassembly from the SMPP dissector to the SMPP GSM SMS
dissector. Fix duplicated "reassembled in" header fields.

Rename header fields that are now part of SMPP GSM SMS (including the dissector
table name, so it has also been updated in packet-wsp.c and packet-wtp.c).

Add an explicit "if (!tree) return" in the WSP add_headers() method.

NOTE: it would be great if we were able to merge the existing packet-gsm_sms.c
and the SMPP GSM SMS dissector.

svn path=/trunk/; revision=9431
2003-12-23 12:07:14 +00:00
Guy Harris d06dc0727a From Michael Lum: support an AT_SS7PC address type for SS7 point codes,
and set the direction in pinfo for SS7 packets based on source and
destination addresses.

svn path=/trunk/; revision=9209
2003-12-08 21:36:53 +00:00
Guy Harris 364261f0ad From Olivier Biot:
* Add a "match_string" field to the "packet_info" structure,
	  saving the string value that matched in a string dissector
	  lookup, by analogy to "match_port" - this was required for
	  dissection with token rendering of WBXML content when no public
	  ID was given (e.g. Nokia/Ericsson OTA provisioning data).
	* Add support for textual content type based WBXML token
	  mapping.
	* Add extra WBXML public identifiers.
	* Add the Nokia/Ericsson OTA provisioning (version 7) token
	  definitions.
	* Inform the user when a content-type based token match is found.

svn path=/trunk/; revision=9061
2003-11-21 21:58:55 +00:00
Guy Harris c37d30442f From Dinesh Dutt:
- Dissector for FICON
	- Dissector for FC-SP (Security Protocol for Fibre Channel)
	- Patches to correct the reassembly of FC fragments.
	- Support for new MDS Port Analyzer Adapters that carry the
	  frame length for truncated frames.

svn path=/trunk/; revision=8823
2003-10-30 02:06:13 +00:00
Guy Harris 04674dc949 Catch exceptions when dissecting a verifier, so we still dissect the
stub data even if there's a problem dissecting the verifier.

Show stub data as "Encrypted stub data" if it's encrypted, "Decrypted
stub data" if it was encrypted but we decrypted it, and "Stub data" if
it wasn't encrypted.

Don't attempt to decrypt data unless it was encrypted (i.e., the
authentication level is "Packet privacy".

Get rid of "decrypted_data" member of "packet_info" structure - we don't
need it any more.

svn path=/trunk/; revision=8743
2003-10-21 07:17:16 +00:00
Ronnie Sahlberg cb5e97d49a Update to TCP to handle hints from dissectors where the next PDU may start.
ONCRPC dissector updated to provide hint to TCP where the next RPCoverTCP
PDU starts as example.
Trivial updates to the other TCP based protocols required to amke them handle
this as well.  See the updates to packet-rpc.c as an example.

This is enabled by activating tcp analysis and provides hints to TCP to know where PDUs starts when not aligned to the start of the segment.

svn path=/trunk/; revision=7543
2003-04-23 10:20:29 +00:00
Guy Harris 5e665db815 Assume all AT_NONE addresses are the same, as they have no address data
to compare; based on a change from Laurent Meyer.

svn path=/trunk/; revision=7222
2003-02-28 20:30:06 +00:00
Guy Harris 4156806b8b From Didier Gautheron: provide a mechanism to indicate why reassembly
wasn't done, and, for TCP, use that mechanism if reassembly isn't done
is an incorrect TCP checksum.

svn path=/trunk/; revision=7212
2003-02-27 03:56:48 +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
Jörg Mayer 87b638a94f pointer spells with an o
svn path=/trunk/; revision=6857
2003-01-06 19:08:37 +00:00
Ronnie Sahlberg a80ddab6fd Update DCERPC so that for (NTLMSSP) PDUs that have been decrypted
we also call the proper DCERPC subdissector.

With this change ethereal will call the SAMR dissector and dissect the
decrypted SAMR packets in devins capture.

svn path=/trunk/; revision=6855
2003-01-06 11:27:03 +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 8181a83657 Allow more than one circuit with the same circuit ID; a circuit has a
starting and ending frame number, and circuits with the same circuit ID
are sorted by the starting frame number (the last circuit can have 0 as
the ending frame number, meaning "unknown"), and, when looking up a
circuit, we take a frame number as an argument and return the circuit
that includes that frame.

Add a new circuit ID type for X.25 virtual circuits, and use the circuit
mechanism to keep track of the dissector for an X.25 virtual circuit
rather than having a private mechanism.

svn path=/trunk/; revision=6580
2002-11-08 01:00:07 +00:00
Guy Harris 56f644145e Discard the WTAP_ENCAP_LAPD encapsulation type in favor of a
WTAP_ENCAP_ISDN encapsulation type, which includes a pseudo-header
giving the direction (user-to-network or network-to-user) and the
channel number.

Add a new circuit type, using the ISDN channel number as the circuit ID.

Add an ISDN dissector to put the direction and channel number into the
protocol tree and to call the appropriate dissector for the payload
based on the channel (LAPD for the D channel; V.120, PPP, or data for B
channels, based on some heuristics).

svn path=/trunk/; revision=6521
2002-10-31 07:12:42 +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
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
Guy Harris fdf6f47176 Fix the comment before "CMP_ADDRESS()" to reflect reality ("memcmp()"
isn't guaranteed to return 0, 1, or -1, it returns *some* positive
number, not necessarily 1, if the first argument is greater than the
second, and *some* negative number, not necessarily -1, if the first
argument is less than the second).

svn path=/trunk/; revision=6063
2002-08-22 18:53:54 +00:00
Ronnie Sahlberg c56dc7ea38 Fix small typo
svn path=/trunk/; revision=5920
2002-07-31 11:16:19 +00:00
Ronnie Sahlberg e930dd4a31 Adding a new macro CMP_ADDRESS similar to ADDRESS_EQUAL but this one will return
-1,0,1 as the xxxcmp() functions will instead of just true/false.
Useful if you not only want to check for equality but also if you want to have a way to order the elements.

svn path=/trunk/; revision=5917
2002-07-31 06:15:26 +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 392a7dfc04 Get rid of the "data_src" member of the "frame_data" structure; put it
in the "packet_info" structure instead, as we don't need a pointer for
every single frame in the capture file, just for each frame for which we
currently have an open "epan_dissect_t".

svn path=/trunk/; revision=5614
2002-06-04 07:03:57 +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 3396fb2777 Update from Ronnie Sahlberg:
1.  Changes how can_desegment works so that can_desegment is
	    only != 0 for whichever dissector is running immediately on
	    top of whoever offers the can_desegment service.

	    Thus DCERPC needs no special handling to see if it can trust
	    can_desegment (which is currently only available ontop of TCP
	    and not ontop of tcp->nbss->smb).

	2.  Changes fragment reassembly of transaction smb to only show
	    the defragmented packet for the transaction smb holding the
	    first fragment.

	    To see why, test it with a transaction SMB containing a ~60kb
	    PDU or larger.  The old behaviour had approximately quadratic
	    behaviour regarding runtime for dissecting such PDUs.

	    (example: NetShareEnum is a command which can grow really really
	    large if the number of shares and comments are large)

svn path=/trunk/; revision=4296
2001-11-29 09:05:25 +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 2f10c7f630 Get rid of the "len" and "captured_len" members of the "packet_info"
structure; they're no longer used.

svn path=/trunk/; revision=4236
2001-11-20 22:29:07 +00:00
Guy Harris 4a5538085f Get rid of NullTVB, the "compat_top_tvb" member of the "packet_info"
structure, the check for a null tvbuff pointer in "alloc_field_info()",
and the "tvb_create_from_top()" macro; they're no longer needed, as
there's no non-tvbuffified dissector code remaining.

svn path=/trunk/; revision=4205
2001-11-15 10:58:51 +00:00
Guy Harris 0c13da5c70 Rename the "private" member of the "packet_info" structure to
"private_data", to keep C++ compilers from getting heartburn.

svn path=/trunk/; revision=4130
2001-11-03 00:58:52 +00:00
Guy Harris d627904aba Have a flag in the "packet_info" structure, which indicates whether the
stuff currently being dissected is part of a packet included in an error
packet (e.g., an ICMP Unreachable packet).  Have the TCP dissector not
bother doing reassembly if the TCP segment is part of an error packet,
rather than an actual TCP transmission; other dissectors might want to
treat those packets specially as well.

Add to the "tcpinfo" structure a flag indicating whether the URG flag
was set, rather than having the zero or non-zero value of the urgent
pointer indicate that.  (Yes, at least as I read RFC 793, a zero urgent
pointer value isn't useful, as it means "the stuff before this segment
is urgent", but it's certainly possible to put onto the wire a TCP
segment with URG set and a zero urgent pointer.)

Don't dissect the TCP header by grabbing the entire header with
"tvb_memcpy()" and then pulling stuff out of it - extract stuff with
individual tvbuff calls, and put stuff into the protocol tree and the
Info column as we extract it, so that we can dissect a partial header.
This lets us, for example, get the source and destination ports from the
TCP header of the part of a TCP segment included in a minimum-length
ICMPv4 error packet.

svn path=/trunk/; revision=3986
2001-10-01 08:29:37 +00:00
Guy Harris 2a148564d6 TCP desegmentation support, and changes to the ONC RPC and NBSS
dissectors to use it, from Ronnie Sahlberg, with additional changes to
handle the case where a frame contains messages that don't run past the
end followed by one that does and where a reassembled chunk has, at the
end, a message that runs past the end of that chunk (because the
reassembly was for an earlier message).

svn path=/trunk/; revision=3923
2001-09-13 07:56:53 +00:00
Guy Harris ddfdc5bfb1 Replace the protocol-specific data in the "packet_info" structure with a
"void *" that a dissector can set to point to such a structure; that
means that the stuff in the epan directory doesn't have to know anything
about the protocol-specific private data one dissector passes to
another, and that structure doesn't have to be changed if a dissector
wants to pass some new type of data to another dissector.

svn path=/trunk/; revision=3818
2001-08-04 04:04:35 +00:00
Guy Harris 671992baab Define a "COPY_ADDRESS()" macro, which copies the data in one address to
another (copying the data to a mallocated array) in
"epan/packet_info.h", and use it in the conversation code.

svn path=/trunk/; revision=3510
2001-06-04 07:27:50 +00:00
Guy Harris a5a36589f8 Add an "ADDRESSES_EQUAL()" macro, taking pointers to two "address"
structures as arguments, that evaluates to "true" if the two addresses
are equal and "false" if they're not equal.  Use that macro in the
conversation code.

svn path=/trunk/; revision=3509
2001-06-04 06:46:07 +00:00
Guy Harris d2ef0cf51a RX and AFS dissectors tvbuffified, and bugs fixed, by Ronnie Sahlberg.
svn path=/trunk/; revision=3454
2001-05-27 01:48:25 +00:00
Ed Warnicke dd54ba9396 Moved the packet_info structure and supporting functions out of
packet.{h,c} and into a separate packet_info{h,c}.

svn path=/trunk/; revision=3225
2001-04-01 04:50:42 +00:00