Commit Graph

1053 Commits

Author SHA1 Message Date
Gilbert Ramirez a0704a2c7b The code for Ethernet II was using proto_tree_add_item_format() even
though it doesn't need to. (I missed that section when I converted packet-eth.c
to use hfinfo fields). Fixed.

svn path=/trunk/; revision=1073
1999-11-20 03:27:02 +00:00
Guy Harris 259982160a Make various "value_string" tables "const"; this allows the compiler to
stuff them into shared read-only space.

Put the "VALS()" cast macro into the initialization of an
"hf_register_info" array.

svn path=/trunk/; revision=1072
1999-11-19 23:23:41 +00:00
Gilbert Ramirez bfeff47889 Change ipv4 class to use ip_to_str() when converting IP address to string.
ip_to_str() is 7 times faster than my sprintf() implementation (both of
which take very little time for the single call that match_selected() makes,
but you know....)

svn path=/trunk/; revision=1071
1999-11-19 23:01:26 +00:00
Gilbert Ramirez b91d595c77 Change match_selected() to produce a display filter using the selected
field's name, if possible. (If the selected field is not a registered field,
then of course, we still have to use the frame[x:y] syntax).

tree_selected_start and tree_selected_len are on longer globals variables;
finfo_selected has replaced them.

svn path=/trunk/; revision=1070
1999-11-19 22:32:00 +00:00
Gilbert Ramirez f8f41fe3c6 Added Uwe's update to RPC.
svn path=/trunk/; revision=1069
1999-11-19 13:09:56 +00:00
Guy Harris 8963fabad6 Beginnings of Q.2931 support.
svn path=/trunk/; revision=1068
1999-11-19 09:55:38 +00:00
Guy Harris a8dfc56400 There are no protocols under Q.931, so mark everything up to the end of
the frame as being Q.931 stuff.

svn path=/trunk/; revision=1067
1999-11-19 09:46:51 +00:00
Guy Harris 26288653d7 Fix a typo.
svn path=/trunk/; revision=1066
1999-11-19 09:11:44 +00:00
Guy Harris e0d602e5c0 The only thing we shouldn't do if the "tree" argument is NULL is put
stuff into the tree - we should call the child dissectors in any case.

svn path=/trunk/; revision=1065
1999-11-19 09:10:22 +00:00
Guy Harris 70641c27dd Add support for SSCOP protocol; dissect signalling AAL packets using it.
It's in a file of its own, as I think there may be, or may have been
proposed, non-ATM uses of it as well.

svn path=/trunk/; revision=1064
1999-11-19 07:28:16 +00:00
Gilbert Ramirez f7cf81e479 Add comments showing IFT names for the IFT-to-Wiretap encapsulation array.
If a interface type is not recognized, set error to WTAP_ERR_UNSUPPORTED
instead of WTAP_BAD_RECORD.

Continue to check for X.25, FDDI, and loopback traces via the interface
name instead of the newly-discovered if_type field in the packet header.
Once Olivier confirms that his traces still work by checking only if_type,
I'll change the code. But he's on vacation right now. ATM, Ethernet, and
Token-Ring are discovered via the if_type field.

svn path=/trunk/; revision=1063
1999-11-19 05:48:21 +00:00
Gilbert Ramirez 0306c7eeba Be sure to use offset everywhere. The correct values for eth.src, eth.dst, and
eth.length were being pulled put into the proto_tree (logical and GUI),
but the fields were highlighted in the hex dump w/o adding offset.

svn path=/trunk/; revision=1062
1999-11-19 05:12:50 +00:00
Guy Harris b8e05ffb2c Clean up some ANSI C nits pointed out by "gcc -pedantic".
Also, explicitly compare the result of "memcmp()" against 0 - the
appearance of a comparison operator in the expression makes it clearer
what test is being done.

