Commit Graph

2923 Commits

Author SHA1 Message Date
Anders Broman 9c99a261f0 From Maynard, Chris :
The attached patches, generated via  svn diff , correct various compiler 

& lint warnings, among them: 

 

lemon.c(2582) : warning C4090: '=' : different 'const' qualifiers

packet-ber.c(212) : warning C4018: '<=' : signed/unsigned mismatch

packet-ber.c(228) : warning C4018: '>=' : signed/unsigned mismatch

packet-bootp.c(2112) : warning C4018: '<' : signed/unsigned mismatch

packet-iscsi.c(801) : warning C4018: '>=' : signed/unsigned mismatch


svn path=/trunk/; revision=15085
2005-07-26 09:52:06 +00:00
Anders Broman fbb92df9f4 Get rid of an unused variable.
svn path=/trunk/; revision=15082
2005-07-26 09:25:46 +00:00
Anders Broman 7e6e7b8b01 From Hannes Gredler:
a patch that adds support for
dissecting packets captured on ML-, LS- and AS PICs
using Multi-link PPP encapsulation,
running JUNOS 7.3 or higher;

additional there i did some clean-up in the
juniper dissector that makes future addition
of JUNIPER_DLTs easier;

svn path=/trunk/; revision=15081
2005-07-26 08:59:32 +00:00
Ronnie Sahlberg 6165bb328f add decoding of ELS iFCP CBIND packets
svn path=/trunk/; revision=15080
2005-07-26 08:47:46 +00:00
Jörg Mayer 7949c7f31c char -> const char warning fixes
svn path=/trunk/; revision=15079
2005-07-26 08:01:16 +00:00
Ronnie Sahlberg 0e9e556e5a From fred hoekstra
New protocol: DEC DNA Routing protocol


svn path=/trunk/; revision=15078
2005-07-26 01:18:25 +00:00
Ronnie Sahlberg 3e8894dd23 iFCP uses one dedicated TCP session per fc-endpoint pair.
The FC D_id and S_id fields in teh FC frame encapsulated inside iFCP unfortunately has "undefined" (semi-random) values    so we can not use th S_/D_id matching in FC when transported atop iFCP.


Change iFCP to call a new  fc_ifcp handler instead of the fc handler.

Add a new handler to FC specific to iFCP. 
Only set the pinfo->src/dst fields to the S_id/D_id fields IFF the FC frame was NOT transported ontop of iFCP.
Othervise  we just use the TCP/IP values that are already stored there.

Some Hosts use RelativeOffset fields for FC.  We can only dissect the RelOff field with offset 0.
Change FC to only call the FCP subdissector if offset==0  when relative offsets are used.


Some hosts when using relative offsets  do not specify a proper value for rxid in teh commands instead htey lkeave it as 0xffff
Change the FCP conversation matching to ignore RXID when searching for a conversation.



svn path=/trunk/; revision=15076
2005-07-26 00:54:16 +00:00
Luis Ontanon 60ae91aa5e Avoid leaking tap info by using emem allocators
svn path=/trunk/; revision=15075
2005-07-25 23:54:02 +00:00
Luis Ontanon 7796905fd8 From Thomas Anders:
SNMP Engine ID dissection according to RFC3411


svn path=/trunk/; revision=15073
2005-07-25 23:33:44 +00:00
Gerald Combs 6fa95413b8 From Ronnie: Offset checking/handling fix.
Fix up whitespace and newlines.

svn path=/trunk/; revision=15072
2005-07-25 23:11:32 +00:00
Ronnie Sahlberg 93a73781ee from aboo
fix  multiple pdus in one segment


svn path=/trunk/; revision=15069
2005-07-25 21:18:58 +00:00
Jörg Mayer 88895e2f02 Warning fixes
svn path=/trunk/; revision=15067
2005-07-25 21:08:14 +00:00
Anders Broman 415359db46 From Morro Roberto :
- bug fixes to the dissectors for the GENERALIZED_UNI and
 LABEL objects
 - improved dissector of flag field for the ERROR object
 - improved LABEL_SET object dissector
 - support for the new (proposed) ASSOCIATION object (see 
 draft-ietf-ccamp-gmpls-recovery-e2e-signaling).
 Moveover find also attached a patch to OSPF that fixes a line 
 of source code lost in the TNA TLV (the code compiled anyway).

