Commit Graph

1193 Commits

Author SHA1 Message Date
Guy Harris af8888e47c Check in the ASN.1 code for reference purposes, although the SNMP
dissector doesn't use it yet - Nathan Neulinger might use it for a
Kerberos 5 dissector, and it might be of use for other dissectors as
well.

svn path=/trunk/; revision=1215
1999-12-05 07:50:01 +00:00
Guy Harris 272505c220 As per Nathan Leulinger's suggestion, have a stub SNMP dissector if
there are no SNMP libraries to use in a real dissector; this means that
other dissectors don't have to care if there are SNMP libraries, they
can just call "dissect_snmp()" - and this also simplifies "Makefile.am"
and "configure.in" a bit, as they just treat "packet-snmp.c" and
"packet-snmp.h" the same way they treat other dissector source files.

svn path=/trunk/; revision=1214
1999-12-05 02:33:52 +00:00
Guy Harris e8f5dac7d4 Use the new routines in Wiretap to make the argument to "-T" be a
symbolic name, and to list the encapsulation types in the usage message.

Note in the usage message that the default output encapsulation type is
"same as the input file" and that the default output file type is
"libpcap".

svn path=/trunk/; revision=1213
1999-12-05 01:27:14 +00:00
Guy Harris 959e02e540 Provide a table of descriptive and short (command-line) names for
encapsulation types, and routines to translate encapsulation types to
names and short names to encapsulation types, for the benefit of
"editcap".

svn path=/trunk/; revision=1212
1999-12-05 01:24:54 +00:00
Guy Harris db5e747c58 Expand on the description of "libpcap" and "snoop" capture file formats.
svn path=/trunk/; revision=1211
1999-12-05 01:23:22 +00:00
Guy Harris 3e084400fc It's now called "editcap", as it can read any file format Wiretap can
read, and write any format it can write; change the error messages.

Make the "-F" flag take a symbolic capture file type; use
"wtap_short_string_to_file_type()" to translate it to a WTAP_FILE_
value.

List, in the usage message, the capture file types we can write, and the
symbolic types you use on the command line to specify them.

Give it an RCS ID.

svn path=/trunk/; revision=1210
1999-12-04 21:42:56 +00:00
Guy Harris c966023a67 Add rules for making "editcap".
svn path=/trunk/; revision=1209
1999-12-04 21:37:56 +00:00
Guy Harris 2abff4ef8b Oops! First check if the short name in the "dump_open_table[]" entry is
NULL before checking if it matches the name you were handed....

svn path=/trunk/; revision=1208
1999-12-04 21:32:58 +00:00
Guy Harris ed78c10649 Give those capture file formats we can write a "short name", to be used
to, for example, specify on a command line the format that a program
should write; provide a routine to translate a file type to its short
name, and to translate a short name to the corresponding file type.

svn path=/trunk/; revision=1207
1999-12-04 21:20:09 +00:00
Richard Sharpe ad33fe84a7 Adding editcap.c. This is an example of a simple wiretap editing program.
Will need new functions in wiretap before I can do more.

Should perhaps be moved into an examples directory and have other bots added.

svn path=/trunk/; revision=1206
1999-12-04 12:53:52 +00:00
Guy Harris aef39cc00f To find out the file's packet encapsulation type (which could be
WTAP_ENCAP_PER_PACKET, if there's more than one type of packet in the
file, or could be WTAP_ENCAP_UNKNOWN, if the file is of a type that
doesn't put an encapsulation type in the file header, and it has no
packets), we just need to call "wtap_file_encap()" when we're done
reading the file.

svn path=/trunk/; revision=1205
1999-12-04 11:32:25 +00:00
Guy Harris 0dcade2634 Fields in the "snoop" file header are big-endian; write them as such.
svn path=/trunk/; revision=1204
1999-12-04 11:19:04 +00:00
Guy Harris 1eaa99a669 Fix some names.
svn path=/trunk/; revision=1203
1999-12-04 09:38:38 +00:00
Guy Harris a34c9711f6 Now that "wtap_file_type_string()" takes a file type rather than a "wtap
*" as an argument, there's no need to save the file type string in a
"capture_file" structure - we save the file type, and can use that when
generating the summary display.

svn path=/trunk/; revision=1202
1999-12-04 08:59:13 +00:00
Guy Harris 3af8d95645 More infrastructure changes for Ethereal - make
"wtap_file_type_string()" take, as its argument, a file type, rather
than a "wtap *".

Fix some range checks of file types to check against WTAP_NUM_FILE_TYPES
rather than WTAP_NUM_ENCAP_TYPES.

svn path=/trunk/; revision=1201
1999-12-04 08:51:52 +00:00
Guy Harris 3b93574402 Add some infrastructure for the use of Ethereal, so it can make a list
of all the file types in which a file can be saved.

