Commit graph

818 commits

Author SHA1 Message Date
Guy Harris
c4c4dd4715 Back out the asn2eth-generated GSM MAP dissector for now, at Anders
Broman's request, as it has a number of problems.

svn path=/trunk/; revision=13131
2005-01-20 06:22:20 +00:00
Guy Harris
36e8efcbca From Hannes Gredler: support for Juniper's DLT_JUNIPER_ATM{1,2} values.
svn path=/trunk/; revision=13130
2005-01-20 05:40:56 +00:00
Guy Harris
b8e743ada9 From Jean-Baptiste Marchand: stub dissectors for rras and pnp MSRPC
interfaces.

svn path=/trunk/; revision=13129
2005-01-20 05:06:38 +00:00
Guy Harris
c04a9a4180 There's no guaranteee that "req_resp_hdrs_do_reassembly()" gets called
only at the beginning of a tvbuff, so it needs an argument that's the
starting offset in the tvbuff.

svn path=/trunk/; revision=13128
2005-01-20 04:37:03 +00:00
Guy Harris
2b7ca484ac From Ruud Linders: support short names in multipart headers; SIP-T
requires this.

svn path=/trunk/; revision=13127
2005-01-20 01:26:34 +00:00
Ulf Lamping
39a6232a8d try to defragment DCE/RPC fragments (simply one after the other), if alloc_hint is zero
svn path=/trunk/; revision=13126
2005-01-19 23:41:07 +00:00
Anders Broman
d80fae9ab9 Attempt to reimplement "non standard data/parameter" and "tunnelled
protocol"

svn path=/trunk/; revision=13123
2005-01-19 22:44:09 +00:00
Gerald Combs
561fbc8b25 Add a field called "frame.protocols" which shows the protocols present
in the frame.   The filter "frame.protocols contains ip:icmp:ip" could
be used to find any ICMP packets containing IP headers.

Clean up whitespace.

svn path=/trunk/; revision=13118
2005-01-19 04:49:29 +00:00
Ulf Lamping
b5ee55d468 slightly improve dissection of complex_ping response
svn path=/trunk/; revision=13113
2005-01-18 20:44:11 +00:00
Guy Harris
e2ba7ba242 Add packet-h450.h to the list of header files.
svn path=/trunk/; revision=13107
2005-01-18 02:29:14 +00:00
Lars Roland
c2435429a1 Fix a small bug in h245.cnf.
All h.323 related statistics should work now in the same way as they did before the h323 dissectors were generated.

svn path=/trunk/; revision=13105
2005-01-17 23:42:22 +00:00
Guy Harris
4f81f615b0 Use -1 rather than tvb_length() to create a protocol tree item that runs
to the end of the tvbuff.

Don't return a value from "dissect_h4501()" - the value isn't used, and
"dissect_h4501()" is registered with "register_dissector()", so it's not
supposed to return a value.

svn path=/trunk/; revision=13104
2005-01-17 23:26:45 +00:00
Anders Broman
eee54467b1 Reinsert h450 dissection
svn path=/trunk/; revision=13100
2005-01-17 22:30:31 +00:00
Anders Broman
232ab9d158 Export q931_protocol_discriminator_vals
svn path=/trunk/; revision=13098
2005-01-17 22:26:33 +00:00
Anders Broman
f6fe109fc7 If a string of zero length is encountered offset still needs to be advanced(?)
svn path=/trunk/; revision=13097
2005-01-17 22:25:36 +00:00
Lars Roland
5a483e3abe From Anders Broman:
Add recently lost support for the h.323 conversations tap in the h225 dissector.

svn path=/trunk/; revision=13092
2005-01-17 21:52:30 +00:00
Tomas Kukosa
5b3af778d6 ASN.1 PER VisibleString support
svn path=/trunk/; revision=13085
2005-01-17 10:09:43 +00:00
Guy Harris
3778ca99c1 If a given TLV type isn't found in an aim_tlv table, just use "Unknown"
as the description - some aim_tlv tables have NULL in the end-of-table
entry.

For those that don't, replace "Unknown" with NULL; "Unknown" is now
redundant.