svn path=/trunk/; revision=15066
2005-07-25 19:52:08 +00:00
Luis Ontanon caa15f2906 Get rid of a unused variable
svn path=/trunk/; revision=15065
2005-07-25 19:19:34 +00:00
Luis Ontanon a7cee8a93e Make the DLT an option, reduce the number of instances and rename them.
svn path=/trunk/; revision=15064
2005-07-25 19:06:02 +00:00
Luis Ontanon 28de1cec4d Fix the IP address representation string (was inverted on little endians)
svn path=/trunk/; revision=15063
2005-07-25 19:03:57 +00:00
Guy Harris 7a6f0a102c When reassembling a packet, all data, including data with
FD_NOT_MALLOCED set, has to be copied - all FD_NOT_MALLOCED means is
that the fragment's data is part of the old reassembled data, rather
than a malloced chunk of its own (this happens if, after reassembly, the
dissector says more reassembly is necessary, as can happen, for example,
in the case of HTTP and other protocols where reassembly continues until
a terminator is seen).  Not copying the data means that the reassembled
data is, in part, whatever random junk happens to be in the
newly-allocated buffer.

Back out the change not to copy the data, but add some sanity checks, in
the hopes of preventing the crash that caused the change not to copy the
data to be added, and in the hopes of discovering the ultimate source of
that crash and fixing it.

svn path=/trunk/; revision=15057
2005-07-25 18:03:19 +00:00
Gerald Combs 4d666be4b8 Break out of an infinite loop. Fixes bugs 296 and 297.
svn path=/trunk/; revision=15054
2005-07-25 15:43:38 +00:00
Ulf Lamping 4d6daa907c packet-http.c(484) : warning C4101: 'i' : unreferenced local variable
packet-http.c(486) : warning C4101: 'si' : unreferenced local variable
packet-kink.c(628) : warning C4101: 'quick_mode_payloads_length' : unreferenced local variable

svn path=/trunk/; revision=15051
2005-07-25 01:22:03 +00:00
Guy Harris 72560a2e04 Fix indentation.
svn path=/trunk/; revision=15050
2005-07-24 22:01:14 +00:00
Guy Harris 255b302a82 Fix some typoes.
Call "dissect_attribute_value_pairs()" regardless of whether we're
building a protocol tree, so the EAP subdissector is always called.

"dissect_attribute_value_pairs()" is only called when the length of AVPs
in the packet is non-zero; don't bother checking for a zero length.

Don't put two items in for each AVP - one is sufficient.

Add some more length checks when processing AVPs.  Don't require AVPs to
be at least 3 bytes long - they might have just a type and length; let
an exception be thrown if that's a problem.

Don't require that the entire AVP be available in the tvbuff before
processing it; let an exception be thrown as we're processing the AVP if
we don't have all the data, so the stuff before the end is processed.

Give the tvbuff for the AVP data a length that reflects the length of
data left in the tvbuff, so that the appropriate exception is thrown if
the packet was cut short by a snapshot length.

Don't have a fixed-length buffer for reassembled EAP messages; grow it
as necessary.

Don't special-case the initial part of the processing of EAP messages;
put in the standard length item, as well as, for fragments, an item for
the fragment data.

Check for non-consecutive EAP-Message attributes.

Set the columns non-writable while dissecting the EAP message, so
Protocol and Info reflect the RADIUS packet.

Doing the reassembly by gluing together all the consecutive EAP-Message
attributes means we don't need help from the EAP dissector, returning
the total length of the EAP message.  Get rid of the no-longer-needed
eap_fragment dissector; just call the regular EAP dissector.

svn path=/trunk/; revision=15046
2005-07-24 20:39:19 +00:00
Michael Tüxen 200571c143 Fix a typo.
svn path=/trunk/; revision=15044
2005-07-24 19:58:05 +00:00
Guy Harris 554f620001 Constify to remove a bunch of warnings. Add some casts to squelch
(presumably-)harmless-but-otherwise-unremovable const-to-nonconst
warnings.

In the TACACS dissector, clean up the variables used in option parsing
to avoid some const-to-nonconst warnings.

Clean up some white space.