Giving each dumpable file type a routine that checks whether a file of a
given file type and encapsulation can be written lets us hoist some
checks into common code from out of the open routines.

If the "dump close" routine for a dump stream is NULL, have that mean
that there's no action that needs to be taken on a close by the code to
handle that file type; some file types don't need that, as they can be
written purely sequentially.

svn path=/trunk/; revision=1200
1999-12-04 08:32:14 +00:00
Guy Harris c5447af40a When doing a live display of a live capture, don't scroll to the row for
the last packet in the list if there aren't any packets in the list.

svn path=/trunk/; revision=1199
1999-12-04 06:27:03 +00:00
Guy Harris f256c54f79 Include <string.h> to declare "memset()".
svn path=/trunk/; revision=1198
1999-12-04 06:21:45 +00:00
Gilbert Ramirez 9cca586498 More items re: display filters.
svn path=/trunk/; revision=1197
1999-12-04 06:15:31 +00:00
Guy Harris a0de9d710e Null out the "pointer to private data" member of a "wtap_dumper"
structure before calling the "dump_open" routine for the file type; it
either has to be null or point to something that can be freed, as the
dump close routine frees what it points to if it's not null.

svn path=/trunk/; revision=1196
1999-12-04 05:37:36 +00:00
Guy Harris 94746f05da Add support to Wiretap for writing Network Monitor 1.x-format capture
files.

Make the return type of a number of routines that return 1 (for "true")
on success and 0 (for "false") on failure to "gboolean", and make the 1's
and 0's TRUEs and FALSEs.

svn path=/trunk/; revision=1195
1999-12-04 05:22:21 +00:00
Guy Harris 4c37395f73 Add support to Wiretap for writing Network Monitor 1.x-format capture
files.

Make the return type of a number of routines that return 1 (for "true")
on success and 0 (for "false") on failure to "gboolean", and make the 1's
and 0's TRUEs and FALSEs.

svn path=/trunk/; revision=1194
1999-12-04 05:14:39 +00:00
Guy Harris 4c6b80bb27 Add support to Wiretap for writing "snoop"-format capture files.
svn path=/trunk/; revision=1193
1999-12-04 03:36:22 +00:00
Nathan Neulinger 6877cdcd65 added SNMP support to IPX
svn path=/trunk/; revision=1192
1999-12-03 22:04:24 +00:00
Nathan Neulinger fb6821f059 added skeletal tacplus/xtacacs dissector
svn path=/trunk/; revision=1191
1999-12-03 21:50:31 +00:00
Nathan Neulinger db76c02c9e patch to scroll byte view
svn path=/trunk/; revision=1190
1999-12-03 21:28:58 +00:00
Nathan Neulinger d58c3c5c44 more handling of etype<max_802_3_len
svn path=/trunk/; revision=1189
1999-12-03 21:28:11 +00:00
Nathan Neulinger 11055eed6b Added wide area router ipx socket number
svn path=/trunk/; revision=1188
1999-12-03 21:23:50 +00:00
Guy Harris 93fdf81217 It appears that our "Makefile.in" won't work with the scripts generated
by pre-2.13 "autoconf", and there may be other problems with pre-2.12
"autoconf" as well; require "autoconf" 2.13 or later.

svn path=/trunk/; revision=1187
1999-12-03 07:04:54 +00:00
Gerald Combs d2ebea8481 Add description of TCP stream prefs.
svn path=/trunk/; revision=1186
1999-12-03 03:56:35 +00:00
Gilbert Ramirez 0537fdd8b6 Fix infinite loop on short packets or bad data in radius dissector.
Problem reported by Arni Raghu <arni@caip.rutgers.edu>.

svn path=/trunk/; revision=1185
1999-12-02 23:25:29 +00:00
Uwe Girlich 024948f3a6 prototype for dissect_rpc_data()
svn path=/trunk/; revision=1184
1999-12-02 11:46:12 +00:00
Uwe Girlich 5734ebe43c many new dissectors in the NVF v2 area
svn path=/trunk/; revision=1183
1999-12-02 10:24:02 +00:00
Uwe Girlich ce8fff09ff new dissect_rpc_opaque_data() for RPC data with length and fill-bytes
svn path=/trunk/; revision=1182
1999-12-02 10:20:42 +00:00
Guy Harris 9f755766f0 Explain *why* you have to "g_strdup()" the argument to "-r" before
assigning it to "cf_name", so somebody else doesn't make the same
mistake I did.

svn path=/trunk/; revision=1181
1999-12-02 08:28:34 +00:00
Gilbert Ramirez 123d10e6a9 Fix bug which occurs when running ethereal with "-r" to load a file, then
loading a new file from within ethereal.

In main(), cf_name was being set to optarg, without g_strdup()'ing it.
Later, in file_open_cmd_cb(), we try to g_free last_open_dir, which is
cf_name, so blammo! We try to g_free something that we can't.

