Commit Graph

157 Commits

Author SHA1 Message Date
Anders Broman 6b58ef91d4 Omit assignment for not used types.
svn path=/trunk/; revision=54591
2014-01-04 11:48:40 +00:00
Evan Huus 8f665d9b36 Add a sixteenth element to all BCD digit sets to avoid garbage values when
decoding corrupt bytes. Some of these digit sets could probably be
deduplicated...

svn path=/trunk/; revision=54224
2013-12-18 15:54:32 +00:00
Jakub Zawadzki 4d92f6079b Remove not needed ';'
svn path=/trunk/; revision=54088
2013-12-14 11:12:20 +00:00
Chris Maynard 9b38829b34 Reject the packet if data is NULL without doing anything else.
svn path=/trunk/; revision=53708
2013-12-02 02:31:04 +00:00
Evan Huus 1db1b8e2bb Convert ASN1 dissectors from ep_address_to_str to address_to_str. Clean up a bit
of ansi_tcap code while in the neighbourhood.

svn path=/trunk/; revision=53530
2013-11-23 22:37:33 +00:00
Michael Mann 09bd9ad788 Have ANSI TCAP dissector pass data through subdissector parameter instead of using struct _packet_info.
svn path=/trunk/; revision=52885
2013-10-27 02:00:18 +00:00
Bill Meier 6dd42b581a Fix some [-Wunused-const-variable] warnings (using '#if 0')
svn path=/trunk/; revision=52862
2013-10-26 02:09:14 +00:00
Pascal Quantin 102c452bcb More emem -> wmem conversion:
- tvb_get_g_stringz()/tvb_get_ephemeral_stringz()/tvb_get_seasonal_stringz() -> tvb_get_stringz()
- tvb_get_g_stringz_enc()/tvb_get_ephemeral_stringz_enc() -> tvb_get_stringz_enc()
- tvb_get_ephemeral_unicode_stringz() -> tvb_get_unicode_stringz()
- tvb_bcd_dig_to_ep_str() -> tvb_bcd_dig_to_wmem_packet_str()
- update docs accordingly

svn path=/trunk/; revision=52180
2013-09-22 20:04:35 +00:00
Pascal Quantin a0c53ffaa1 emem -> wmem conversion:
- ep_tvb_get_bits() -> wmem_packet_tvb_get_bits()
- tvb_g_memdup()/ep_tvb_memdup() -> tvb_memdup()
- tvb_fake_unicode()/tvb_get_ephemeral_faked_unicode() -> tvb_get_faked_unicode()
- tvb_get_g_string()/tvb_get_ephemeral_string()/tvb_get_seasonal_string() -> tvb_get_string()
- tvb_get_g_unicode_string()/tvb_get_ephemeral_unicode_string() -> tvb_get_unicode_string()
- tvb_get_ephemeral_string_enc() -> tvb_get_string_enc()
- update docs accordingly

svn path=/trunk/; revision=52172
2013-09-22 15:50:55 +00:00
Pascal Quantin efe18f199c Convert a few dissectors from emem to wmem API
svn path=/trunk/; revision=51983
2013-09-12 20:37:30 +00:00
Evan Huus 8b0f1addd9 Apparently one of our major global headers must include emem.h, because I just
found a bunch more asn1 dissectors using emem without ever directly including
the header. Convert those to wmem as well, which involves add a number of
#include directives since dissectors do *not* automatically pull in the wmem
headers.

svn path=/trunk/; revision=50066
2013-06-19 23:08:58 +00:00
Jörg Mayer 1d5891111e Make exports actaully work
Add ansi_map as first generated file that uses exports (from gsm_map in
  this case).

svn path=/trunk/; revision=49195
2013-05-07 03:59:29 +00:00
Jörg Mayer 243e9c0ba5 Just whitespace changes
svn path=/trunk/; revision=49167
2013-05-05 08:49:18 +00:00
Jörg Mayer 8faa262e90 Stub cmake support for generating the asn1 dissectors.
It doesn't do anything yet, it is just to make svn status
readable again.

svn path=/trunk/; revision=49007
2013-04-23 23:05:33 +00:00
Anders Broman f92bd64966 [-Wmissing-prototypes]
Use explicit casts.

svn path=/trunk/; revision=48439
2013-03-20 05:59:22 +00:00
Balint Reczey 1ebdb2e521 Export libwireshark symbols using WS_DLL_PUBLIC define
Also remove old WS_VAR_IMPORT define and related Makefile magic
everywhere in the project.

svn path=/trunk/; revision=47992
2013-03-01 23:53:11 +00:00
Bill Meier d449c31d1d its ==> it's & it's ==> its as needed.
svn path=/trunk/; revision=47892
2013-02-26 01:22:18 +00:00
Guy Harris 8ed7a73e22 Fix a bunch of warnings.
Cast away some implicit 64-bit-to-32-bit conversion errors due to use of
sizeof.