svn path=/trunk/; revision=15043
2005-07-24 19:01:28 +00:00
Guy Harris 72c01a62f8 "fragment_add_common()" isn't used outside this file - make it static.
Move to "show_fragment()" the code to append the fragment information to
the top-level item.

Fix indentation.

svn path=/trunk/; revision=15042
2005-07-24 17:48:10 +00:00
Jörg Mayer cb2d67351c Lars Ruoff:
Use correct offsets to decode bssid in all cases:
        Depending on the packet type the header contains
        up to 4 addresses but may contain less. The position/
        definition of the bssid changes as a result of this.

svn path=/trunk/; revision=15038
2005-07-24 11:35:41 +00:00
Luis Ontanon 3c8376dcf8 register the dissector by name
svn path=/trunk/; revision=15036
2005-07-24 10:32:37 +00:00
Ronnie Sahlberg 699e51ccdd some more ep_tvb_get_string updates
svn path=/trunk/; revision=15034
2005-07-24 04:24:30 +00:00
Luis Ontanon 05c7ac167e Autogenerate the sminmpec.c file from iana's enterprise-numbers file
svn path=/trunk/; revision=15033
2005-07-24 03:36:21 +00:00
Luis Ontanon 411ab7fa9d fix a leak of tap info data by replacing g_strdup with ep_strdup
svn path=/trunk/; revision=15032
2005-07-24 03:05:08 +00:00
Ronnie Sahlberg 9ef6568c56 some more dissectors converted to ep_tvb_get_string
again   at least one obvious memleak was found in the old code



svn path=/trunk/; revision=15031
2005-07-24 03:01:41 +00:00
Luis Ontanon b8a874be21 use ep_alloc instead of statically allocated buffers
svn path=/trunk/; revision=15030
2005-07-24 02:59:17 +00:00
Luis Ontanon 273dc953ea change g_strdup() calls with ep_strdup calls (fixing a significant leakage of tap data)
svn path=/trunk/; revision=15029
2005-07-24 02:56:41 +00:00
Luis Ontanon e9ec2c51aa - change the report_failure dialog for a less painful g_warning
- use ep_alloc for reassemling eap fragments instead of a static buffer
- use ep_strdup_printf() instead of a static buffe to return the cosine's VP/VC AVP label
- add few TODO comments


svn path=/trunk/; revision=15028
2005-07-24 02:53:09 +00:00
Ronnie Sahlberg 835df3a1d2 convert some uses of tvb_get_string() to ep_tvb_get_string()
there was at least one obvious memleak in one of the uses of tvb_get_string()



svn path=/trunk/; revision=15027
2005-07-24 02:43:41 +00:00
Luis Ontanon 910f98eb86 Replace two calls to tvb_get_string with the new ep_tvb_get_string (this fixes a leak I introdduced at the last checkin)
remove the stat_infos PtrArray as we do not need to free our tap data anymore, YEAH!


svn path=/trunk/; revision=15026
2005-07-24 02:43:20 +00:00
Ronnie Sahlberg 0d385f730f add
ep_tvb_get_string
that acts the same as tvb_get_string   but the buffer returned need not be freed.



svn path=/trunk/; revision=15024
2005-07-24 01:56:01 +00:00
Luis Ontanon 4f5c0a8cb2 move the stats_tree tap into the http dissector (not anymore in the plugin)
change several calls to g_memdup into ep_strndup, fix the free calls


svn path=/trunk/; revision=15022
2005-07-24 01:42:41 +00:00
Luis Ontanon 2803839cba I believe we should use DISSECTOR_ASSERT instead of g_assert.
fix and clean g_strdup_printf()


svn path=/trunk/; revision=15019
2005-07-24 01:21:38 +00:00
Luis Ontanon d9c2273262 add some utility functions that use ep_alloc instead of g_malloc.
ep_memdup
ep_strdup
ep_strndup
ep_strdup_printf


svn path=/trunk/; revision=15018
2005-07-24 00:29:57 +00:00
Jörg Mayer 30a8557868 More 'char*' -> 'const char*' changes to fix warnings.
svn path=/trunk/; revision=15015
2005-07-23 11:41:25 +00:00
Jörg Mayer c5ab5374c2 Some more 'char*' -> 'const char*' changes
svn path=/trunk/; revision=15013
2005-07-23 06:53:59 +00:00
Jörg Mayer cd0744efd1 Add includes to fix warnings of type
gencode.c:383: warning: no previous declaration for
                        'dfw_interesting_fields'

