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
* 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
* 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
- 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
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
* 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
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
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
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
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
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
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
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
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
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
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
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