Cast away some implicit 64-bit-to-32-bit conversion errors due to use of
strtol() and strtoul().

Change some data types to avoid those implicit conversion warnings.

When assigning a constant to a float, make sure the constant isn't a
double, by appending "f" to the constant.

Constify a bunch of variables, parameters, and return values to
eliminate warnings due to strings being given const qualifiers.  Cast
away those warnings in some cases where an API we don't control forces
us to do so.

Enable a bunch of additional warnings by default.  Note why at least
some of the other warnings aren't enabled.

randpkt.c and text2pcap.c are used to build programs, so they don't need
to be in EXTRA_DIST.

If the user specifies --enable-warnings-as-errors, add -Werror *even if
the user specified --enable-extra-gcc-flags; assume they know what
they're doing and are willing to have the compile fail due to the extra
GCC warnings being treated as errors.

svn path=/trunk/; revision=46748
2012-12-26 05:57:06 +00:00
Jeff Morriss 0266cceef3 Make all enum_val_t's const.
svn path=/trunk/; revision=46292
2012-11-29 20:15:37 +00:00
Jeff Morriss 3551a86c36 We always HAVE_CONFIG_H so don't bother checking whether we have it or not.
svn path=/trunk/; revision=45015
2012-09-20 01:29:52 +00:00
Michael Mann 296871713f make hash key session scoped
cleanup g_snprintf

svn path=/trunk/; revision=44565
2012-08-18 19:22:22 +00:00
Guy Harris ff6a33fdb4 Mark a parameter as unused.
Clean up indentation and get rid of trailing white space.

svn path=/trunk/; revision=44562
2012-08-18 06:53:39 +00:00
Guy Harris 549d81fe37 epan/dissectors/packet-ansi_map.c shouldn't be edited - it's generated
from the files in asn1/ansi_map.  Update packet-ansi_map-template.c to
reflect the use of session-scope-allocated data for the saved invoke
data, and regenerate the dissector - which means that
TransactionId_table_cleanup() still exists, and is still used, it just
frees only the hash table key, which is g_strdup()ed, not the value,
which is automatically freed when the session-scope-allocated data is
all freed.

svn path=/trunk/; revision=44561
2012-08-18 06:33:08 +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
pascal acc2a3706b Fix RVALS() macro usage
svn path=/trunk/; revision=42720
2012-05-19 19:05:36 +00:00
Guy Harris 9f925a618f The trial period is arguably over - no need for packet-ansi_map.c to
have its own #if 0'ed out definition of dgt_set_t.

svn path=/trunk/; revision=42020
2012-04-11 00:35:53 +00:00
Guy Harris dd4cb8424b Get rid of redundant Dgt1_9_bcd digit set - passing NULL as the digit
set uses tvb_bcd_dig_to_ep_str()'s default digit set, which is the same.

Clean up white space (no 4-space tab characters).

svn path=/trunk/; revision=42019
2012-04-11 00:34:13 +00:00
Stig Bjørlykke b71ce5d268 Do not assign a value to itself.
svn path=/trunk/; revision=41482
2012-03-11 14:03:13 +00:00
Alexis La Goutte 95cc98f92c Fix some Dead Store (Dead assignement/Dead increment) Warning found by Clang
svn path=/trunk/; revision=41211
2012-02-27 16:50:27 +00:00
Chris Maynard e799efeed9 Fix some duplicate display filter names.
svn path=/trunk/; revision=40568
2012-01-18 21:07:53 +00:00
Anders Broman faea2d624c Get rid of Warnings.
svn path=/trunk/; revision=39951
2011-11-19 22:42:51 +00:00
Anders Broman 1b7b2dd067 Use tvb_bcd_dig_to_ep_str().
svn path=/trunk/; revision=39929
2011-11-18 07:01:10 +00:00
Bill Meier 794757ae8f For proto_tree_add_item(..., proto_xxx, ...)use ENC_NA as the encoding arg.
Also: remove trailing whitespace for a number of files.

svn path=/trunk/; revision=39503
2011-10-21 02:10:19 +00:00
Bill Meier a6e35df202 Do some more conversions of proto_tree_add_item() 'encoding' arg
(previously missed).

svn path=/trunk/; revision=39451
2011-10-18 00:39:20 +00:00
Bill Meier 31abdcb584 Convert asn1 template files proto_tree_add_item() 'encoding' arg for field types FT_STRING as follows:
1. If there's no character encoding (ENC_ASCII, ...) specified
    then use ENC_ASCII.
 2. Always use ENC_NA
    (replacing any existing True/1/FALSE/0
    /ENC_BIG_ENDIAN/ENC_LITTLE_ENDIAN).