svn path=/trunk/; revision=15012
2005-07-23 06:51:57 +00:00
Jörg Mayer fd9291e9c6 Move declaration of sttype_register_* functions from
syntax-tree.c to syntax-tree.h.

This fixes some warning of type
sttype-integer.c:33: warning: no previous declaration for
                                'sttype_register_integer'


svn path=/trunk/; revision=15011
2005-07-23 06:49:07 +00:00
Jörg Mayer fc4a2ddfe0 Move declaration of void ftype_register_* to ftypes-int.h.
This fixes some warnings like
ftype-bytes.c:52: warning: no previous declaration for 'bytes_fvalue_free'


svn path=/trunk/; revision=15010
2005-07-23 06:21:17 +00:00
Jörg Mayer 23486b484e Fix lots of warnings of type:
ftypes.c:257: warning: passing argument 1 of 'logfunc' discards
                        qualifiers from pointer target type
by changing 'char*' -> 'const char*'

svn path=/trunk/; revision=15009
2005-07-23 06:19:08 +00:00
Luis Ontanon 10f8560838 avoid a crash when tree is null
svn path=/trunk/; revision=15008
2005-07-23 02:07:02 +00:00
Ronnie Sahlberg ab0698d089 ICMP MPLS updates and a new preference option from
Brice Augustin and Maria-Luiza



svn path=/trunk/; revision=15007
2005-07-23 00:46:14 +00:00
Ronnie Sahlberg 6aaaedd633 we no longer need to g_free() teh string returned by dissect_rpc_string.
when checking the calls in packet-ndmp.c  we must have had a memleak there since it never freed those strings.



svn path=/trunk/; revision=15005
2005-07-23 00:22:02 +00:00
Ronnie Sahlberg c13d85f62d include stdlib instead of malloc.h
svn path=/trunk/; revision=15004
2005-07-22 23:38:51 +00:00
Ronnie Sahlberg 01206d0bd4 recode tvb_memdup() into more efficient emem fucntions.
Now that we dont have to  free() the memory explicitely we got rid of a few unnessecary g_strdup() as well.



svn path=/trunk/; revision=15003
2005-07-22 23:33:12 +00:00
Anders Broman d6babe2f76 No longer needed
svn path=/trunk/; revision=15002
2005-07-22 23:12:26 +00:00
Anders Broman 896131ebf1 From Martin Mathieson:
Collapsed the control and data protocols into dissector to cope with commands and data over the same TCP connection.  I've also prettified things a bit and now decoded a few more command parameters.

svn path=/trunk/; revision=15001
2005-07-22 23:11:11 +00:00
Ronnie Sahlberg fd34c9df89 recode the tvb_memdup() to use emem calls.
svn path=/trunk/; revision=15000
2005-07-22 23:04:52 +00:00
Ronnie Sahlberg badb5a40a3 remove a redundant tvb_memdup() and fix a potential buffer overflow at the same time.
svn path=/trunk/; revision=14999
2005-07-22 22:56:08 +00:00
Ronnie Sahlberg 336b300d03 replace one tvb_memdup() with a tvb_memcpy() using an automatically freed emem buffer
svn path=/trunk/; revision=14998
2005-07-22 22:45:36 +00:00
Jörg Mayer e1c6d9ac3d Fix some warnings (and one of my previous 'fixes')
svn path=/trunk/; revision=14997
2005-07-22 17:57:40 +00:00
Jörg Mayer 5731769818 Set svn:keywords and svn:eol-style
svn path=/trunk/; revision=14996
2005-07-22 17:55:47 +00:00
Gerald Combs 5800e255ef Fix a potential memory leak.
svn path=/trunk/; revision=14993
2005-07-22 15:51:20 +00:00
Anders Broman 418092ce05 From Graham Bloice
updates.

