aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/mate/mate_util.c
AgeCommit message (Collapse)AuthorFilesLines
2012-06-28Update FSF address - part II.Jakub Zawadzki1-1/+1
svn path=/trunk/; revision=43538
2012-06-05Fix Coverity 702421: Handle the possibility that fvalue_to_string_repr()Jeff Morriss1-1/+6
may return NULL. svn path=/trunk/; revision=43114
2012-01-16Use GSlice API instead of GMemChunk API for some memory allocation.Bill Meier1-72/+38
svn path=/trunk/; revision=40547
2011-03-29Added FALLTHRU comment to avoid a "missing break" warning.Anders Broman1-0/+1
CID 489 svn path=/trunk/; revision=36400
2011-03-28Don't use prohibited strncpy(). Use g_strlcpy() instead. Ensures that "orig"Chris Maynard1-2/+2
will be NULL-terminated, even if len >= SCS_HUGE_SIZE. svn path=/trunk/; revision=36383
2011-03-27Removed uneeded 'continue'.Bill Meier1-1/+0
Fixes Coverity 815 ("UNREACHABLE"). svn path=/trunk/; revision=36367
2011-03-21Added some casts to fix coverity 325.Stig Bjørlykke1-2/+2
svn path=/trunk/; revision=36228
2010-01-28Fix some gcc -Wshadow warnings.Bill Meier1-16/+16
svn path=/trunk/; revision=31722
2009-04-16Fix Win64 compilation problems in the plugins directory.Gerald Combs1-2/+2
svn path=/trunk/; revision=28064
2009-03-18From Jakub Zawadzki: g_gnprintf & etc: Use size of buffer [not size -1];Bill Meier1-1/+1
- As suggested actually use sizeof(...) rather than a numeric constant. - g_snprintf() and g_vsnprintf() since glib 1.3.12 do not return -1. svn path=/trunk/; revision=27772
2008-12-22Fix some typos and spelling (mostly in text strings)Bill Meier1-1/+1
svn path=/trunk/; revision=27085
2008-10-31Fix some "format not a string literal and no format arguments" warnings.Stig Bjørlykke1-1/+1
svn path=/trunk/; revision=26652
2008-09-07Get one more pointer difference.Guy Harris1-2/+2
svn path=/trunk/; revision=26163
2008-09-06To compute the difference between two addresses, cast the pointersGuy Harris1-7/+17
holding those addresses to "void *" and then to "char *" (so we don't get warnings from casting directly to "char *" or errors from subtracting two "void *"s), and subtract them, rather than casting the pointers to an integral type possibly shorter than the pointers (to avoid warnings and to avoid the admittedly-infinitesimal chance that the two pointers don't differ in the bits that fit into the integral type). svn path=/trunk/; revision=26151
2008-08-05luis.ontanon@gmail.com => luis@ontanon.orgLuis Ontanon1-1/+1
svn path=/trunk/; revision=25937
2008-05-22Move the file utility functions from wiretap to libwsutil so thatJeff Morriss1-30/+30
libwireshark (and the plugins using those functions) do not depend on wiretap on Windows. While doing that, rename the eth_* functions to ws_*. svn path=/trunk/; revision=25354
2008-05-11g_string_sprintf --> g_string_printf and g_string_sprintfa --> ↵Bill Meier1-2/+2
g_string_append_printf svn path=/trunk/; revision=25276
2008-04-07- Remove GLIB1 codeStephen Fisher1-1/+0
- Change ugly GLIB version checking statements to GLIB_CHECK_VERSION - Remove ws_strsplit files because we no longer need to borrow GLIB2's g_strsplit code for the no longer supported GLIB1 builds svn path=/trunk/; revision=24829
2007-04-03Fix warnings on Linux/gcc 4.1.1Stephen Fisher1-2/+2
svn path=/trunk/; revision=21330
2007-03-30revert back (void*) -> (void**) which will stop free-warning compilation withSebastien Tandel1-2/+2
gcc-4.1.2 svn path=/trunk/; revision=21282
2007-03-29strict aliasing warnings fix : replace (void**) by (void*)Sebastien Tandel1-2/+2
svn path=/trunk/; revision=21274
2007-03-26Fix a bunch more warnings. Add -Werror when using --with-warnings-as-errorsStephen Fisher1-39/+0
under gcc to tools/lemon, plugins/mate and epan/ svn path=/trunk/; revision=21204
2007-02-13From Sebastien Tandel:Stephen Fisher1-0/+1
Create two new files (ws_strsplit.[ch]) that use GTK2 code to override the buggy g_strsplit() function when compiling for GTK1. Include this work-around function (ws_strsplit) in libwireshark.def. Add notes on usage to README.developer. Include epan/ws_strsplit.h in all files that use g_strsplit(). svn path=/trunk/; revision=20804
2006-05-21name changeRonnie Sahlberg1-2/+2
svn path=/trunk/; revision=18197
2005-11-07Use <wiretap/file_util.h> to include "file_util.h"; otherwise, theGuy Harris1-1/+1
include fails as we don't do -Iwiretap. If we have it, include <sys/stat.h> in epan/filesystem.c - we need it for stat() and the macros and structures it uses. svn path=/trunk/; revision=16410
2005-11-06replace *a lot* of file related calls by their GLib counterparts. This is ↵Ulf Lamping1-1/+2
necessary for the switch to GTK 2.6 (at least on WIN32). to do this, I've added file_util.h to wiretap (would file_compat.h be a better name?), and provide compat_macros like eth_open() instead of open(). While at it, move other file related things there, like #include <io.h>, definition of O_BINARY and alike, so it's all in one place. deleted related things from config.h.win32 As of these massive changes, I'm almost certain that this will break the Unix build. I'll keep an eye on the buildbot so hopefully everything is working again soon. svn path=/trunk/; revision=16403
2005-10-31When printing the code for a display filter:Guy Harris1-27/+1
print register numbers as unsigned (they're guint32); when printing a PUT_FVALUE instruction, show the value as well as the type of the value. That requires that a bunch of types get to_repr methods; add them for PCRE (FTREPR_DFILTER-only - show the regular expression as text), tvbuffs (FTREPR_DFILTER_only - show the data as a hex string), integral types, string types other than FT_STRING, and FT_IPv6. That means we can use fvalue_to_string_repr() for FT_IPXNET and FT_IPv6 in proto_construct_dfilter_string(), and that we don't need to handle integer and floating types specially in MATE. Fix some problems with the PCRE execution code for tvbuff types. svn path=/trunk/; revision=16369
2005-08-20- Include the .h files in their .c files.Jörg Mayer1-0/+1
- Remove epan/dissectors/packet-sna.h, it isn't used anywhere. svn path=/trunk/; revision=15475
2005-08-02Last set of trivial fixes for "no previous declaration" warnings.Jörg Mayer1-6/+6
svn path=/trunk/; revision=15191
2005-07-23More 'char*' -> 'const char*' changes to fix warnings.Jörg Mayer1-11/+11
svn path=/trunk/; revision=15015
2005-05-16Transforms and Pdus are working already, Gops start to work.Luis Ontanon1-2/+2
svn path=/trunk/; revision=14376
2005-05-16MATE has a grammar.Luis Ontanon1-50/+62
Although not yet fully implemented I want this version as a reference. svn path=/trunk/; revision=14373
2005-02-24- fix a crash in new_avpl_strict_match when the operator avpl was emptyLuis Ontanon1-0/+3
- change the name of the preference mate.config_filename: into mate.config: svn path=/trunk/; revision=13488
2005-02-20fix a typo: lenght -> lengthUlf Lamping1-2/+2
This seems to be a "more common" typo, fixed it 13 times throughout the code ... svn path=/trunk/; revision=13452
2005-02-07From LEGO:Anders Broman1-1/+1
- fixes a leak in analize_pdu() - fixes a typo in analize_pdu() - fixes a crash in scs_unsubscribe() - save a malloc and a free in get_pdu_fields() svn path=/trunk/; revision=13335
2005-02-06From: LEGOAnders Broman1-1/+1
- fix a bug at gog reinit that disabled gogs after reload of a file. - fix some crashes when Debug_GoG>0 - cleanup the debug output (no CR at the end is needed) - Gops start when no GopStart is given and match an existing GogKey svn path=/trunk/; revision=13318
2005-01-21From Luis Ontanon for Mate:Lars Roland1-2/+2
- supress some solaris compiler warnings - adds GopExpiration, GopIdleTimeout and GopLifetime parameters svn path=/trunk/; revision=13154
2005-01-15Set fp to NULL before "load_loal_error()" is called, so we don't pass anGuy Harris1-1/+1
uninitalized variable to it. svn path=/trunk/; revision=13054
2005-01-10One more patch for mate:Lars Roland1-129/+6
- renamed analyze_frame() into mate_analyze_frame(). - prepare mate to be statically linked - use report_open_failure() , report_read_failure() and report_failure() in case there's an error while loading the config - some cleanup in mate_util.c - some fixes and cleanup in examples and matelib svn path=/trunk/; revision=13001
2005-01-07From Luis Ontanon:Lars Roland1-26/+25
A new patch for mate - changed the default config file name to "" - avoid trying to confgure mate when the config filename is "" - add filename and line to config errors, that way one can actually find errors in config files - teady up the config error strings ( made them uniform ) - fixed a crash when missing index AVPs (Name,For,On etc) in config AVPLS - make sure we do not delete the config AVPs and AVPLs to avoid references to unsubscribed strings been left arround - fixed the len on LoALs - changed the way loal_from_file reports an error. - matelib/sip.mate was missing the Name in a PduDef (from Julien Leproust) - matelib/h225_ras had a wrong field name (from Julien Leproust) At this point mate is silent when it's not expressely configured by the user. From me: reduce compiler noise on MSVC svn path=/trunk/; revision=12985
2005-01-06From Luis Ontanon:Lars Roland1-1/+1
Fix some MSVC warnings in MATE svn path=/trunk/; revision=12969
2004-12-31From Luis Ontanon for Mate:Lars Roland1-37/+50
- moved gop and gog indexes into gopcfgs, which is a propedeutic change for upcoming changes in the way gops are to be grouped - changed the way gog-keys are kept in memory - every gopkey attribute is copied into the gop->extras to avoid redundancy in the configuration - added timers to gogs mate.gog_type.StartTime and mate.gog_type.Time - fixed a bug in scs_subscribe that mangled some strings - minor interface improvement to scs propedeutic to having types avp values in a future - changed medium and large into mate_medium and mate_large in the scs_collection - fixed Mode=Replace in Transforms, now it works - fixed a crash at reinit due to impropper initialization of mate_items svn path=/trunk/; revision=12902
2004-12-23Fixes for Mate from Luis Ontanon:Lars Roland1-42/+105
- fixes crash at reinit when DiscardPduData=TRUE: check if there's an avpl before deleting it. - mate.pdu_type.RelativeTime had a dual use, add mate.pdu_type.TimeInGop and leave the other alone. - other fixes related to times (they now seem to be right) - scs_subscribe doesn't use g_malloc anymore. it uses GMemChunks (I had to rename two GMemChunks to make MSVC happy) - fixes crash at reinit when DiscardPduData=TRUE: check if there's an avpl before deleting it. - mate.pdu_type.RelativeTime had a dual use, add mate.pdu_type.TimeInGop and leave the other alone. - other fixes related to times (they now seem to be right) - fixed few things at reinit: - reset last_id - remove the nodes in the items hash tables svn path=/trunk/; revision=12820
2004-12-12Update for Mate from Luis Ontanon:Lars Roland1-14/+23
- make rd static (no purpose for it to be global) - remove outdated comments - add "PduCriteria" feature (as already stated in the wiki) - add "DiscardUnassignedPdu" feature (as already stated in the wiki) - removed ".Id" from abbrev for "mate.item_name" - in radius.mate: Don't use the port to determine the Gop key. svn path=/trunk/; revision=12735
2004-12-12Fixes for Mate Plugin:Lars Roland1-2/+2
As suggested by Martin Regner: - Use strtod() instead of strtof() From Luis Ontanon: - changes the id of mate items to be integer (the old string ID imposed a lenght limit and as mate fileds had become dynamic it makes no more sense anymore) - fixes a huge avp leak on reinit (every avp object was leaked when a new file was loaded) - adds the "Lib" AVP to the Action=Include AVPL to include definitions >from matelib - rename mate.[dll/so] to zzmate.[dll/so] so it gets initialized as the very last protocol (so that fields from every dissector can be used). svn path=/trunk/; revision=12728
2004-12-11New Plugin from Luis Ontanon:Lars Roland1-0/+1861
MATE -- Meta Analysis and Tracing Engine Won't be compiled by default. It is still not possible to link the plugin on Win32. svn path=/trunk/; revision=12716