svn path=/trunk/; revision=39428
2011-10-15 19:48:19 +00:00
Jeff Morriss cf012d27b1 Build the ASN.1 dissectors directly into epan/dissectors (rather than building
them and then copying them over).  The "all" target to builds these dissectors
now (instead of "generate_files" and/or "copy_files").

asn2wrs's "-O" option now means "the dissector goes in this directory" (rather
than "all output goes in this directory"); it also means that the "-s" (single
output file) option is now required.

Fix things up so that it's possible to build all of the ASN.1 dissectors in
one shot.

Fix building of conformance files when doing out-of-source-tree builds.


Unfortunately "make all" in the asn1 directory always builds something--I think
because of circular depedencies.

svn path=/trunk/; revision=39333
2011-10-10 02:31:11 +00:00
Bill Meier 6142dd287b Convert 'encoding' parameter of certain proto_tree_add_item() calls in asn1/*:
Specifically:  Replace FALSE|0 and TRUE|1 by ENC_BIG_ENDIAN|ENC_LITTLE_ENDIAN as
  the encoding parameter for proto_tree_add_item() calls which directly reference
  an item in hf[] which has a type of:
     FT_BOOLEAN
     FT_IPv4
     FT_EUI64
     FT_GUID
     FT_UINT_STRING

 Also: For type FT_IPv6 use ENC_NA. (This was missed in SVN #39260)

svn path=/trunk/; revision=39332
2011-10-10 01:38:20 +00:00
Bill Meier e2996ceabe Convert 'encoding' parameter of certain proto_tree_add_item() calls in asn1 dissectors:
Specifically:  Replace FALSE|0 and TRUE|1 by ENC_BIG_ENDIAN|ENC_LITTLE_ENDIAN as
 the encoding parameter for proto_tree_add_item() calls which directly reference
 an item in hf[] which has a type of:
    FT_UINT8
    FT_UINT16
    FT_UINT24
    FT_UINT32
    FT_UINT64
    FT_INT8
    FT_INT16
    FT_INT24
    FT_INT32
    FT_INT64
    FT_FLOAT
    FT_DOUBLE


svn path=/trunk/; revision=39294
2011-10-06 16:50:13 +00:00
Anders Broman 7439bba9dc Try to do a more syntactically correct import.
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6150

svn path=/trunk/; revision=38159
2011-07-21 22:46:07 +00:00
Jeff Morriss 80c1ef3811 Fix a couple (value) mistakes in value_strings. Found by Martin's patch on the -dev list.
svn path=/trunk/; revision=37259
2011-05-18 20:06:17 +00:00
Anders Broman 55f45d5266 Add a missing IE found in trace from https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5637
svn path=/trunk/; revision=35842
2011-02-07 17:43:26 +00:00
Anders Broman 01ef9f73ef Remove debug printouts.
svn path=/trunk/; revision=35834
2011-02-05 14:37:52 +00:00
Anders Broman b723ccb30c Introduce preferences to set the strictness of Invoke/response
tracking.

svn path=/trunk/; revision=35822
2011-02-04 16:12:59 +00:00
Anders Broman b80813a45c From Porus Mehta:
Corrections to ANSI MAP ASN.1 specifications.

https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5584

svn path=/trunk/; revision=35556
2011-01-16 18:36:17 +00:00
Anders Broman 735709bee6 Add tvb_bcd_dig_to_ep_str()
/*
 * Given a tvbuff, an offset into the tvbuff, and a length that starts
 * at that offset (which may be -1 for "all the way to the end of the
 * tvbuff"), fetch BCD encoded digits from a tvbuff starting from either 
 * the low or high half byte, formating the digits according to an input digit set, 
 * if NUll a default digit set of 0-9 returning "?" for overdecadic digits will be used.
 * A pointer to the EP allocated string will be returned.
 * Note a tvbuff content of 0xf is considered a 'filler' and will end the conversion.
 */

svn path=/trunk/; revision=35286
2010-12-28 12:36:26 +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
Bill Meier 491f05b16e Use value_string_ext fcns to access several value_string arrays;
Minor whitespace cleanup.

svn path=/trunk/; revision=34900
2010-11-16 15:20:33 +00:00
Bill Meier 9ade30a7b1 #include <string.h> and/or #include <stdio.h> not needed.
svn path=/trunk/; revision=32417
2010-04-07 16:54:29 +00:00
Bill Meier f8b92f8d0b #include <stdio.h> not needed.
svn path=/trunk/; revision=32405
2010-04-06 17:01:14 +00:00
Anders Broman 5c2af3980f Fix Tag value wrong in ansi_map.asn file for ServiceId in ServiceRequest message.
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=4637

svn path=/trunk/; revision=32354
2010-04-01 20:07:17 +00:00