svn path=/trunk/; revision=13084
2005-01-17 08:13:02 +00:00
Guy Harris
6d5fa89996 When assembling application layer chunks, don't include the transport
layer byte in the reassembled data - including it means we have to pass
to "tvb_new_real_data()" a pointer to the *second* byte of a mallocated
chunk of data, but that would require us to have the free routine for
the new tvbuff back that pointer up before freeing it (we aren't doing
that currently, which means that "free()" either complains bitterly or,
potentially, corrupts the arena, causing crashes later).

Put in some XXX comments about some issues seen when looking at the
code.

svn path=/trunk/; revision=13083
2005-01-17 03:39:58 +00:00
Guy Harris
2bdef3c122 Rename the FieldError exception to DissectorError.
Add a DISSECTOR_ASSERT() macro, which is the usual type of assertion
macro, but throws a DissectorError exception with a message giving the
flien and line number and the failed test as a string.  Use that macro
in "alloc_field_info()".

Report that exception in the Info column and the protocol tree, as well
as logging the exception failure with g_warning().

svn path=/trunk/; revision=13078
2005-01-16 23:30:55 +00:00
Lars Roland
ce032dd5cf Add a few more things to the h225 dissector that got lost.
Lost things left:
-h.450 stuff
-support for the h.323 conversations tap (It is currently broken.)

svn path=/trunk/; revision=13076
2005-01-16 21:21:41 +00:00
Guy Harris
636d4690d7 Make the object length variable in some routines an "int"; we fetch a
16-bit unsigned value into it, but we might round it up to a multiple of
4 bytes, which could overflow a guint16.  Make arguments corresponding
to them "int" as well.

Use the reported length in "cops_analyze_packetcable_mm_obj()".

svn path=/trunk/; revision=13075
2005-01-16 20:26:19 +00:00
Ulf Lamping
1c9781b4ec throw the new FieldError exception, if a dissector tries to add a field with invalid parameters
add a message parameter to the show_exception function

svn path=/trunk/; revision=13074
2005-01-16 16:06:15 +00:00
Guy Harris
d1ae7c688f From Jon Ringle:
don't dissect attributes if there aren't any;

	put each attribute into a subtree;

	register the dissector by name.

Use "match_strval()" to check whether the message type is a known STUN
message type, and to generate the message type for the Info column.

Don't use "tvb_bytes_exist()" to check when we run out of data - use the
length fields from the packet.  Check the sanity of those lengths, too.

svn path=/trunk/; revision=13063
2005-01-16 04:25:27 +00:00
Guy Harris
7af9548d90 The keycode_first and keycode_count arguments to "listOfKeysyms()" can
come directly from packet data, so don't abort if they define a sequence
of keycodes that goes past 255 - just report errors for the keycodes
past 255.

Clean up indentation.

svn path=/trunk/; revision=13059
2005-01-16 01:22:53 +00:00
Guy Harris
b24afc4ed8 Revert to the previous formatting of the item.
svn path=/trunk/; revision=13058
2005-01-16 00:48:25 +00:00
Guy Harris
f1ce220265 Display the keycode list for a modifier a bit differently (don't list
the modifier name for every keycode, just give the modifier name once
and then show all the keycodes), and use "proto_item_append_text()"
rather than building a string.

Clean up white space.

svn path=/trunk/; revision=13057
2005-01-16 00:29:54 +00:00
Guy Harris
99594646d4 Correction for TP-Validity-Period extended format, from Victor Stratan:
Fix 1:
	Offset not incremented for relative type

	Fix 2:
	Semioctets not reversed for HHMMSS relative type

