Commit Graph

138 Commits

Author SHA1 Message Date
Gerald Combs fc62f98e74 In the 802.11 dissector, mark the "wep_keys" preference as obsolete,
and replace it with an "enable_decryption" preference.

Instead of forcing the user to specify how many WEP keys we have,
figure it out for ourselves by parsing the key list.  When decrypting,
don't worry about the key index specified in the header (which resulted
in trying to decrypt using the same key twice); simply try each key in
order (which we were doing anyway).

In hex_str_to_bytes(), handle a null hex string.

Update the release notes.

svn path=/trunk/; revision=19592
2006-10-18 17:55:29 +00:00
Gerald Combs 9e23f31e5f Add support for reading from stdin under Windows. Based on a patch sent
in last year by Gianluca Varenni.

Add partial support for reading from named pipes (currently disabled).

Move utf_8to16() and utf_16to8() to a separate module (unicode-utils.[ch])
so that we don't have to cut and paste code in dumpcap.c.

Fix up whitespace.

svn path=/trunk/; revision=19291
2006-09-22 21:14:54 +00:00
Anders Broman 764e3ac167 New rutine tvb_format_text_wsp() which will change "whiite space" characters to space
before output.

svn path=/trunk/; revision=18519
2006-06-19 15:53:03 +00:00
Anders Broman 996d4db495 Ethereal->Wireshark
svn path=/trunk/; revision=18234
2006-05-28 19:49:07 +00:00
Ronnie Sahlberg 89f022b12b name change
svn path=/trunk/; revision=18197
2006-05-21 05:12:17 +00:00
Guy Harris 402a762818 Put a newline at the end of the file.
svn path=/trunk/; revision=18184
2006-05-18 11:34:57 +00:00
Gerald Combs 36b80f1043 Properly grow our buffers for utf_8to16().
svn path=/trunk/; revision=18017
2006-04-27 14:58:46 +00:00
Gerald Combs 9406c5db24 Use Unicode for all native Win32 calls. Unicode Windows applications
use UTF-16 internally and GTK+ 2.x uses UTF-8, which means we have to
do a lots of conversions.

Add utf_8to16() and utf_16to8 convenience functions to strutil.c.

svn path=/trunk/; revision=17534
2006-03-08 20:55:32 +00:00
Gilbert Ramirez 96db73a93f Remove a case statement which can never be reached, because the
previous isprint() test covers that case. This fixes Coverity bug ID #2.

svn path=/trunk/; revision=17507
2006-03-07 20:01:42 +00:00
Ronnie Sahlberg 4a38167d00 create a real function to emulate g_strlcat() for GTK<2
so that the linker will find it.

This eliminates the need to include strutil.h (where this was previously a macro)  in all callers of this function.


svn path=/trunk/; revision=17392
2006-02-23 21:49:30 +00:00
Guy Harris 02d9de5a5d Squelch a GCC complaint.
svn path=/trunk/; revision=16670
2005-12-04 04:13:07 +00:00
Tomas Kukosa dcae7d303f new field type FT_OID for OBJECT IDENTIFIERs
svn path=/trunk/; revision=16652
2005-12-02 13:16:58 +00:00
Ronnie Sahlberg d4267d1272 replace some more silly rotating buffers with ep_alloc() calls
svn path=/trunk/; revision=15386
2005-08-17 09:36:20 +00:00
Anders Broman 3a029b458b Change number of bytes displayed in bytes_to_string to 48 to facilitate display of sha1 digest of 20 bytes.
svn path=/trunk/; revision=12612
2004-11-28 19:35:21 +00:00
Guy Harris 898c26a82f Have the usual three separate buffers for "format_text()", so that it
can be used multiple times in a single formatting call.

svn path=/trunk/; revision=12428
2004-10-29 00:39:56 +00:00
Gerald Combs 2875ddd269 Move convert_string_to_hex() and convert_string_case() from gtk/find_dlg.c
to epan/strutil.c

svn path=/trunk/; revision=11733
2004-08-13 02:39:49 +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
Gerald Combs 4a0a8b7e72 Add a "force_separators" parameter to hex_str_to_bytes so that it's
possible to paste in WEP keys without any separators.

Add doxygen comments to strutil.h.

svn path=/trunk/; revision=11123
2004-06-06 14:29:07 +00:00
Guy Harris 67371b5306 GLib 1.2[.x]'s "g_string_free()" doesn't return a value.
svn path=/trunk/; revision=10765
2004-05-01 23:56:03 +00:00
Olivier Biot 2650b49679 Add an XML escaping routine: xml_escape()
svn path=/trunk/; revision=10759
2004-05-01 20:46:24 +00:00
Guy Harris 1b36210318 We can't test the GTK+ version in dissectors or libethereal code, as
they don't include any GTK+ headers (and shouldn't do so, as they can't
use GTK+); we use the GLib version as a proxy.