So, in main(), be sure to set cf_name to a g_strdup() of optarg, not
just optarg.

(At home I'm using debug/development versions of glib/gtk, so maybe
that's why I saw the problem only now. I could have sworn that I
have done this sequence of events successfully before).

svn path=/trunk/; revision=1180
1999-12-02 05:25:59 +00:00
Gerald Combs ee51e6534a Add stream window color preferences. We don't (yet) use cmaps, so this
may not work with pseudocolor systems.

svn path=/trunk/; revision=1179
1999-12-02 04:30:15 +00:00
Gerald Combs 2478a404c8 Remove the check for cs->dlen > 0. We want to log the first (zero length)
packet, since that tells us the direction of the connection.

svn path=/trunk/; revision=1178
1999-12-02 04:27:46 +00:00
Guy Harris 6492ea79ee Christopher McAvaney's fix to "format_text()" to make it not stomp on
the "..." added if a string is too long.

svn path=/trunk/; revision=1177
1999-12-02 01:33:55 +00:00
Guy Harris 27f7e065e4 Fix the "proto_tree_add_item_format()" call for CMD_STATUS_CHANGE.
svn path=/trunk/; revision=1176
1999-12-01 23:58:44 +00:00
Gilbert Ramirez 99ae96e58c Add a TODO file.
svn path=/trunk/; revision=1175
1999-12-01 20:58:49 +00:00
Gilbert Ramirez 8816a59216 Added Florian Lohoff's <flo@rfc822.org> patch to enable Follow TCP
menu item only if a TCP packet is selected.

svn path=/trunk/; revision=1174
1999-12-01 20:12:32 +00:00
Gilbert Ramirez 3fa90ff0cf Add IPX to packet stats during capture.
svn path=/trunk/; revision=1173
1999-11-30 23:56:37 +00:00
Gilbert Ramirez ada449cf1b Fixed output in AC_ETHEREAL_UCDSNMP_CHECK. AC_MSG_CHECKING should
not be called with d is xNONE, and if called, it should always be followed
by an AC_MSG_RESULT() in order to get a newline printed.

svn path=/trunk/; revision=1172
1999-11-30 22:45:09 +00:00
Guy Harris 5d25bd8275 There's no need to put a "Could not save to" message in the status bar
if a "File:Save" or "File:Save As" fails - the message box it pops up
when that happens tells you that, it didn't do so before the change to
add the ability to save only the packets currently being displayed, and
putting that message in the status bar hides the normal message telling
you what the current file is (and it's still the current file, if the
save failed).

svn path=/trunk/; revision=1171
1999-11-30 21:30:43 +00:00
Guy Harris dc548e7458 Allow the user to save either all of the current capture, or only the
packets that are currently being displayed from that capture.

Centralize the code to control whether "File:Save" and "File:Save As"
are enabled (and *always* have "File:Save As" enabled if you have a
capture; "File:Save" is enabled only if you have a live capture you've
not yet saved, although it does the same thing as "File:Save As").

Have the "save_file" member of a "capture_file" structure represent
*only* the file currently being *written* to by a capture, and, if there
is no capture currently in progress, have it be NULL; the name of the
file currently being *displayed" is in the "filename" member, and an
"is_tempfile" member indicates whether it's a temporary file for a live
capture or not.

Have "close_cap_file()" delete the current capture file if it's a
temporary capture file that hasn't been saved (in its entirety - saving
selected frames doesn't count).  Do the same (if there *is* a current
capture file) when exiting.

The "Ready to load or capture" message is the only statusbar message in
the "main" context; "close_cap_file()" should never pop it, it should
only pop whatever message exists in the "file" context, and thus has no
need to take, as an argument, the context for the message it should pop.

Update the man page to reflect the new behavior of "File:Save" and
"File:Save As", and to reflect recent changes to "Display:Match Selected".

svn path=/trunk/; revision=1170
1999-11-30 20:50:15 +00:00
Nathan Neulinger 191f4cd467 additions to tns dissector - sns and connect started
svn path=/trunk/; revision=1169
1999-11-30 17:58:32 +00:00
Guy Harris 4457d99d2e Squelch a GCC complaint. (I really wish GCC's dataflow analysis were
better....)

svn path=/trunk/; revision=1168
1999-11-30 09:48:31 +00:00
Guy Harris 8e36c6f5cd Some additional IPX packet types.
svn path=/trunk/; revision=1167
1999-11-30 09:01:55 +00:00
Guy Harris 4059d29fb4 IPX packet type 1 is apparently NetWare RIP (Routing Information
Protocol), and packet type 4 is apparently the Packet Exchange Protocol,
at least according to some Web pages.

svn path=/trunk/; revision=1166
1999-11-30 08:45:39 +00:00