Commit Graph

17016 Commits

Author SHA1 Message Date
Guy Harris 54ac396346 Expand the set of #defines in afn.h (and give a URL for the *current*
list of address families) and the list of strings in afn.c, and use them
in packet-lldp.c instead of having it define its own.

svn path=/trunk/; revision=17114
2006-01-28 23:18:19 +00:00
Guy Harris 5186e33416 Fix missing closing */ in comment.
svn path=/trunk/; revision=17113
2006-01-28 22:49:53 +00:00
Guy Harris 360b71a3ce Fix missing brackets in if statement.
svn path=/trunk/; revision=17112
2006-01-28 22:34:22 +00:00
Luis Ontanon ef78577292 * lua_pinfo.c
* Address' gt, ge, eq, le and lt operators
   
* lua_proto.c
   * DissectorTable:remove and DissectorTable:add
      - can take either Proto or Dissector as third argument
   
* lua_tree.c
   * make sure we have a lua_etts array on which to add etts
   * ProtoItem:add_subtree() if no ett is given don't fail use the default one.
   



svn path=/trunk/; revision=17111
2006-01-28 21:09:59 +00:00
Luis Ontanon 31aa31f626 * packet-lua.h
* SubTreeType (ett) was renamed as SubTree 

* lua_tap.c
   - change the way the taps register (still to be finished so I won't comment)
   
* lua_tree.c
   * SubTree(ett) moved here, now it autoregisters all subtrees created at once. The user neither does need to create a SubTreeArray(eliminated) anymore nor to register it.

* lua_proto.c
   * SubTree moved out from here its "global" variables are used by lua_tree.c .
   * SubTreeArray was eliminated (now ett's "autoregister")
   * Created usertypes for
      - Pref a preference
      - Prefs all preferences of one protocol
      So far they are transparent to the user.
   * Proto has become a pseudo-table instead of a method based (registration in nicer)

* packet-lua.c
  * runtime errors go where they are meant to:
    - errors in dissector code go to the tree (a-la malformed)
    - errors in registration/handoff/init use reporte_failure()
  * no more Lua code to be compiled at runtime


svn path=/trunk/; revision=17110
2006-01-28 03:15:45 +00:00
Jörg Mayer 67a8623124 Add an <itemizedlist> ... </itemizedlist> to fix a buildbot build error.
svn path=/trunk/; revision=17109
2006-01-27 13:57:18 +00:00
Luis Ontanon 263caacb94 * we need not to register the interesting fields via a tap its registration should be transparent to the user.
- as of now I'm using a "boring" tap  (NULL packet_cb)  with a filter containing all the registered ones

* Lua code in init_lua() is not to be compiled anymore (I did)


svn path=/trunk/; revision=17108
2006-01-26 23:06:48 +00:00
Ronnie Sahlberg dab77d86f1 rewrite of the tcp sequence number analysis code to hopefully make it cleaner and easier to maintain and extend.
i have tested it with many captures   but this used to be fragile and delicate code  so there might be some regressions that will need to be addressed once identified.





svn path=/trunk/; revision=17107
2006-01-26 22:50:16 +00:00
Luis Ontanon 094840aa97 * lua_tree.c
* protect proto_item_add_* calls with a TRY CATCH to avoid the Lua state getting corrupted
   * new ProtoItem:add_expert_info() call

 * lua_proto.c
   * protect call_dissector() and dissector_try_*() calls with TRY CATCH to avoid the Lua state getting corrupted
   * ValueString makes no sense, get rid of it we'll use Lua's associative arrays instead

 * lua_tvb.c
   * while creating a tvb from a ByteArray copy the ByteArray's data and set the tvb's free_cb
   * check bounds before calling tvb_*() to avoid a longjmp breaking Lua
   * do not leak the string in Tvb_tostring()
   * new Tvb:get_ipv4() call
   * new Tvb:get_eth() call

 * packet-lua.[ch]
   * export lua_tvb and lua_malformed to other modules being the current tvb and the protocol_id of malformed
   * convert some Lua to C
   * do not register ValueString (eliminated)




svn path=/trunk/; revision=17106
2006-01-26 20:20:55 +00:00
Anders Broman 65530eb912 Add the abillity to translate MCC.
svn path=/trunk/; revision=17105
2006-01-26 06:54:52 +00:00
Luis Ontanon 9c10169b97 two bugs less
svn path=/trunk/; revision=17104
2006-01-25 22:49:58 +00:00
Luis Ontanon 3cbb83e490 One step at a time
several fixes and additions


svn path=/trunk/; revision=17103
2006-01-25 22:39:07 +00:00
Ulf Lamping 84794a9bc3 from Gisle Vanem:
This file uses SEH which AFAIK is only available for MS Visual-C.
I build using MingW/gcc, so the attached patch is needed. 

svn path=/trunk/; revision=17102
2006-01-25 21:34:04 +00:00
Ulf Lamping 7b16b24e72 Win32: add SEH to the new features. It might be noteworthy to the users that we probably won't crash for hardware exceptions caused by buggy dissectors
svn path=/trunk/; revision=17101
2006-01-25 21:32:55 +00:00
Luis Ontanon aeaf2c6cf6 Bind IuUP to RTP
svn path=/trunk/; revision=17100
2006-01-25 20:49:42 +00:00
Luis Ontanon e469d2af12 Use the right tree
svn path=/trunk/; revision=17099
2006-01-25 20:48:37 +00:00
Anders Broman 33b9a9c90d - Add new IE:s
- White space and comment changes.
- IE type fixes.
- Print timezone data.

svn path=/trunk/; revision=17098
2006-01-25 17:56:27 +00:00
Luis Ontanon 0b9c8e5263 Avoid crashing when given an object of the wrong usertype
format_time()
format_date()
report_failure()


svn path=/trunk/; revision=17097
2006-01-25 02:08:10 +00:00
Luis Ontanon a91b4fb0c5 an Address class, changed the names of some classes, modified pinfo to be a table
pinfo.src = Address.ip("www.xxx.com")
pinfo.col.info = "A special packet"
if (pinfo.src_port == 2) then pinfo.col.protocol = "STRANGE" end


svn path=/trunk/; revision=17096
2006-01-24 23:22:52 +00:00
Luis Ontanon 9639355926 it wasn't a goo idea,
sorry



svn path=/trunk/; revision=17095
2006-01-24 23:18:09 +00:00
Anders Broman 3aa3b4d8b3 Replace round() with floor(), I don't know if it's the right thing to do but at least it compiles on Windows again.
svn path=/trunk/; revision=17094
2006-01-24 20:20:33 +00:00
Ulf Lamping 3f3aae1681 minor code cleanup
svn path=/trunk/; revision=17093
2006-01-24 19:03:09 +00:00
Ulf Lamping 84c18745fe add missing capture_radiotap
svn path=/trunk/; revision=17092
2006-01-24 18:59:49 +00:00
Jaap Keuter 1fb3bc7c86 Derived some more assumptions from NLB traffic
svn path=/trunk/; revision=17091
2006-01-24 11:54:27 +00:00
Luis Ontanon 48f8113d58 fix a typo
svn path=/trunk/; revision=17090
2006-01-24 02:11:38 +00:00
Luis Ontanon 1ff8c4272f Add register_postdissector() to the API.
Dissectors registered with register_postdissector() will be called after all other dissectors have been called.

Use it to register mate.


svn path=/trunk/; revision=17089
2006-01-24 00:26:57 +00:00
Luis Ontanon da9e0c6831 I forgot the Licence!
set svn:keywords Id on source


svn path=/trunk/; revision=17088
2006-01-24 00:04:53 +00:00
Luis Ontanon b8e53a60b3 Use .la instead of .so as dependency in Makefiles
Fix svn:ignore


svn path=/trunk/; revision=17087
2006-01-23 23:55:13 +00:00
Luis Ontanon dbb4f8ff0a Add lua-5.0.2
Split packet-lua.c
Changes aren't tested.
It should compile ok.
Makefile.nmake still missing.


svn path=/trunk/; revision=17086
2006-01-23 23:31:05 +00:00
Guy Harris 878a077605 Add some more sanity checking of the Radiotap header.
svn path=/trunk/; revision=17085
2006-01-23 23:21:02 +00:00
Anders Broman d31de2bdb4 Bugfix: network address not dissected correctly
svn path=/trunk/; revision=17084
2006-01-23 22:13:08 +00:00
Guy Harris 41c941b49c Call capture_radiotap() when capturing on a device supplying Radiotap
headers.

Fix capture_radiotap() to check for padding between the 802.11 header
and the 802.11 payload and to call different capture routines depending
on whether it's present or not, and create capture_ieee80211_datapad()
to handle the case where it's present.

Fix capture_radiotap() to convert the Radiotap header length from
little-endian, and to do some sanity checking of that length.

Fix capture_ieee80211_common() to use the offset supplied to it to fetch
the frame control field, as that offset isn't necessarily 0.

svn path=/trunk/; revision=17083
2006-01-23 16:56:34 +00:00
Michael Tüxen d3a9893196 From Irene: Add support for showing TSN and time in the graphical analysis.
svn path=/trunk/; revision=17082
2006-01-23 11:56:49 +00:00
Guy Harris 2ab3f01671 Rename all the COOK_ macros to indicate the field from which they're
extracting data (except for the association ID field, where adding
ASSOC_ID would be redundant).

svn path=/trunk/; revision=17081
2006-01-23 10:17:07 +00:00
Guy Harris d269468356 From Sam Leffler:
1. Fix a bug in caclulating the 802.11 header length for QoS
	   data frames (way bad regression from previous code). 

	2. Add support for packets w/ data padding between the 802.11
	   header and the payload (as indicated in the radiotap flags).

	3. Add support for handling FCS indication in the radiotap
	   flags. 

	4. Fix display of TSF (previous code was not byte swapping).

	5. Update ieee80211_mhz2ieee in radiotap.c to handle more
	   channels. 

	6. Nuke some #if 0 code I left in radiotap.c a while back.

Also, clean up the various macros that extract stuff from 802.11 header
fields or define bitfields within those header fields:

	group them by the fields from which they extract and the values
	they extract, or the header fields to which they belong;

	get rid of some of the COOK_ in the names - COOK_ really doesn't
	indicate anything useful, such as the field from which they're
	extracting (we should get rid of the rest);

	put in some more comments explaining what they do;

	get rid of some unused macros;

	get rid of some values that aren't flag values - they're values
	to test whether something's a data frame with a particular byte
	set in the subtype field, but they're only used on data frames,
	so we only need to test the bit in question, so we define macros
	to test the bit and name them to indicate that they're for use
	on data frames.

Consistently use "CF-Ack" and "CF-Poll" in the strings for various data
frame type/subtype values, and get rid of "802.11" (it should be obvious
to one and all that this is 802.11...).

Comment out some variables used only in commented-out code.

Get rid of some unused variables.

Fix up one "proto_tree_add_text()" call where the format string didn't
match the arguments.

svn path=/trunk/; revision=17080
2006-01-23 09:20:06 +00:00
Jaap Keuter 287e228fc5 Implemention of T38 TCP defragmentation by Alejandro Vaquero
svn path=/trunk/; revision=17079
2006-01-23 07:12:26 +00:00
Anders Broman be6277f8c8 From Marc Petit-Huguenin:
This patch for the STUN dissector fixes a bug (wrong value for DATA_INDICATION attribute) and adds the decoding of IPv6 address in attributes.


svn path=/trunk/; revision=17078
2006-01-23 06:14:31 +00:00
Guy Harris f371ed6d3d Get rid of unused variables, fix indentation, don't assign NULL to
non-pointer variables.

svn path=/trunk/; revision=17077
2006-01-22 23:14:58 +00:00
Guy Harris 6967e5bef7 "size_t" can be "unsigned int" or "unsigned long", so cast it to
"unsigned long" and print it with %lu.

svn path=/trunk/; revision=17076
2006-01-22 23:08:15 +00:00
Anders Broman 1c5874e2e3 Dissect CellGlobalIdOrServiceAreaIdOrLAI and RAIdentity
svn path=/trunk/; revision=17075
2006-01-22 21:16:33 +00:00
Ulf Lamping 17afca625c simply use DISSECTOR_ASSERT() to detect tvb problems instead of my previous commit
svn path=/trunk/; revision=17074
2006-01-22 19:31:42 +00:00
Ulf Lamping 4843257596 add fragment_get_reassembled_id so the handed id doesn't need to be a packet number (experimental)
add a check to fragment_add_common() if the given tvb parameters are ok, otherwise throw a DissectorError

add some more symbols to libethereal.def

svn path=/trunk/; revision=17073
2006-01-22 16:47:16 +00:00
Ulf Lamping 6f2c4c84c1 Win32: call an existing debugger if a DissectorError is thrown. This preserves the call stack of the bug making debugging much easier.
This can't be done in every error throwing case, as e.g. throwing a ReportedBoundsError might happen a lot even if no bugs are involved. Anyway, extending this to other errors can be done manually while debugging.

svn path=/trunk/; revision=17072
2006-01-22 16:32:45 +00:00
Ulf Lamping 35dd233580 show the number of packets captured, if "Update list of packets ..." isn't used
svn path=/trunk/; revision=17071
2006-01-22 16:26:41 +00:00
Ulf Lamping c73ed3c6d5 add Win32 Structured Exception Handling (SEH) at the same place we're already doing the Portable Exception Handling.
This way we (hopefully) can continue dissecting with the next packet, even if a more serious exception had occured, e.g. a memory access violation or a divide by zero exception.

Obviously, not all problems solved, as SEH won't protect us from other problems, e.g. endless loops and such

svn path=/trunk/; revision=17070
2006-01-22 02:22:14 +00:00
Anders Broman fded8deafc RANAP - Dissect ProtocolExtensionField IE:s
GSM A - Service Request; Mobile identity element is LV type

svn path=/trunk/; revision=17069
2006-01-21 19:12:52 +00:00
Ulf Lamping 864edeb5ac add matched coloring rule name and string to the frame dissector output (or nothing if no coloring rule matched or none was set)
svn path=/trunk/; revision=17068
2006-01-21 17:49:00 +00:00
Luis Ontanon 5ccce794e6 Another iteration, new things aren't tested yet.
Update README, to have a description of the classes



svn path=/trunk/; revision=17067
2006-01-21 14:54:57 +00:00
Ulf Lamping 89a40818e2 bugfix #709: don't g_assert returned (mandatory) length of some NDIS driver functions.
simply ignore the length returned in that cases

this way, we may "print" buggy data, but that's what the driver returned ...

svn path=/trunk/; revision=17066
2006-01-21 14:36:04 +00:00
Jörg Mayer a052b3a98b packet-bgp.c: Fix incorrect use of g_snprintf return value
mp_addr_to_str was unnecessary 'complex' - simplified it
packet-dns.c: Fix incorrect use of g_snprintf return value
packet-dcm.c: Fix incorrect use of g_snprintf return value
        Someone who understands the protocol should look at the
        "vr, tr might be used uninitialized..." warning.
packet-x11.c: Fix incorrect use of g_snprintf return value
packet-kerberos.c: Fix incorrect use of g_snprintf return value
        Someone should take a look at the
        "longjump might clobber ..." messages
packet-diameter.c: Fix incorrect use of g_snprintf return value
        Get rid of unsigned < 0 check
packet-pgm.c: Fix incorrect use of g_snprintf return value
packet-nbns.c: Fix incorrect use of g_snprintf return value
packet-winsrepl.c: Collateral damage to packet-nbns.c fix
packet-netbios.c: Collateral damage to packet-nbns.c fix
packet-netbios.h: Collateral damage to packet-nbns.c fix
packet-kerberos.c: Collateral damage to packet-nbns.c fix
packet-nbipx.c: Collateral damage to packet-nbns.c fix


svn path=/trunk/; revision=17065
2006-01-20 21:18:18 +00:00