svn path=/trunk/; revision=13056
2005-01-15 23:45:37 +00:00
Guy Harris
d8d4a344c8 From Carlos Pignataro: Layer Two Tunneling Protocol version 3 [L2TPv3]
updates and enhancements:

  - Added Cookie and L2-Specific sublayer support via preferences dialog.
  - Added carried payload dissecting support from draft-ietf-l2tpext-pwe3-*
    and draft-townsley-l2tpv3-mpls-02.txt
  - Completed missing message types (call types) and result codes for stopccn
    and cdn.
  - Fixed conditionals for avp_vendor_id (Vendor-Specific AVPs)
  - Changed Pseudowire Capabilities List AVPs to use subtree instead of tab
  - Added numeric value of result and error codes
  - Added Session ID for v3 data packets and missing flags and reserved
  - Added version to the L2TPv3 protocol tree
  - Changed `Tunnel Id' to `Control Connection Id' for v3
  - Fixed offset for ctrl_tree on L2TPv3 over UDP
  - Added `L2TPv3' in the COL_PROTOCOL and fixed handling of L2TP version

svn path=/trunk/; revision=13055
2005-01-15 23:36:24 +00:00
Guy Harris
268e7b23d4 From Yann: handle OLSR messages with an unknown message type, using the
message length.

svn path=/trunk/; revision=13044
2005-01-15 10:09:00 +00:00
Michael Tüxen
8d5801b10d Add support for extended sequence numbers as specified in Annex A of Q.703.
svn path=/trunk/; revision=13042
2005-01-14 22:26:18 +00:00
Guy Harris
766b213ed6 If an item in a source description chunk begins with 4 bytes of zero,
that doesn't mean it's padding at the end of a previous item - it might,
for example, be the *first* item in the chunk.  Don't treat it as
padding.

Do, however, treat an item that begins with a zero byte as an item, but
break out of the loop processing items as soon as the item type is put
into the protocol tree, as there's no length field or data in an
RTCP_SDES_END item.  Fix the comment for that loop to indicate that the
loop checks both for end-of-frame and for an RTCP_SDES_END item.

svn path=/trunk/; revision=13040
2005-01-14 19:28:02 +00:00
Guy Harris
e7fd062619 Pass 0, not FALSE, as the FCS length argument (FALSE is defined as 0,
but the field is integral, not Boolean, so it's clearer if it's passed
as 0).

svn path=/trunk/; revision=13039
2005-01-14 18:05:08 +00:00
Gerald Combs
6c530b42b3 From Greg Morris: Improve malformed packet handling.
svn path=/trunk/; revision=13034
2005-01-14 17:09:11 +00:00
Guy Harris
94ecf93f8a Fix indentation.
Catch size values >= 0x80000000 and throw an exception rather than
crashing with an assertion.

svn path=/trunk/; revision=13032
2005-01-14 12:20:03 +00:00
Guy Harris
685b736c0b From Rene Pilz:
- Fix partly wrong cause values in the gmm (found by Miklos Szurdi)
	- Fix high/low nibble swap of the force to standby field (found by
	  Miklos Szurdi)
	- Dissect all elements

svn path=/trunk/; revision=13030
2005-01-14 11:40:05 +00:00
Guy Harris
544216dd74 From Stefano Pettini: RMT support for ALC and NORM.
svn path=/trunk/; revision=13029
2005-01-14 11:17:35 +00:00
Anders Broman
1fb480bcfe Some minor bugfixes to H225 functions exported and an OID added and one OID for H245
svn path=/trunk/; revision=13024
2005-01-13 21:12:06 +00:00
Guy Harris
d1f9f0b516 Use tcp_dissect_pdus() for DLSw-over-TCP.
Have the DLSw dissector reject packets with an unknown version field.

Leave out some more fields when dissecting Capability Exchange packets,
as they're not used in those packets.

Show numbers in hex when appropriate.

Show the individual subfields of the flow control and SSP flags fields.

Show the frame direction field with val_to_str(), and show the raw
value.

Clean up indentation.

svn path=/trunk/; revision=13019
2005-01-13 17:26:10 +00:00
Guy Harris
9fd1400dee Updates from Susanne Edlund.
Remove bogus boilerplate from introductory comment.

svn path=/trunk/; revision=13018
2005-01-13 09:21:04 +00:00
Guy Harris
e93d213c7a OPT RRs don't have a class field.
svn path=/trunk/; revision=13016
2005-01-13 07:51:08 +00:00
Guy Harris
d49241d087 Use symbolic names for ARP types.
Clean up indentation.

svn path=/trunk/; revision=13015
2005-01-13 07:49:31 +00:00
Guy Harris
31871276d6 HTTP requests have no content if there's no Content-Length header and no
Transfer-Encoding header.

svn path=/trunk/; revision=13014
2005-01-13 07:47:26 +00:00
Guy Harris
d7bf4a1400 Display PER booleans the way other bitfields are displayed.
svn path=/trunk/; revision=13013
2005-01-13 07:43:17 +00:00
Anders Broman
6465708652 Don't crash on a negative length
svn path=/trunk/; revision=13012
2005-01-13 07:03:14 +00:00
Ulf Lamping
aa139758f9 add new function dissect_dcerpc_uuid_t and let dissect_ndr_uuid_t call it
svn path=/trunk/; revision=13006
2005-01-12 21:20:50 +00:00
Guy Harris
7b49d981ae From Deepak Jain: L2TP v3 (draft 15) support.
Add VENDOR_IETF to <epan/sminmpec.h>, and add an entry for it to
sminmpec_values[], so that the L2TP dissector can use them rather than
defining its own copy of the private enterprise number values and table
- and make it do so.

svn path=/trunk/; revision=12999
2005-01-09 21:42:39 +00:00
Guy Harris
d8c21fe77e Properly declare "dissect_h245()" and "dissect_h245_h245()" as returning
nothing.

svn path=/trunk/; revision=12998
2005-01-09 00:01:55 +00:00
Guy Harris
54a2df6352 Get rid of some of the boilerplate comments from the sample dissector,
and de-boilerplate another part of the comment.

Fix a test of "octet_aligned" that was setting it to false rather than
testing whether it was false.

svn path=/trunk/; revision=12996
2005-01-08 20:54:23 +00:00
Anders Broman
d787b13c7c Reinsert dissection of h450 messages
svn path=/trunk/; revision=12994
2005-01-08 16:38:13 +00:00
Anders Broman
45aa6d1949 Add a dissector for RTP payload AMR RFC 3267
svn path=/trunk/; revision=12993
2005-01-08 15:49:37 +00:00
Anders Broman
5163475742 Generate "conversations" code correctly, adaptions to changes in asn2eth generator.
Regenerate with latest asn2eth compiler.

svn path=/trunk/; revision=12992
2005-01-08 14:42:12 +00:00
Guy Harris
d91588af2d Use BASE_NONE, not FT_NONE, for the "base" value of an FT_STRING field.
svn path=/trunk/; revision=12987
2005-01-07 19:34:36 +00:00
Guy Harris
4d47f84a1f Get rid of duplicate "element signature" field.
Clean up indentation.

The signatures are 4-byte strings - treat them as such.

Don't hide fields - dissectors should show what all bytes, other than
perhaps padding bytes, are.

Don't use the tvb_format_text-ified versions of strings as the value -
Ethereal already deals with non-printable characters when displaying
them.

When creating a subset tvbuff that runs to the end of the parent, use -1
as the length, don't calculate the length ourselves.

Use "tvb_reported_length()", not "tvb_length()", in loops that parse the
entire packet.

svn path=/trunk/; revision=12986
2005-01-07 19:29:54 +00:00
Gerald Combs
02520bcf9c Define data_handle at startup.
svn path=/trunk/; revision=12984
2005-01-07 15:08:24 +00:00
Guy Harris
8860bfa6ef From Mike Duigou: JXTA protocol support.
svn path=/trunk/; revision=12982
2005-01-07 12:58:43 +00:00
Guy Harris
b2aee79a35 From Carlos Pignataro:
o BGPv4 SAFI-Specific Attribute support
	  - draft-kapoor-nalawade-idr-bgp-ssa-00.txt
	o Tunnel SAFI support for BGP
	  - draft-nalawade-kapoor-tunnel-safi-02.txt
	o Small length fix

svn path=/trunk/; revision=12977
2005-01-07 11:43:05 +00:00
Guy Harris
a419637209 From Chris Maynard: free strings fetched with "tvb_fake_unicode()" when
we're done with them.

svn path=/trunk/; revision=12974
2005-01-07 10:44:44 +00:00
Guy Harris
0667d869b2 From Chris Maynard: free mallocated strings when we're done with them.
(There's still the risk of a leak if we throw an exception before we
free the string.)

Clean up indentation.

svn path=/trunk/; revision=12973
2005-01-07 10:39:51 +00:00
Guy Harris
87919fc4ef From Chris Maynard: free strings fetched with "tvb_get_string()".
Use "format_text()" or "tvb_format_text()" with the %s format, to handle
non-printable characters.

When uncompressing data into a new tvbuff, add it to the list of data
sources as we do elsewhere.

When putting items into the protocol tree from an uncompressed tvbuff,
use the offset into the tvbuff and the length of the item.

Fetch string lengths into a variable and use the variable rather than
repeatedly fetching the length from a tvbuff.

Use -1 rather than tvb_length_remaining() when putting a "to the end of
the tvbuff" item into the protocol tree.

Use "proto_tree_add_item()" to put items into the tree, rather than
"proto_tree_add_xxx" calls with a "tvb_get_yyy" call as the argument.

If we've fetched a value into a variable, don't re-fetch it in
"proto_tree_add_xxx" calls.

svn path=/trunk/; revision=12971
2005-01-07 10:09:34 +00:00
Guy Harris
50708fac46 Add a dissector to handle IEEE 802a's OUI Extended Ethertype; dissectors
can register an OUI, and PIDs for that OUI, in the same fashion that
they can do so for SNAP (after which the 802a OUI Extended Ethertype is
clearly modeled).

svn path=/trunk/; revision=12967
2005-01-06 08:37:43 +00:00
Guy Harris
586da2f14e Handle the case where nobody registers any OUIs and oui_info_table is
thus null.

svn path=/trunk/; revision=12966
2005-01-06 08:21:25 +00:00
Guy Harris
9f3573430b From Chris Maynard: catch a case where a string allocated with
"tvb_get_string()" wasn't freed.  (It appears there can also be leaks if
an exception is thrown while dissecting.)

svn path=/trunk/; revision=12965
2005-01-05 11:00:11 +00:00
Guy Harris
cf347c9f8b Use tvb_format_text() with %s format items, to handle non-printable
characters.

Clean up indentation.

svn path=/trunk/; revision=12964
2005-01-05 10:55:00 +00:00
Guy Harris
77762e2ddc From Chris Maynard: don't extract strings with "tvb_get_string()" if
we're not going to use them, and free them when we're done with them.

Clean up white space.

svn path=/trunk/; revision=12963
2005-01-05 10:51:05 +00:00
Guy Harris
45d7435bd3 From Chris Maynard: free strings allocated by "tvb_get_string()" after
we're done with them.

svn path=/trunk/; revision=12962
2005-01-05 10:45:43 +00:00
Guy Harris
de220d047d From Chris Maynard: free strings allocated by "tvb_fake_unicode()" after
we're done with them.

svn path=/trunk/; revision=12961
2005-01-05 10:42:26 +00:00
Guy Harris
652b22c0b9 From Chris Maynard: free mallocated data.
Don't assign the result of a routine that mallocates data to a const
pointer - that forces us to cast the pointer when freeing the data.

svn path=/trunk/; revision=12960
2005-01-05 10:38:50 +00:00
Guy Harris
6a8b0221f4 From Chris Maynard: free strings even if we don't put them into the
protocol tree.

svn path=/trunk/; revision=12959
2005-01-05 10:27:22 +00:00
Guy Harris
db204c7045 From Chris Maynard: free strings fetched with "tvb_fake_unicode()".
svn path=/trunk/; revision=12956
2005-01-05 10:17:09 +00:00
Guy Harris
c0f439e6ff Free the image type string as soon as we're done with it, so that we
don't leak it (even if we throw an exception processing the image).

svn path=/trunk/; revision=12955
2005-01-05 10:13:24 +00:00
Guy Harris
d4bf60e4ba From Chris Maynard: add a missing free of a string fetched with
tvb_get_string().

svn path=/trunk/; revision=12954
2005-01-05 10:05:03 +00:00
Guy Harris
33daa3e715 From Chris Maynard: don't fetch a string if we're not going to use it.
Also, move up the freeing of the tag string to immediately after we're
done with it, so we don't leak it if we throw an exception getting the
value.

svn path=/trunk/; revision=12953
2005-01-05 10:01:04 +00:00
Guy Harris
c2e6d1e686 Use "tvb_format_text()" with %s format strings, so that we handle
non-printable strings.

svn path=/trunk/; revision=12952
2005-01-05 09:53:03 +00:00
Guy Harris
81df0567ab Use "tvb_format_text()" to generate the text to use in
"proto_tree_add_text()" calls, so that we handle non-printable
characters if they happen to appear in the strings.

svn path=/trunk/; revision=12951
2005-01-05 09:46:43 +00:00
Guy Harris
51014ac699 Use "tvb_format_text()" to extract and format the buddy name string in
the top-level item for the buddy name, rather than extracting the string
into a mallocated buffer (and not freeing it...).

Put all the code to put stuff into the protocol tree inside "if(tree)".

svn path=/trunk/; revision=12950
2005-01-05 09:41:20 +00:00
Lars Roland
adcb6ff460 Fix broken parts of the new h225 dissector:
- add more data to the Info structure of the h225 taps.
- Fix the output to the Info Column

This patch is not complete, but statistics should basically work now.

svn path=/trunk/; revision=12948
2005-01-05 02:25:34 +00:00
Gerald Combs
4aee782dfa If the ICMP code is present, put it in the Info column.
svn path=/trunk/; revision=12934
2005-01-03 00:08:40 +00:00
Lars Roland
8dadc16642 fix a typo in new packet-h225.h
svn path=/trunk/; revision=12933
2005-01-02 22:56:25 +00:00
Anders Broman
08ab390705 Change the dissectors to asn2eth generated ones.
svn path=/trunk/; revision=12932
2005-01-02 22:05:47 +00:00
Guy Harris
ffaf53a9d6 *Correctly* append to the filter string.
svn path=/trunk/; revision=12926
2005-01-02 10:01:05 +00:00
Guy Harris
4d38774957 Unlike the detailed description of resource record types, the
detailed description of classes is pretty much redundant - remove it.

svn path=/trunk/; revision=12925
2005-01-02 09:40:26 +00:00
Guy Harris
f7bffeb9f7 "inet_pton()" isn't getting declared on Windows; include "inet_v6defs.h"
if NEED_INET_V6DEFS_H is defined, as is done in "packet-sdp.c", the
other module using "inet_pton()".

svn path=/trunk/; revision=12920
2005-01-01 23:40:56 +00:00
Guy Harris
a46d94072b Get rid of some warnings about variables whose values might be lost in a
longjmp, by properly qualifying those variables as volatile.

svn path=/trunk/; revision=12914
2005-01-01 23:11:46 +00:00
Guy Harris
4df2c4abd9 Make the signatures of functions passed to "register_tap_listener()"
match what "register_tap_listener()" expects (rather than squelching
warnings about the differences by casting function pointers to "void
*").

Make static some functions not used outside the module in which they're
defined. 

svn path=/trunk/; revision=12913
2005-01-01 12:49:54 +00:00
Guy Harris
71217a8007 As we've made the tap_specific_data field of a tap_packet_t structure a
const pointer (so that we don't get complaints when we make the
tap-specific data argument to "tap_queue_packet()" a const pointer,
allowing dissectors to hand const data to a tap without a complaint), we
should make the tap per-packet function take a const pointer as an
argument as well.  Do so.

In some taps, use _U_, or actually use the argument, rather than
sticking in dummy "X = X" assignments to fake use of parameters.  (This
means that the tap functions in question no longer have the notion that
they act on a particular static structure wired in.)

svn path=/trunk/; revision=12910
2005-01-01 02:57:02 +00:00
Guy Harris
3f0d0ca5ea Note what Fibre Channel spec documents this protocol.
Don't assign the const pointers passed to hash routines to non-const
pointers.

In "zonenm_to_str()", don't assume there's a null terminator in the
packet - use "tvb_get_string()" so that the buffer into which it's
copied is explicitly null-terminated.

Put the Domain & Port into the protocol tree as a "0xXXXXXXXX" string,
rather than as a string with one blank in it.

svn path=/trunk/; revision=12909
2004-12-31 22:00:44 +00:00
Guy Harris
ed15a73962 Don't bother copying the switch name to a buffer - we can just use
"tvb_get_ptr()".

svn path=/trunk/; revision=12908
2004-12-31 21:40:22 +00:00
Guy Harris
e58a199e9a Fix a bug introduced in the previous checkin.
Make the names for list record types match the names used before the
previous checkin.

svn path=/trunk/; revision=12907
2004-12-31 21:36:08 +00:00
Guy Harris
43ee35425a FC-over-IP is now covered by RFCs; update the specification references.
Make the protcol/version information an array of 8 bytes, not 2 guints;
not all the world's a (little-endian) PC!

svn path=/trunk/; revision=12906
2004-12-31 21:20:46 +00:00
Guy Harris
21cd2e1603 Note what Fibre Channel spec documents this protocol.
Don't assign the const pointers passed to hash routines to non-const
pointers.

Don't use "tvb_get_ptr()" to get a pointer to a data structure, and
dereference that pointer - there's no guarantee that the structure in
question will be located on an appropriate boundary in the data from the
packet (regardless of whether it's properly aligned within the data for
the protocol being dissected).

Put the record length for an EFP request into the protocol tree.

Check the sanity of the payload length for that request.

In "zonenm_to_str()", don't assume there's a null terminator in the
packet - use "tvb_get_string()" so that the buffer into which it's
copied is explicitly null-terminated.

Put the Domain & Port into the protocol tree as a "0xXXXXXXXX" string,
rather than as a string with one blank in it.

svn path=/trunk/; revision=12905
2004-12-31 20:58:23 +00:00
Guy Harris
16a61cc9c0 Note what Fibre Channel spec documents this protocol.
Don't assign the const pointers passed to hash routines to non-const
pointers.

Don't assume that strings the spec says are null-terminated are
necessarily null-terminated in the packet - use "tvb_strsize()" to find
the length of the purported null-terminated string; it'll throw the
appropriate exception if no null is found.

svn path=/trunk/; revision=12904
2004-12-31 20:35:55 +00:00
Guy Harris
43cf3c2480 Use "proto_tree_add_item()" to add a chunk of bytes to the protocol
tree.

svn path=/trunk/; revision=12900
2004-12-31 03:18:13 +00:00
Guy Harris
1d4bf3263b Don't assign const pointers to non-const pointers, especially if the
object pointed to by the non-const pointer won't be modified.

svn path=/trunk/; revision=12899
2004-12-31 03:17:00 +00:00
Guy Harris
018883dea9 "string_to_hex()" doesn't modify its first argument, so make it a
"const" pointer, and don't cast away the constness of "tvb_get_ptr()"s
result when passing it to "string_to_hex()".

svn path=/trunk/; revision=12898
2004-12-31 03:14:18 +00:00
Guy Harris
85f89615ea Don't cast away the constness of pointers passed to "ip_to_str()" -
"ip_to_str()" takes a "const guint8 *" argument.

svn path=/trunk/; revision=12897
2004-12-31 03:12:51 +00:00
Guy Harris
d9f4b6c9eb There are no guarantees that "strncasecmp()" works with
non-null-terminated strings, so be safe and fetch the metatag string
with "tvb_get_string()".

svn path=/trunk/; revision=12896
2004-12-31 03:10:11 +00:00
Guy Harris
29c1d25ddc Use "tvb_memeql()" to check whether specified bytes in a packet have a
specified value.

Make a constant array "const".

svn path=/trunk/; revision=12895
2004-12-31 02:48:53 +00:00
Guy Harris
9d9687dd5a Don't cast away the constness of argument pointers.
Don't supply our own definition of AF_INET or our own declaration of
"inet_pton()" - use the system ones if they're available.

"mkipv4_address()" doesn't modify the string passed to it - make it a
const pointer.

svn path=/trunk/; revision=12894
2004-12-31 02:16:05 +00:00
Guy Harris
8d80985ef7 Don't roll our own code to display IPv4 or IPv6 addresses, use
"ip_to_str()" and "ip6_to_str()".

Check the length of items for IPv4 and IPv6 addresses before displaying
them as such.

svn path=/trunk/; revision=12893
2004-12-31 02:13:42 +00:00