svn path=/trunk/; revision=1061
1999-11-18 21:48:53 +00:00
Guy Harris 1ecbfc0619 Clean up some ANSI C nits pointed out by "gcc -pedantic".
svn path=/trunk/; revision=1060
1999-11-18 21:04:54 +00:00
Guy Harris 61ba58ac83 Zero-length arrays are a GCC extension, and some compilers don't support
them - don't "#if 0" out the initializers for "hf[]", "#if 0" out the
entire declaration of "hf[]" and the call that uses "hf[]".

svn path=/trunk/; revision=1059
1999-11-18 19:59:11 +00:00
Guy Harris ef8ff95ac8 (AppTrafType & ATT_HLTYPE) is the type of high-level traffic, and
AppHLType is the subtype of that type; set them appropriately (as best
we can, given that we can only *guess* what kind of traffic it is) for
"iptrace" captures in Wiretap.  (Alas, more work is needed to
distinguish Ethernet from Token-Ring LANE traffic....)

Handle VPI = 0, VCI = 5 as the Signalling AAL in "iptrace" captures.

svn path=/trunk/; revision=1058
1999-11-18 09:39:12 +00:00
Gilbert Ramirez 32e13732c0 Check in my work so far on enabling the ATM iptrace capability. Not
all packets are recognized yet, but ILMI and Classical IP (LLCMX) are.
The ATM iptrace facility uses the ngsniffer_atm_phdr pseudo header so that
ethereal doesn't have to worry about yet another psuedo header.

svn path=/trunk/; revision=1057
1999-11-18 08:50:37 +00:00
Guy Harris d6a877f3c5 Don't define the variables passed to "dissect_snmp_pdu()" if we don't
have an SNMP dissector.

svn path=/trunk/; revision=1056
1999-11-18 08:28:30 +00:00
Richard Sharpe 71fb29b83d Added decode of the Election Criteria and a few other bits of
info.

Still need someone to look at the times I have in there ... Guy?

svn path=/trunk/; revision=1055
1999-11-18 07:32:46 +00:00
Guy Harris f5831f290a ILMI is just SNMP-over-ATM AAL5; if the SNMP dissector is available,
dissect ILMI packets with the SNMP dissector.