svn path=/trunk/; revision=14992
2005-07-22 15:20:57 +00:00
Anders Broman 2f08559cda From Maynard, Chris.
svn path=/trunk/; revision=14991
2005-07-22 13:37:19 +00:00
Anders Broman 120e20801e Use NULL intead of "" in all calls to packet-gsm_a.c
svn path=/trunk/; revision=14989
2005-07-22 08:56:41 +00:00
Anders Broman 3e7c25ba16 Add ep_init_chunk.
svn path=/trunk/; revision=14988
2005-07-22 08:55:06 +00:00
Ronnie Sahlberg 070351d090 convert all other nasty "rotating static array" from to_str.c and make them use the new emem api.
svn path=/trunk/; revision=14987
2005-07-22 08:27:20 +00:00
Jörg Mayer f67b00ad9a More 'char*' -> 'const char*' warning fixes
svn path=/trunk/; revision=14986
2005-07-22 07:55:51 +00:00
Jörg Mayer eb1ff24278 Beginning of radiotap's header dissection
svn path=/trunk/; revision=14985
2005-07-22 07:54:18 +00:00
Ronnie Sahlberg c841beb71b EMEM : a simple and FAST api to allocate memory that will be automatically freed() when the next packet is dissected.
This offesr memory allocation with a packet  scope making memory leaks less likely and memory management faster.


Add initialization calls for both tethereal and ethereal.

Convert the ip_to_str() function to use this and avoid doing the silly rotating buffers thing it previously did.


We also need an equivalent set of functions for allocation with capture file scope (free when next capture is loaded) but i dont know where to put the free_all call.



svn path=/trunk/; revision=14984
2005-07-22 07:46:58 +00:00
Ronnie Sahlberg 762fc4f4eb fix some bugs in a value string
this fixes bug 291



svn path=/trunk/; revision=14983
2005-07-22 02:07:43 +00:00
Ronnie Sahlberg 0138306bc7 fix for bug 290
v2 exchange code 37 is "INFORMATIONAL"



svn path=/trunk/; revision=14982
2005-07-22 02:00:04 +00:00
Gerald Combs c9bc1edd92 When trying to handle gzip-compressed data, don't seek past the end of our
compressed data buffer.  Fixes bug 288.

svn path=/trunk/; revision=14981
2005-07-21 21:40:57 +00:00
Ronnie Sahlberg 0ca30abe65 change the symbol dissect_ber_CHOICE back into dissect_ber_choice
svn path=/trunk/; revision=14980
2005-07-21 21:12:09 +00:00
Jörg Mayer 2280b847f9 More warining fixes: char -> const char
svn path=/trunk/; revision=14976
2005-07-21 17:23:29 +00:00
Jörg Mayer 553402acbf More warining fixes: char -> const char
svn path=/trunk/; revision=14975
2005-07-21 17:21:48 +00:00
Jörg Mayer fb0b83fedf One forgotten warning fix
svn path=/trunk/; revision=14974
2005-07-21 17:17:16 +00:00
Jörg Mayer 9bed71737c small warning fixes
svn path=/trunk/; revision=14973
2005-07-21 17:04:10 +00:00
Ulf Lamping 05f0ad566e "fix" bug #244: the implementation was correct but a bit hard to understand. I've added some small explanations, so it should be understandable somewhat better
svn path=/trunk/; revision=14972
2005-07-20 22:11:48 +00:00
Gerald Combs 0de3a392be In packet-gsm_a.c:
- Make sure every function that has an "add_string" argument, make sure
    it isn't NULL before we write to it.
    a null "add_string".
  - Use "_U_" instead of "add_string = add_string" to squelch compiler
    warnings.
  - Fix other compiler warnings.

In packet-uma.c, pass NULL instead of "" for the add_string argument to
de_mid().  Fixes bug 287.

svn path=/trunk/; revision=14971
2005-07-20 20:57:04 +00:00
Jörg Mayer 32b4bac3cc Convert the result of tvb_get_guint8 to (gint8) so that the display
as FT_INT32 shows a negative number if appropriate.

Is there a better way to solve this?
Does this problem occur in other places too?

svn path=/trunk/; revision=14970
2005-07-20 15:08:29 +00:00
Ronnie Sahlberg 10856f2f9a prettify the HW type and address printouts slightly.
svn path=/trunk/; revision=14969
2005-07-20 12:20:56 +00:00
Jörg Mayer 830d555224 Fix: packet-dis-enums.h:248: warning: comma at end of enumerator list
svn path=/trunk/; revision=14968
2005-07-20 12:05:14 +00:00
Ronnie Sahlberg 9de2aaec7c add proper decoding and presentation of domain strings in dhcpv6
this fixes bug 273


