summaryrefslogtreecommitdiff
path: root/epan/dissectors/packet-usb.c
AgeCommit message (Collapse)AuthorFilesLines
2011-10-10 Convert 'encoding' parameter of certain proto_tree_add_item() calls in ↵Bill Meier1-5/+5
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-111/+111
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-08-08No need to check that usb_trans_info is not NULL here. The only way it ↵Chris Maynard1-1/+1
could have been NULL is if se_alloc0() returned NULL, but then it would have already been dereferenced before now. Fixes Coverity CID 612, "REVERSE INULL". svn path=/trunk/; revision=38417
2011-05-10Allow both PPP and ISO/IEC 13818-1 over USB to be dissected using heuristics.Chris Maynard1-2/+16
Resolves bug 4814. svn path=/trunk/; revision=37039
2011-04-21Add #include <ctype.h> before #include "isprint.h";Bill Meier1-187/+188
Remove an unneeded line of code; Do some indentation & whitespace cleanup. svn path=/trunk/; revision=36785
2011-04-21Fix Dead Store (Dead assignement/Dead increment) Warning found by ClangAlexis La Goutte1-1/+0
svn path=/trunk/; revision=36765
2011-04-21Fix Dead Store (Dead nested assignment) Warning found by Clang Alexis La Goutte1-5/+5
svn path=/trunk/; revision=36761
2011-03-25Change urb_type from FT_STRING to FT_UINT8. This fixes the display filteringChris Maynard1-18/+5
for this field. This change was prompted because of the following query: http://ask.wireshark.org/questions/3113/usburb_type-values Also, remove 2 unused fields found by running tools/checkhf.pl. svn path=/trunk/; revision=36331
2010-12-20Rename the routines that handle dissector tables with unsigned integerGuy Harris1-5/+5
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-13From Marton Nemeth via bug #5490: Cleanup USB endpoint direction display.Chris Maynard1-4/+39
svn path=/trunk/; revision=35182
2010-11-24Add support for USB isochronous. From Marton Nemeth via bug #5370.Chris Maynard1-0/+157
svn path=/trunk/; revision=35025
2010-10-30Use value_string_ext fcns to access a value_string array;Bill Meier1-115/+117
Sort value_string array to be in ascending order by value; Minor whitespace cleanup. svn path=/trunk/; revision=34729
2010-05-16Attempt to handle isochronous descriptors between the 64-byte header andGuy Harris1-49/+62
the payload. Should fix bug 4401. svn path=/trunk/; revision=32828
2010-05-10Indentation & whitespace cleanup (including: "4 space tabs" ==> spaces)Bill Meier1-263/+263
svn path=/trunk/; revision=32735
2010-04-21From Chris Maynard:Guy Harris1-170/+281
Support PPP-over-USB. Don't remove the USB pseudo-header from the packet data for Linux USB packets, just byte-swap it if necessary and have the USB dissector fetch the pseudo-header from the raw packet data. Update USB language ID values. svn path=/trunk/; revision=32534
2010-04-06#include <string.h> not needed.Bill Meier1-1/+0
svn path=/trunk/; revision=32410
2010-01-22Fix some gcc -Wshadow warningsBill Meier1-7/+7
svn path=/trunk/; revision=31623
2010-01-13From Didier Gautheron:Anders Broman1-4/+2
col_clear.diff Remove calls to col_clear : - called twice. - before functions which also clear the column - by replacing col_clear + col_append_xxx with col_add_xxx https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=4394 svn path=/trunk/; revision=31517
2009-10-30From Márton Németh: Jaap Keuter1-0/+9
When an unknown requests arrives try to parse it using the usual request format. svn path=/trunk/; revision=30775
2009-10-29From Marton Nemeth via bug 4181:Stig Bjørlykke1-2/+14
Take the USB descriptor length from packet. svn path=/trunk/; revision=30763
2009-10-29From Marton Nemeth via bug 4173:Stig Bjørlykke1-13/+6
Move bmRequestType field constants to header file. svn path=/trunk/; revision=30761
2009-10-25From Marton Nemeth via bug 4163:Stig Bjørlykke1-5/+11
Add support for input URBs. svn path=/trunk/; revision=30690
2009-08-16Switch a bunch of dissectors over to using tvb_new_subset_remaining()Kovarththanan Rajaratnam1-3/+3
svn path=/trunk/; revision=29446
2009-08-09Don't guard col_set_str (COL_PROTOCOL) with col_checkKovarththanan Rajaratnam1-2/+1
svn path=/trunk/; revision=29340
2009-07-31Fix indentation, get rid of a comment that might no longer apply (dumpGuy Harris1-2/+1
*what* as hex? The stuff we now display as generic fields?). svn path=/trunk/; revision=29257
2009-07-31From Adam Nielsen via bug 3659:Gerald Combs1-7/+48
Here is a patch against SVN that implements preliminary support for USB HID devices. At the moment it only dissects the initial set up packets (which you will see if you hotplug a keyboard or mouse.) The patch also fixes a minor bug in the USB dissector code which reported certain packets as malformed due to miscounting bytes, and it reports control packet data and padding data in a more user-friendly manner. svn path=/trunk/; revision=29256
2009-06-18From Kovarththanan Rajaratnam via bug 3548:Stig Bjørlykke1-60/+60
(1) Trailing/leading spaces are removed from 'name's/'blurb's (2) Duplicate 'blurb's are replaced with NULL (3) Empty ("") 'blurb's are replaced with NULL (4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME, FT_PROTOCOL, FT_STRING and FT_STRINGZ field types (5) Only allow non-zero value for 'display' if 'bitmask' is non-zero svn path=/trunk/; revision=28770
2009-05-26From Roberto Mariani via bug 3324:Gerald Combs1-51/+7
- Removed heuristic for find if is_request and used event_type - URB_INTERRUPT don't goes in reverse direction... fixed svn path=/trunk/; revision=28477
2008-12-24Name changes to match libpcap name change of the corresponding DLT_Guy Harris1-5/+5
value. svn path=/trunk/; revision=27113
2008-12-23Handle the new DLT_USB_LINUX_MMAP link-layer type.Guy Harris1-3/+93
svn path=/trunk/; revision=27099
2008-12-18Have descriptors start out with a length of "to the end of the packet",Guy Harris1-7/+12
so that if they're cut short, they appear to be the length of the remaining data in the packet, rather than zero-length. svn path=/trunk/; revision=27049
2008-12-18The "8 mysterious bytes" are bytes reserved for a setup header - withGuy Harris1-19/+17
the Linux USB capture mechanism, there are always 8 bytes of setup header after the URB, regardless of whether there's a setup header or not; if there is no setup header, we just skip those 8 bytes. Don't skip them *twice*, however. svn path=/trunk/; revision=27046
2008-12-17Have separate dissectors for setup requests and responses.Guy Harris1-81/+436
Provide dissectors for most other setup packets. (Still some more work needed on them.) Show descriptor types as decimal, as they are in the USB 2.0 spec. svn path=/trunk/; revision=27036
2008-12-17Display the CONTROL response data only if there *is* CONTROL response data.Guy Harris1-4/+8
svn path=/trunk/; revision=27034
2008-12-17Define all the standard request code values from the USB 2.0 spec, andGuy Harris1-18/+47
put them into the setup_request_names_vals value_string. When processing a response, use the request type value, so we only dissect standard replies when it's a reply to a standard request. Display the bRequest value in decimal, as that's how they're specified in the USB 2.0 spec. svn path=/trunk/; revision=27033
2008-12-16Include the string as part of a string descriptor.Guy Harris1-8/+16
Have setup dissectors return the offset past the end of what they dissect, and have their caller set its offset based on that. Use tvb_reported_length_remaining(), not tvb_length_remaining(), to decide whether there's more data, so that we throw an exception if the packet was cut short by a snapshot length. Add "Application Data" only if there's extra data to be added. svn path=/trunk/; revision=27020
2008-11-27Don't make the pseudo-header fields look as if they're part of the USBGuy Harris1-7/+5
data; at best, that can be a bit confusing, and, at worst, if the field isn't long enough, or the offset is wrong, it can cause an exception to be thrown and the dissection to fail. svn path=/trunk/; revision=26868
2008-10-02Make sure any data structures we allocate are properly initialized. FixesGerald Combs1-13/+8
bug 2922. svn path=/trunk/; revision=26333
2008-08-25#include <prefs.h> not req'dBill Meier1-1/+0
svn path=/trunk/; revision=26089
2008-08-12From Márton Németh:Anders Broman1-45/+406
Clean up the Linux USB pseudoheader dissection. svn path=/trunk/; revision=25990
2007-12-09From Márton Németh:Jaap Keuter1-0/+2
When an ISOCHRONOUS URB was captured the packet-usb.c does not handle it. Case URB_ISOCHRONOUS was added at two different places to handle it also. svn path=/trunk/; revision=23817
2007-11-27Make sure we fully initialize a struct. Fixes bug 2021.Gerald Combs1-0/+1
svn path=/trunk/; revision=23613
2007-11-23Catch a bad bLength, which may cause a loop. Fixes bug 2012.Gerald Combs1-85/+93
svn path=/trunk/; revision=23557
2007-10-23Apply the small performance enhancment patches for:Anders Broman1-1/+1
- if offset is 0, tvb_length is the same as tvb_length_remaining, just faster. Replace - col_append_fstr() with faster col_append_str() - col_add_str() with col_set_str() when it's safe svn path=/trunk/; revision=23252
2007-03-26from Jon SmirlRonnie Sahlberg1-8/+6
add defines for data direction (which direction in/out is data being transferred for this particylar request/response pair) and a mask for which bits of the byte contains the type. svn path=/trunk/; revision=21207
2007-03-26From Jon SmirlRonnie Sahlberg1-14/+36
add a whole bunch of new descriptor types svn path=/trunk/; revision=21199
2007-03-26From Ronnie Sahlberg1-1/+36
Charles Lepple This patch enables packet-usb.c to display all descriptors in the GET CONFIGURATION request, regardless of whether we know how to decode them. (All descriptors in that request share the same first two bytes.) It also adds the HID descriptor type (not the report descriptor, though - that is buried in a class request, not a device request). I am still working on actually decoding this descriptor. svn path=/trunk/; revision=21197
2007-03-25From a Jon Smirl patch Ronnie Sahlberg1-8/+8
rename the conversation field "class" to "interfaceClass" svn path=/trunk/; revision=21194
2007-03-25From Jon SmirlRonnie Sahlberg1-2/+1
change the private data pointer name from masstorage to class_data since there will be future class specific dissectors that will also want to hang some extra data off these structures svn path=/trunk/; revision=21193