svn path=/trunk/; revision=1054
1999-11-18 07:29:55 +00:00
Gilbert Ramirez 95d752b466 Fixed the checking of the return value from file_gets() (fgets()).
svn path=/trunk/; revision=1053
1999-11-18 07:04:29 +00:00
Guy Harris 781acb5043 Craig Rodrigues' fixes to let it compile on AIX using IBM's compiler
(remove commas following the last member of an enum, make all bit fields
"guint32" - GCC lets you get away with that, but at least some other
compilers don't).

svn path=/trunk/; revision=1052
1999-11-18 01:45:05 +00:00
Gilbert Ramirez e53420230c Add packet-bgp.h to the list of deliverables.
svn path=/trunk/; revision=1051
1999-11-17 23:31:22 +00:00
Guy Harris 4fddc1f328 Provide a general mechanism by which dissectors can register "init"
routines, which are called before a dissection pass is made over all the
packets in a capture - the "init" routine would clear out any state
information that needs to be initialized before such a dissection pass.

Make the NCP, SMB, AFS, and ONC RPC dissectors register their "init"
routines with that mechanism, have the code that reads in a capture file
call the routine that calls all registered "init" routines rather than
calling a wired-in set of "init" routines, and also have the code that
runs a filtering or colorizing pass over all the packets call that
routine, as a filtering or colorizing pass is a dissection pass.

Have the ONC RPC "init" routine zero out the table of RPC calls, so that
it completely erases any state from the previous dissection pass (so
that, for example, if you run a filtering pass, it doesn't mark any
non-duplicate packets as duplicates because it remembers them from the
previous pass).

svn path=/trunk/; revision=1050
1999-11-17 21:58:33 +00:00
Guy Harris cd478752a1 Typo fixes, and fix to bug wherein when Ethereal sees a Network-LSA it
does not stop dissecting the LSA until it hits the end of the packet,
from Heikki Vatiainen.

svn path=/trunk/; revision=1049
1999-11-17 19:07:10 +00:00
Guy Harris 2937a86a62 Add some comment based on some spelunking done in some capture files,
and on a comment that "libpcap"/BPF on AIX appears to return 6 as the
network type for an Ethernet device - the BSD IFT_ETHER is 6.

svn path=/trunk/; revision=1048
1999-11-17 07:50:33 +00:00
Guy Harris cffca60b03 Print unsigned quantities with "%u", not "%d".
Use "plurality()" to pluralize byte counts.

svn path=/trunk/; revision=1047
1999-11-17 06:52:19 +00:00
Guy Harris b68f2dde89 Heikki Vatiainen's SAP (Session Announcement Protocol) dissector.
Rename the dissector for the Netware SAP protocol to "dissect_ipxsap()",
so as to keep its name from colliding with that of the dissector for the
Session Announcement Protocol.

svn path=/trunk/; revision=1046
1999-11-17 02:17:29 +00:00
Guy Harris d04da40cba Typo fix, from Heikki Vatiainen.
svn path=/trunk/; revision=1045
1999-11-17 01:35:57 +00:00
Gilbert Ramirez 36eabe2100 We should be checking the value of loc_of_slash instead of index. It
might be NULL from strchr().

svn path=/trunk/; revision=1044
1999-11-16 17:03:36 +00:00
Guy Harris a7aba0a288 Replace the ETT_ "enum" members, declared in "packet.h", with
dynamically-assigned "ett_" integer values, assigned by
"proto_register_subtree_array()"; this:

	obviates the need to update "packet.h" whenever you add a new
	subtree type - you only have to add a call to
	"proto_register_subtree_array()" to a "register" routine and an
	array of pointers to "ett_", if they're not already there, and
	add a pointer to the new "ett_" variable to the array, if they
	are there;

	would allow run-time-loaded dissectors to allocate subtree types
	when they're loaded.

svn path=/trunk/; revision=1043
1999-11-16 11:44:20 +00:00
Guy Harris 3a2f7f641a "gtk_object_get_data()" returns a pointer, so its return value shouldn't
be cast to a "gint" if that "gint" value is then going to be assigned to
a pointer.

svn path=/trunk/; revision=1042
1999-11-16 08:00:20 +00:00
Richard Sharpe e351b687e4 I hope no one just committed something on this.
There was a core dump because of a coding oversight.  Should be fixed
now Gilbert.

Should now handle names of form \<somepipe>

Will screw up if there is no leading slash, but in a non-fatal way, I
think.

svn path=/trunk/; revision=1041
1999-11-16 07:58:12 +00:00
Guy Harris cd708a6155 Remove an "#if 0"-ed out chunk of code that was supposed to cause the
hex window to scroll so that the data in the currently-selected field is
visible, but merely revealed core-dumping bugs in GTK+.

svn path=/trunk/; revision=1040
1999-11-16 06:59:17 +00:00
Gilbert Ramirez 7ae788f94d Don't store both "start" and "length" in each GUI proto_tree item. Just
store the field_info pointer, from which we can get both "start" and
"length" (and "hfinfo" and "value", which I'm working towards, so that
match_selected, or a new function, and create a display filter based on
the field's name, instead of byte offset ).

svn path=/trunk/; revision=1039
1999-11-15 22:52:03 +00:00
Nathan Neulinger 06f0344358 added sap types, netbios name types, ipx socket names
svn path=/trunk/; revision=1038
1999-11-15 21:33:57 +00:00
Nathan Neulinger 498cde407a Got rid of dissect_rpc_string routine, renamed dissect_rpc_string_item to
dissect_rpc_string. Replaced only instance of this routine being called.

Added display filtering to rpc dissector. Replaced most instances of
proto_tree_add_text with proto_tree_add_item.

Added program version and procedure to the program tree in addition to it
being in the RPC tree.

svn path=/trunk/; revision=1037
1999-11-15 17:16:51 +00:00
Nathan Neulinger bde3be6fc6 start of display filters and fix for toupper prototype
svn path=/trunk/; revision=1036
1999-11-15 14:57:38 +00:00
Nathan Neulinger 64ed7bcc3c Fixed rpc dissector to upcase program name.
Fixed nfs and nlm to use a lowercase protocol name so filtering will work.

svn path=/trunk/; revision=1035
1999-11-15 14:32:16 +00:00
Nathan Neulinger b72c0d1f60 Uwe Girlich's patches for nfs,mount,portmap and addition of nlm.
svn path=/trunk/; revision=1034
1999-11-15 14:17:20 +00:00
Guy Harris e1ef668523 We have to include <sys/types.h> before including <netinet/in.h> on some
platforms, e.g. FreeBSD.

svn path=/trunk/; revision=1033
1999-11-15 07:25:31 +00:00
Gilbert Ramirez 6a20c7bbc5 Add "class" that understands IPv4 addresses and subnet masks.
We now store IPv4 addresses in host order, allowing non-equivalence
comparisons. That is, display filters with lt, le, gt, and ge will work
on big-endian and little-endian machines.

CIDR notation is now supported for IPv4 addresses in display filters.
You can test to see if an IPv4 address is on a certain subnet by using
this notation. For example, to test for IPv4 packets on a Class-C network:

	ip.addr == 192.168.1.0/24

svn path=/trunk/; revision=1032
1999-11-15 06:32:38 +00:00
Guy Harris 1fca132c59 For ONC RPC, when constructing conversations, use a null address as the
destination address for calls and the source address of the reply - we
should't require the server address to be the same for a call and reply,
as they may not be on a multi-homed server (clients presumably check the
XID only, or perhaps the XID and the port whence the reply came,
although with TI-RPC I don't think they can check the port without
checking the address as well).

This requires that the conversation code not assume that the source and
destination addresses for a given packet in a conversation have the same
type, so, when comparing addresses for equality, it must explicitly
check the address types.

In said code, also check the port numbers before we check the addresses
- testing ports is cheaper, as they're just integers, and there's
probably a decent chance that you won't see two conversations between
different pairs of hosts and the *same* pair of ports in a capture file,
so the cheaper port tests are probably decently likely to fail first.

svn path=/trunk/; revision=1031
1999-11-14 21:16:58 +00:00
Guy Harris 1f31ab9cbb Move the test to see if something looks like an ONC RPC request or reply
into "dissect_rpc()" itself; it returns TRUE if it is, FALSE if it
isn't.

svn path=/trunk/; revision=1030
1999-11-14 20:44:52 +00:00
Guy Harris 7d5804a822 Set "conversation_keys" to NULL after destroying the list of
conversation keys.

svn path=/trunk/; revision=1029
1999-11-14 19:56:32 +00:00
Laurent Deniel 56cfe0557a Add display filters.
svn path=/trunk/; revision=1028
1999-11-14 10:48:17 +00:00
Laurent Deniel 095afe43df Add display filters.
svn path=/trunk/; revision=1027
1999-11-14 10:32:26 +00:00
Laurent Deniel e4ca79b93f Add display filters.
svn path=/trunk/; revision=1026
1999-11-14 10:16:25 +00:00
Richard Sharpe cfdb8fdc2c OK,
much more complete decoding of browse messages.

They are now shown in the parent tree as well.

I still have problems with:

  1. Times
  2. Election criteral

I also haven't been able to see a BecomeBackup request, nor a
GetBackupListResp with more than one browser ... Should run a Windows NT
server or another Samba on my network.

I am also not sure of there are any more message types.  Damn! Old, and
wrong MS documents!

svn path=/trunk/; revision=1025
1999-11-14 06:54:42 +00:00
Richard Sharpe baadd1b3d7 Fixed some more small problems and added support for decoding
MS Windows Browser messages.  Can decode host announcements now.

Still need to decode more.  Also need to break the new code out.


I also have the Browse tree at the wrong location.  Can I get at the
parent of the tree somewhere, or do I have to pass it in as a variable?

svn path=/trunk/; revision=1024
1999-11-14 02:42:03 +00:00