aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-iax2.c
AgeCommit message (Collapse)AuthorFilesLines
2013-09-22emem -> wmem conversion:Pascal Quantin1-1/+1
- 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-15More wmem conversion (leaving uat related functions aside)Pascal Quantin1-10/+10
svn path=/trunk/; revision=52055
2013-09-09expert_add_info_format_text -> expert_add_info_formatMichael Mann1-3/+3
svn path=/trunk/; revision=51852
2013-07-17Remove fragment_data, add fragment_head, fragment_item - for now alias it to ↵Jakub Zawadzki1-1/+1
the same structure. This is begin of work to split fragment head and fragments items. svn path=/trunk/; revision=50708
2013-07-14Rewrite reassemble API to use TVBs instead of raw data.Jakub Zawadzki1-1/+1
(it seems to be working for TCP ^^) svn path=/trunk/; revision=50580
2013-07-06Fix display filter errors caught by checkfiltername.plMichael Mann1-3/+3
svn path=/trunk/; revision=50399
2013-07-01Consistently maintain the callState member of an iax2_info_t structureGuy Harris1-2/+46
as a voip_call_state value; don't have it sometimes a voip_call_state and sometimes a frame subtype. This should squelch some complaints from newer versions of Clang about unnecessary array-bounds checks - the array-bounds checks are done on frame subtypes, where they *are* necessary (nothing prevents an untrustworthy IAX2 implementation or an untrustworthy capture file writer from putting an arbitrary value in the packets), not on voip_call_state values (where it was only necessary because the value wasn't, in that case, a voip_call_state value, it was a frame subtype cast to a voip_call_state). svn path=/trunk/; revision=50277
2013-06-30Batch of filterable expert infos.Michael Mann1-4/+18
Also added a note about deprecating expert_add_info_format svn path=/trunk/; revision=50270
2013-06-14Remove check_col() and the occasional tree.Michael Mann1-23/+12
svn path=/trunk/; revision=49920
2013-05-12Add the posibillity to use a key for per-packet-data.Anders Broman1-4/+4
svn path=/trunk/; revision=49259
2013-03-22Don't wire into the reassembly code the notion that reassemblies shouldGuy Harris1-7/+7
be done on flows from one address to another; reassembly for protocols running atop TCP should be done on flows from one TCP endpoint to another. We do this by: adding "reassembly table" as a data structure; associating hash tables for both in-progress reassemblies and completed reassemblies with that data structure (currently, not all reassemblies use the latter; they might keep completed reassemblies in the first table); having functions to create and destroy keys in that table; offering standard routines for doing address-based and address-and-port-based flow processing, so that dissectors not needing their own specialized flow processing can just use them. This fixes some mis-reassemblies of NIS YPSERV YPALL responses (where the second YPALL response is processed as if it were a continuation of a previous response between different endpoints, even though said response is already reassembled), and also allows the DCE RPC-specific stuff to be moved out of epan/reassembly.c into the DCE RPC dissector. svn path=/trunk/; revision=48491
2013-03-18From beroset:Anders Broman1-11/+11
remove C++ incompatibilities https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8416 svn path=/trunk/; revision=48400
2013-01-11replace g_warning with expert_add_info_format()Michael Mann1-24/+22
See bug 8155 (https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8155) svn path=/trunk/; revision=47031
2012-12-02Introduce, and start using, TVB_SET_ADDRESS() and TVB_SET_ADDRESS_HF(). TheyJeff Morriss1-1/+1
are like the non-TVB versions except that they take a TVB and an offset instead of (frequently) a pointer into the TVB. Calling tvb_get_ptr() before modifying the rest of the fields should help fix https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7960 (though I can't reproduce that problem). Replace a bunch of calls like: SET_ADDRESS(..., AT_XXX, length, tvb_get_ptr(tvb, offset, length)); with: TVB_SET_ADDRESS(..., AT_XXX, tvb, offset, length); svn path=/trunk/; revision=46324
2012-11-27Uh, it's BASE_EXT_STRING, not BASE_RANGE_STRING.Bill Meier1-1/+1
svn path=/trunk/; revision=46214
2012-11-26Fix several [-Wshadow] warnings;Bill Meier1-875/+979
Also: - Create/use several extended value strings; - Reformat hf[] array; - Do various whitespace and formatting changes to use a consistent style. svn path=/trunk/; revision=46210
2012-09-20We always HAVE_CONFIG_H so don't bother checking whether we have it or not.Jeff Morriss1-3/+1
svn path=/trunk/; revision=45017
2012-09-07From Robert Bullen via ↵Jeff Morriss1-0/+2
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7683 : The reassembled fragments tree in the Packet Details view is awesome, but it lacks one thing: a field that exposes the reassembled data. tcp.data already exists for exposing a single TCP segment's payload as a byte array. It would be handy to have something similar for a single application layer PDU when TCP segment reassembly is involved. I propose tcp.reassembled.data, named and placed after the already existing field tcp.reassembled.length. My primary use case for this feature is outputting tcp.reassembled.data with tshark for further processing with a script. The attached patch implements this very feature. Because the reassembled fragment tree code is general purpose, i.e. not specific to just TCP, any dissector that relies upon it can add a similar field very cheaply. In that vein I've also implemented ip.reassembled.data and ipv6.reassembled.data, which expose reassembled fragment data as a single byte stream for IPv4 and IPv6, respectively. All other protocols that use the reassembly code have been left alone, other than inserting NULL into their initializer lists for the newly introduced struct field reassemble.h:fragment_items.hf_reassembled_data. svn path=/trunk/; revision=44802
2012-08-27Fix 2 memory leaks;Bill Meier1-16/+19
Essentially: 'fid' & 'fragment' hash tables can be global (i.e., need not be 'per call') thus removing g_malloc'd storage never freed because it was pointed to in se_alloc'd structs. Fixes Bug #4134: https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=4134 Also: fix a compile error when compiling with '#define DEBUG_DESEGMENT' svn path=/trunk/; revision=44685
2012-08-26Fix two minor memory leaks.Bill Meier1-2/+2
svn path=/trunk/; revision=44682
2012-08-26Fix 'Warn Dissector bug, protocol IAX2, in packet 62: proto.c:4406: failed ↵Bill Meier1-1/+1
assertion "fixed_item->parent == tree"' svn path=/trunk/; revision=44681
2012-08-10Use val_to_str_const() where appropriate;Bill Meier1-2/+2
Also (for a few files): - create/use some extended value strings; - remove unneeded #include files; - remove unneeded variable initialization; - re-order fcns slightly so prefs_reg_handoff...() at end, etc svn path=/trunk/; revision=44438
2012-08-10convert some simple uses to use ephemeral memoryMichael Mann1-2/+1
svn path=/trunk/; revision=44413
2012-06-28Update FSF address - part II.Jakub Zawadzki1-1/+1
svn path=/trunk/; revision=43538
2012-05-07Get rid of remaining Booleans-as-encoding-arguments inGuy Harris1-9/+37
proto_tree_add_item() calls. Update the introductory comment to give the RFC for IAX2. (tools.ietf.org rules.) svn path=/trunk/; revision=42490
2012-02-28From Sean Bright:Anders Broman1-15/+69
IAX2 trunk packets display misleading call information. https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6818 svn path=/trunk/; revision=41220
2012-02-14There's no need to get the parent of an item we're passing intoJeff Morriss1-1/+1
proto_tree_move_item(): that function will expects the item, not its parent. This avoids dissector bugs such as the one reported in https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6768 : ** (process:745): WARNING **: Dissector bug, protocol RTP, in packet 82: proto.c:4273: failed assertion "fixed_item->parent == tree" svn path=/trunk/; revision=41021
2012-02-09From Sean Bright via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6815 :Jeff Morriss1-1/+1
Don't use tvb_get_ptr() to retrieve a string being sent into proto_tree_add_string_format(): use tvb_get_ephemeral_string() instead. svn path=/trunk/; revision=40944
2011-12-09From Tilghman Lesher:Jaap Keuter1-7/+84
Some commands and IEs from the current release of Asterisk are missing from the IAX protocol dissector. This patch provides them. svn path=/trunk/; revision=40141
2011-10-21For proto_tree_add_item(..., proto_xxx, ...)use ENC_NA as the encoding arg.Bill Meier1-1/+1
Also: remove trailing whitespace for a number of files. svn path=/trunk/; revision=39503
2011-10-19More conversions of proto_tree_add_item() 'encoding' argBill Meier1-1/+1
svn path=/trunk/; revision=39467
2011-10-16Do some conversions of proto_tree_add_item() 'encoding' arg.Bill Meier1-5/+5
(previously missed). 57 FT_BOOLEAN: FALSE-->ENC_BIG_ENDIAN 31 FT_BOOLEAN: TRUE-->ENC_LITTLE_ENDIAN 10 FT_BYTES: ENC_BIG_ENDIAN-->ENC_NA 1 FT_BYTES: ENC_LITTLE_ENDIAN-->ENC_NA 21 FT_BYTES: FALSE-->ENC_NA 2 FT_BYTES: TRUE-->ENC_NA 2 FT_IPXNET: ENC_BIG_ENDIAN-->ENC_NA 6 FT_IPv6: ENC_BIG_ENDIAN-->ENC_NA 1 FT_IPv6: FALSE-->ENC_NA 6 FT_NONE: ENC_BIG_ENDIAN-->ENC_NA 19 FT_NONE: FALSE-->ENC_NA 3 FT_NONE: TRUE-->ENC_NA 1 FT_STRING: ENC_BIG_ENDIAN-->ENC_ASCII|ENC_NA 1 FT_STRING: ENC_LITTLE_ENDIAN-->ENC_ASCII|ENC_NA 5 FT_STRING: FALSE-->ENC_ASCII|ENC_NA 1 FT_STRING: TRUE-->ENC_ASCII|ENC_NA 4 FT_STRINGZ: ENC_NA-->ENC_ASCII|ENC_NA 8 FT_STRINGZ: FALSE-->ENC_ASCII|ENC_NA 1 FT_INT32: FALSE-->ENC_BIG_ENDIAN 1 FT_INT32: TRUE-->ENC_LITTLE_ENDIAN 11 FT_UINT8: 0-->ENC_BIG_ENDIAN 111 FT_UINT8: FALSE-->ENC_BIG_ENDIAN 17 FT_UINT8: TRUE-->ENC_LITTLE_ENDIAN 1 FT_UINT16: 0-->ENC_BIG_ENDIAN 68 FT_UINT16: FALSE-->ENC_BIG_ENDIAN 18 FT_UINT16: TRUE-->ENC_LITTLE_ENDIAN 4 FT_UINT24: FALSE-->ENC_BIG_ENDIAN 70 FT_UINT32: FALSE-->ENC_BIG_ENDIAN 1 FT_UINT32: TRUE-->ENC_LITTLE_ENDIAN 4 FT_UINT64: FALSE-->ENC_BIG_ENDIAN 1 FT_UINT64: TRUE-->ENC_LITTLE_ENDIAN 1 FT_UINT_STRING: FALSE-->ENC_ASCII|ENC_BIG_ENDIAN svn path=/trunk/; revision=39442
2011-10-15Convert proto_tree_add_item() 'encoding' arg for field types FT_STRING, ↵Bill Meier1-1/+1
FT_STRINGZ, FT_UINT_STRING as follows: 1. If there's no character encoding (ENC_ASCII, ...) specified then use ENC_ASCII. 2. For all but FT_UINT_STRING, always use ENC_NA (replacing any existing True/1/FALSE/0 /ENC_BIG_ENDIAN/ENC_LITTLE_ENDIAN). svn path=/trunk/; revision=39426
2011-10-10 Convert 'encoding' parameter of certain proto_tree_add_item() calls in ↵Bill Meier1-16/+16
non-autogenerated epan/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_BOOLEAN FT_IPv4 FT_EUI64 FT_GUID FT_UINT_STRING Also: For type FT_ITv6 use ENC_NA. (This was missed in SVN #39260) svn path=/trunk/; revision=39328
2011-10-06Convert 'encoding' parameter of certain proto_tree_add_item() calls in ↵Bill Meier1-12/+12
non-autogenerated epan/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=39288
2011-10-04Use ENC_NA as encoding for proto_tree_add_item() calls which directly ↵Bill Meier1-2/+2
reference an hf item (in hf[] with types: FT_NONE FT_BYTES FT_IPV6 FT_IPXNET FT_OID Note: Encoding field set to ENC_NA only if the field was previously TRUE|FALSE|ENC_LITTLE_ENDIAN|ENC_BIG_ENDIAN svn path=/trunk/; revision=39260
2011-09-21Whitespace cleanup:Bill Meier1-2/+2
Use consistent indentation; Convert "4 space tabs" to spaces; Remove trailing whitespace. svn path=/trunk/; revision=39082
2011-09-21Fix ex "modeline" so it works;Bill Meier1-1/+1
See https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5748 svn path=/trunk/; revision=39081
2011-08-16From Jakub Ruzicka via bug 6240: Show data for trunked packets. Some typo ↵Chris Maynard1-23/+23
fixes by me. Reference: https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6240 svn path=/trunk/; revision=38571
2011-05-04Cleanup: replace sizeof(arr)/sizeof(arr[0]) with shorter array_length(arr)Jakub Zawadzki1-1/+1
svn path=/trunk/; revision=36986
2011-04-22Use _U_ for unused function parameters instead of assigning the variableStephen Fisher1-10/+3
to itself. Found by clang 3.0 (trunk 129935) compiler. svn path=/trunk/; revision=36821
2011-04-18Fix Dead Store (Dead assignement/Dead increment) Warning found by ClangAlexis La Goutte1-6/+1
svn path=/trunk/; revision=36699
2011-02-19Fix Visual C++ code analysis warnings.Gerald Combs1-4/+5
svn path=/trunk/; revision=36007
2011-01-30Introduce "Fragment count" filter element for all protocols doing reassembly.Stig Bjørlykke1-0/+7
svn path=/trunk/; revision=35705
2010-12-20Rename the routines that handle dissector tables with unsigned integerGuy Harris1-4/+4
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-06Fix various typos and spelling errors.Bill Meier1-1/+1
svn path=/trunk/; revision=35126
2010-06-13Fix Bug #4868; "Wireshark crash selecting Inter-Asterisk exchange v2 packet ↵Bill Meier1-1/+1
data" See: https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=4868 A field length was being set incorrectly (too large) thus causing packet_hex_apply_reverse_tag() to run off the end of a text_view buffer (thus causing a crash) when attempting to highlight the field bytes in the hex-view pane. ToDo: Add some sanity checking in packet_hex_apply_reverse_tag(). svn path=/trunk/; revision=33212
2010-05-25From Jakub Ruzicka:Anders Broman1-9/+213
Trunk packet support in IAX2 dissector https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=4783 svn path=/trunk/; revision=32942
2010-04-28Remove trailing blanks; Also: Altho tabs expanded, use tab-width=8 anyway.Bill Meier1-4/+4
svn path=/trunk/; revision=32587
2010-02-06Renamed some reassembled data texts.Stig Bjørlykke1-1/+1
Removed some check_col(). svn path=/trunk/; revision=31809