Commit Graph

14 Commits

Author SHA1 Message Date
Jörg Mayer fa9608388f Move struct tcp_frag from follow.h to follow.c as it wasn't used anywere
else.
Fix a trivial signed/unsigned warning in follow.c by changing tcp_frag.data
from guchar* to gchar*

svn path=/trunk/; revision=9796
2004-01-23 01:42:45 +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
Jörg Mayer 173fe5aef4 Replace the types from sys/types.h and netinet/in.h by their glib.h
equivalents for the toplevel directory. The removal of winsock2.h will
hopefully not cause any problems under MSVC++, as those files using
struct timeval still include wtap.h, which still includes winsock2.h.

svn path=/trunk/; revision=5932
2002-08-02 23:36:07 +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
Laurent Deniel 281e892939 - add ipv6.addr for the source and destination addresses (like ipv4)
- implement the TCP follow feature for TCP over IPv6

svn path=/trunk/; revision=2258
2000-08-11 22:18:22 +00:00
Gilbert Ramirez 3f8d753943 In TCP Follow window, allow the optional showing of:
Entire Conversation
	Client -> Server packets
	Server -> Client packets

Have "Save As" button work as a "Print to File" button; it asks for
a filename and uses the same routine that "Print" uses to save the file.
What you see in the window is what you get in the file. So, you can get
any of the above conversations/soliloquies combined with:

	ASCII
	EBCDIC
	Hex Dump

svn path=/trunk/; revision=2232
2000-08-09 05:18:45 +00:00
Guy Harris 3d6cb57256 In the TCP stream following code, we don't use the time stamp field in
the stuff we write to the temporary file, so don't bother writing it.

Keep track of the two sides of the TCP stream by keeping track of the
source address *and* port, so that we correctly handle connections
between two ports on the same machine.

svn path=/trunk/; revision=1712
2000-03-12 04:26:35 +00:00
Gerald Combs 664fde99e5 Add code to colorize TCP streams.
svn path=/trunk/; revision=1131
1999-11-28 03:35:20 +00:00
Guy Harris 047b8751f3 Generalize the "ip_src" and "ip_dst" members of the "packet_info"
structure to "dl_src"/"dl_dst", "net_src"/"net_dst", and "src"/"dst"
addresses, where an address is an address type, an address length in
bytes, and a pointer to that many bytes.

"dl_{src,dst}" are the link-layer source/destination; "net_{src,dst}"
are the network-layer source/destination; "{src,dst}" are the
source/destination from the highest of those two layers that we have in
the packet.

Add a port type to "packet_info" as well, specifying whether it's a TCP
or UDP port.

Don't set the address and port columns in the dissector functions; just
set the address and port members of the "packet_info" structure.  Set
the columns in "fill_in_columns()"; this means that if we're showing
COL_{DEF,RES,UNRES}_SRC" or "COL_{DEF,RES,UNRES}_DST", we only generate
the string from "src" or "dst", we don't generate a string for the
link-layer address and then overwrite it with a string for the
network-layer address (generating those strings costs CPU).

Add support for "conversations", where a "conversation" is (at present)
a source and destination address and a source and destination port.  (In
the future, we may support "conversations" above the transport layer,
e.g. a TFTP conversation, where the first packet goes from the client to
the TFTP server port, but the reply comes back from a different port,
and all subsequent packets go between the client address/port and the
server address/new port, or an NFS conversation, which might include
lock manager, status monitor, and mount packets, as well as NFS
packets.)

Currently, all we support is a call that takes the source and
destination address/port pairs, looks them up in a hash table, and:

	if nothing is found, creates a new entry in the hash table, and
	assigns it a unique 32-bit conversation ID, and returns that
	conversation ID;

	if an entry is found, returns its conversation ID.

Use that in the SMB and AFS code to keep track of individual SMB or AFS
conversations.  We need to match up requests and replies, as, for
certain replies, the operation code for the request to which it's a
reply doesn't show up in the reply - you have to find the request with a
matching transaction ID.  Transaction IDs are per-conversation, so the
hash table for requests should include a conversation ID and transaction
ID as the key.

This allows SMB and AFS decoders to handle IPv4 or IPv6 addresses
transparently (and should allow the SMB decoder to handle NetBIOS atop
other protocols as well, if the source and destination address and port
values in the "packet_info" structure are set appropriately).

In the "Follow TCP Connection" code, check to make sure that the
addresses are IPv4 addressses; ultimately, that code should be changed
to use the conversation code instead, which will let it handle IPv6
transparently.

svn path=/trunk/; revision=909
1999-10-22 07:18:23 +00:00
Laurent Deniel fb8aa8fb7a Fix TCP follow stream feature:
- call reset_tcp_reassembly before build_follow_filter
- modify reassemble_tcp so that packet validity is
  checked before processing it.

svn path=/trunk/; revision=410
1999-07-31 13:55:16 +00:00
Guy Harris fba49cfe85 From Jason Lango <jal@netapp.com>, a fix to a long-standing problem
(which could cause core dumps in "Follow TCP Stream") -
"check_fragments()" was, when deleting a TCP segment at the beginning of
the list of segments, setting "src[index]" to point to the next segment,
not "frags[index]".  "src[index]" is the source IP address, not a
pointer to a fragment.

Also, make some routines not used outside "follow.c" static.

svn path=/trunk/; revision=341
1999-07-07 01:41:15 +00:00
Laurent Deniel 210d386532 Fixes to the TCP reassembly code to correctly handle too short
caplen or incomplete data (avoid crashes or erroneous display).

svn path=/trunk/; revision=227
1999-03-23 20:25:50 +00:00
Gerald Combs 2e7e493198 Merged in a _huge_ patch from Guy Harris. It adds a time stap column,
generalizes the column printing code, adds a "frame" tree item to
   the tree view, and fixes a bunch of miscellaneous coding bugs.

svn path=/trunk/; revision=31
1998-09-27 22:12:47 +00:00
Gerald Combs 5110b21fd8 * Added Mike Hall's TCP reconstruction code.
svn path=/trunk/; revision=10
1998-09-17 03:12:28 +00:00