svn path=/trunk/; revision=9982
2004-02-05 09:42:26 +00:00
Jörg Mayer d62f6c67da Add consts to fix 'cast discards qualifiers from pointer target type'
svn path=/trunk/; revision=9937
2004-02-01 04:54:48 +00:00
Jörg Mayer c61e9f6ed0 Change the first arg to hex_str_to_bytes from guchar* -> char*
svn path=/trunk/; revision=9842
2004-01-25 16:58:25 +00:00
Guy Harris 52ce0b5f48 "hex_str_to_bytes()" modifies the GByteArray supplied to it, so don't
mark it as "const".

svn path=/trunk/; revision=9474
2003-12-29 19:53:52 +00:00
Gerald Combs d72750578b Pull most of bytes_from_unparsed() into a new routine,
hex_str_to_bytes().  Use the new routine to initialize any WEP keys we
have defined.  This has the side effect of fixing an overflow if the user
entered a long WEP key.

svn path=/trunk/; revision=9471
2003-12-29 04:07:06 +00:00
Guy Harris e6f433d884 Do the "isprint()" hack for GTK+ 2.x or 1.3[.x], whether on UNIX or
Windows - the problem is that GTK+ 1.3[.x] and later assume strings
handed to them are UTF-8 strings, not, for example, ISO 8859/x strings.

In packet-radius.c, re-define "isprint()" rather than #ifdeffing its use
(the old code was also incorrectly treating 0x7f as a printable).

svn path=/trunk/; revision=9435
2003-12-24 01:12:17 +00:00
Gilbert Ramirez 52338a3baf Add a "contains" operator for byte-strings, strings, and tvbuffs (protocols).
The search uses a naive approach; more work is required to add a
Boyer-Moore Search algorithm.

svn path=/trunk/; revision=8280
2003-08-27 15:23:11 +00:00
Guy Harris 90bf936ffa From Chris Heath: fix up the check for printable ASCII done on Windows
not to include DEL as printable ASCII.

Also change the check in strutil.c to do it by redefining "isprint()",
as is done in "gtk/gtkglobals.h", rather than by #ifdeffing the point at
which the test is done.

svn path=/trunk/; revision=8118
2003-08-01 01:39:01 +00:00
Guy Harris 8d0aab0e78 From Ronald Henderson: make "format_text()", on Windows, escape all
characters that aren't printable ASCII, as GTK+ for Windows thinks
strings are UTF-8 but the strings we give it wouldn't be UTF-8.

svn path=/trunk/; revision=6832
2002-12-31 21:51:10 +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
Jörg Mayer 3105ee542f Replace the types from sys/types.h and netinet/in.h by their glib.h
equivalents for the epan/ directory but leave winsock2.h in inet_pton.c
and inet_ntop.c for now (can't estimate the consequences).

svn path=/trunk/; revision=5928
2002-08-02 21:29:45 +00:00
Gilbert Ramirez fe8e42b58e Enable FT_BYTES dfiltering, from Ed Warnicke.
svn path=/trunk/; revision=2768
2000-12-22 12:05:38 +00:00
Guy Harris 99c98f9e74 Move "bytes_to_str()" to "strutil.c" from "packet.c" - it's just a
string formatter, like "format_text()", and, as "tvbuff.c" now calls it
(*vide infra*), we don't want to have to make "tvbuff.c" drag "packet.h"
in just to declare "bytes_to_str()".  It's now declared in "strutil.h",
so include it in modules that use "bytes_to_str()" and weren't already
including it.

Add a "tvb_bytes_to_str()" wrapper that calls "tvb_get_ptr()" to get a
pointer to a chunk of N bytes at a given offset in a tvbuff and then
hands that chunk to "bytes_to_str()".  Convert the code that was doing
that to use "tvb_bytes_to_str()" instead (which caught what I suspect is
a bug in the Q.2931 dissector, where it was handing an offset of 0 to
"tvb_get_ptr()" - a cut-and-pasteo, I think).

Tvbuffify the ARP dissector.

svn path=/trunk/; revision=2634
2000-11-13 07:19:37 +00:00
Guy Harris 07eb30403d Tvbuffify the SAP and SDP dissectors.
Add "tvb_find_line_end_unquoted()" for the benefit of the SDP dissector;
get rid of "find_line_end_unquoted()" as nobody uses it any more.

Add "tvb_pbrk_guint8()" for the benefit of
"tvb_find_line_end_unquoted()"; it searches for any of a number of
characters, unlike "tvb_find_guint8()" which searches for only one.

svn path=/trunk/; revision=2595
2000-11-10 06:50:37 +00:00
Guy Harris 37ec8b1b32 Support for embedded newlines in SDP fields, from Robert Tsai.
svn path=/trunk/; revision=2584
2000-11-09 02:42:33 +00:00
Guy Harris 213e7d9360 If a line consists *solely* of an LF, set "*eol" to point to the LF.
svn path=/trunk/; revision=2469
2000-09-30 05:44:48 +00:00
Guy Harris bdca198efb Dynamically grow the buffer used by "format_text()", rather than cutting
the text off at 62 characters.

svn path=/trunk/; revision=2466
2000-09-29 19:02:37 +00:00
Gilbert Ramirez 83ec54675c First step in moving core Ethereal routines to libepan.
svn path=/trunk/; revision=2458
2000-09-27 04:55:05 +00:00