svn path=/trunk/; revision=14967
2005-07-20 11:44:57 +00:00
Jörg Mayer ca322883d6 Change proto_register_protocol to use 'const char*' instead of 'char*'
svn path=/trunk/; revision=14966
2005-07-20 11:01:35 +00:00
Ronnie Sahlberg 568266283e fix for bug 285
decode isakmp nat keepalive packets properly


svn path=/trunk/; revision=14964
2005-07-20 07:51:24 +00:00
Gerald Combs 570d352948 Move Win32-specific variable declaration to the beginning of a function.
Fixes a recent buildbot failure.

svn path=/trunk/; revision=14962
2005-07-19 22:24:28 +00:00
Ulf Lamping e8939e1f60 fix three doxygen warnings
svn path=/trunk/; revision=14959
2005-07-19 20:49:28 +00:00
Ronnie Sahlberg 3febc9f180 From Aboo
New protocol :    iFCP   protocol


svn path=/trunk/; revision=14957
2005-07-19 20:45:17 +00:00
Ulf Lamping 47d503303c from Graeme Hewson: "Fixes for ethereal config files"
svn path=/trunk/; revision=14956
2005-07-19 20:44:45 +00:00
Anders Broman 05e8481eed Fix an unpack_digits off by one error.
svn path=/trunk/; revision=14954
2005-07-19 19:48:02 +00:00
Ronnie Sahlberg 9f6a3801d9 minor fix to add required alignment for AueryPathInfo level 0x107
it decodes "better"   but might still be broken since none of the packets I have match any of the "standards"




svn path=/trunk/; revision=14952
2005-07-19 08:58:20 +00:00
Guy Harris 1dd2e0e8f4 DIS packets must be at least 12 bytes long. DIS uses port 3000, by
default, but the Cisco Redundant Link Management protocol can also use
that port; RLM packets are 8 bytes long, so we use this to distinguish
between them.

svn path=/trunk/; revision=14950
2005-07-18 09:55:54 +00:00
Gerald Combs 210deaf2cd Tweak the previous fix.
svn path=/trunk/; revision=14947
2005-07-17 22:30:56 +00:00
Gerald Combs 141f8341af Make the recent RADIUS changes work on IA64.
svn path=/trunk/; revision=14946
2005-07-17 22:16:59 +00:00
Jörg Mayer a795443a0f Add radius_dict.c to DISTCLEAN
svn path=/trunk/; revision=14945
2005-07-17 13:55:46 +00:00
Ulf Lamping 84424bb2da add radius_dict.c to the distclean target, don't know how to do this for Makefile.am
svn path=/trunk/; revision=14944
2005-07-17 13:39:24 +00:00
Guy Harris c0e24d4fff Fix the RCS ID.
svn path=/trunk/; revision=14942
2005-07-17 08:39:51 +00:00
Anders Broman c5a8a019e0 Update to the new per signatures.
svn path=/trunk/; revision=14941
2005-07-16 21:34:19 +00:00
Anders Broman c0de9d912b Remove some unused variables.
svn path=/trunk/; revision=14940
2005-07-16 19:59:21 +00:00
Anders Broman 53ff940b13 Remove an unused export
svn path=/trunk/; revision=14939
2005-07-16 19:58:23 +00:00
Guy Harris 3227fab080 List the new "packet-radius.h" file so it's included in the tarball.
svn path=/trunk/; revision=14938
2005-07-16 06:20:56 +00:00
Guy Harris 9859c05fbc Get rid of the newline between "radius:" and the error when trying to
read the RADIUS directory.

The error string from "radius_load_dictionary()" is g_malloced; free it,
and g_strdup the "Could not find the radius directory" error, so we
don't have to worry about constant vs. g_malloced strings.

svn path=/trunk/; revision=14937
2005-07-16 01:55:58 +00:00
Guy Harris 8e4007ef27 Throw in some casts to squelch warnings, at least with some compilers
(the values are const because nobody's supposed to modify them once
they've been allocated, but they *can* be freed - by us - when we're
done with them).

svn path=/trunk/; revision=14936
2005-07-16 01:33:22 +00:00