#include <airpcap.h>
#include "airpcap_loader.h"
+#ifdef NEED_G_ASCII_STRCASECMP_H
+#include "g_ascii_strcasecmp.h"
+#endif
+
/*
* We load dynamically the dag library in order link it only when
* it's present on the system
/* Retrieve user data info */
user_data = (keys_cb_data_t*)ud;
- if (g_strncasecmp(pref->name, "wep_key", 7) == 0 && pref->type == PREF_STRING)
+ if (g_ascii_strncasecmp(pref->name, "wep_key", 7) == 0 && pref->type == PREF_STRING)
{
my_string = g_strdup(*pref->varp.string);
/* Retrieve user data info */
user_data = (keys_cb_data_t*)ud;
- if (g_strncasecmp(pref->name, "wep_key", 7) == 0 && pref->type == PREF_STRING)
+ if (g_ascii_strncasecmp(pref->name, "wep_key", 7) == 0 && pref->type == PREF_STRING)
{
/* Ok, the pref we're gonna set is a wep_key ... but what number? */
sscanf(pref->name,"wep_key%d",&wep_key_number);
*/
if(a == 0)
{
- if(g_strcasecmp(if_info->name,AIRPCAP_DEVICE_ANY_EXTRACT_STRING)!=0)
+ if(g_ascii_strcasecmp(if_info->name,AIRPCAP_DEVICE_ANY_EXTRACT_STRING)!=0)
number = g_strdup_printf("??");
else
number = g_strdup_printf(AIRPCAP_CHANNEL_ANY_NAME);
is_on = (gboolean*)ud;
- if (g_strncasecmp(pref->name, "enable_decryption", 17) == 0 && pref->type == PREF_BOOL)
+ if (g_ascii_strncasecmp(pref->name, "enable_decryption", 17) == 0 && pref->type == PREF_BOOL)
{
number = *pref->varp.boolp;
/* Retrieve user data info */
is_on = (gboolean*)ud;
- if (g_strncasecmp(pref->name, "enable_decryption", 17) == 0 && pref->type == PREF_BOOL)
+ if (g_ascii_strncasecmp(pref->name, "enable_decryption", 17) == 0 && pref->type == PREF_BOOL)
{
number = *pref->varp.boolp;
/* XXX - yes, I know, I should move cppmagic.h to a generic location. */
#include "tools/lemon/cppmagic.h"
+#ifdef NEED_G_ASCII_STRCASECMP_H
+#include "g_ascii_strcasecmp.h"
+#endif
+
#define MAX_WIN_IF_NAME_LEN 511
* We don't have it in WinPcap; do it ourselves.
*/
for (i = 0; dlt_choices[i].name != NULL; i++) {
- if (strcasecmp(dlt_choices[i].name + sizeof("DLT_") - 1,
+ if (g_ascii_strcasecmp(dlt_choices[i].name + sizeof("DLT_") - 1,
name) == 0)
return dlt_choices[i].dlt;
}
#include "capture_loop.h"
+#ifdef NEED_G_ASCII_STRCASECMP_H
+#include "g_ascii_strcasecmp.h"
+#endif
+
/* E: capture_loop.c only (Wireshark/dumpcap) T: tshark only */
typedef struct _loop_data {
/* common */
pncopy = g_strdup(pipename);
if ( (pos=strstr(pncopy, "\\\\")) == pncopy) {
pos = strchr(pncopy + 3, '\\');
- if (pos && g_strncasecmp(pos, PIPE_STR, strlen(PIPE_STR)) != 0)
+ if (pos && g_ascii_strncasecmp(pos, PIPE_STR, strlen(PIPE_STR)) != 0)
pos = NULL;
}
AC_SUBST(MKSTEMP_C)
AC_SUBST(MKSTEMP_O)
+ac_save_LIBS="$LIBS"
+LIBS="$GLIB_LIBS $LIBS"
+G_ASCII_STRCASECMP_C=""
+G_ASCII_STRCASECMP_O=""
+G_ASCII_STRCASECMP_LO=""
+AC_CHECK_FUNC(g_ascii_strcasecmp,
+ [G_ASCII_STRCASECMP_O=""
+ G_ASCII_STRCASECMP_LO=""],
+ [G_ASCII_STRCASECMP_O="g_ascii_strcasecmp.o"
+ G_ASCII_STRCASECMP_LO="g_ascii_strcasecmp.lo"
+ AC_DEFINE(NEED_G_ASCII_STRCASECMP_H, 1, [Define if g_ascii_strcasecmp.h needs to be included])
+])
+LIBS="$ac_save_LIBS"
+if test "$ac_cv_func_g_ascii_strcasecmp" = no ; then
+ G_ASCII_STRCASECMP_C="g_ascii_strcasecmp.c"
+ G_ASCII_STRCASECMP_O="g_ascii_strcasecmp.o"
+ G_ASCII_STRCASECMP_LO="g_ascii_strcasecmp.lo"
+fi
+AC_SUBST(G_ASCII_STRCASECMP_C)
+AC_SUBST(G_ASCII_STRCASECMP_O)
+AC_SUBST(G_ASCII_STRCASECMP_LO)
+
ac_save_LIBS="$LIBS"
LIBS="$GLIB_LIBS $LIBS"
G_ASCII_STRTOULL_C=""
$(LIBWIRESHARK_GENERATED_INCLUDES)
EXTRA_libwireshark_la_SOURCES = \
+ g_ascii_strcasecmp.c \
+ g_ascii_strcasecmp.h \
g_ascii_strtoull.c \
g_ascii_strtoull.h \
inet_aton.c \
#
# Add the object files for missing routines, if any.
#
-libwireshark_la_LIBADD = @G_ASCII_STRTOULL_LO@ @INET_ATON_LO@ @INET_PTON_LO@ @INET_NTOP_LO@ libwireshark_generated.la crypt/libairpdcap.la ftypes/libftypes.la dfilter/libdfilter.la dissectors/libcleandissectors.la dissectors/libdissectors.la dissectors/libasndissectors.la dissectors/libpidldissectors.la $(wslua_lib) @ADNS_LIBS@ @LIBGNUTLS_LIBS@ @LIBICONV@ @KRB5_LIBS@ @SSL_LIBS@ -lm
-libwireshark_la_DEPENDENCIES = @G_ASCII_STRTOULL_LO@ @INET_ATON_LO@ @INET_PTON_LO@ @INET_NTOP_LO@ libwireshark_generated.la crypt/libairpdcap.la ftypes/libftypes.la dfilter/libdfilter.la dissectors/libcleandissectors.la dissectors/libdissectors.la dissectors/libasndissectors.la dissectors/libpidldissectors.la $(wslua_lib)
+libwireshark_la_LIBADD = @G_ASCII_STRCASECMP_LO@ @G_ASCII_STRTOULL_LO@ @INET_ATON_LO@ @INET_PTON_LO@ @INET_NTOP_LO@ libwireshark_generated.la crypt/libairpdcap.la ftypes/libftypes.la dfilter/libdfilter.la dissectors/libcleandissectors.la dissectors/libdissectors.la dissectors/libasndissectors.la dissectors/libpidldissectors.la $(wslua_lib) @ADNS_LIBS@ @LIBGNUTLS_LIBS@ @LIBICONV@ @KRB5_LIBS@ @SSL_LIBS@ -lm
+libwireshark_la_DEPENDENCIES = @G_ASCII_STRCASECMP_LO@ @G_ASCII_STRTOULL_LO@ @INET_ATON_LO@ @INET_PTON_LO@ @INET_NTOP_LO@ libwireshark_generated.la crypt/libairpdcap.la ftypes/libftypes.la dfilter/libdfilter.la dissectors/libcleandissectors.la dissectors/libdissectors.la dissectors/libasndissectors.la dissectors/libpidldissectors.la $(wslua_lib)
#EXTRA_PROGRAMS = reassemble_test
#reassemble_test_LDADD = $(GLIB_LIBS)
#include "wep-wpadefs.h"
+#ifdef NEED_G_ASCII_STRCASECMP_H
+#include "g_ascii_strcasecmp.h"
+#endif
+
/****************************************************************************/
/****************************************************************************/
/* First, check for a WEP string */
/* XXX - This duplicates code in packet-ieee80211.c */
- if (g_strncasecmp(input_string, STRING_KEY_TYPE_WEP ":", 4) == 0) {
+ if (g_ascii_strncasecmp(input_string, STRING_KEY_TYPE_WEP ":", 4) == 0) {
first_nibble += 4;
}
ssid = g_strdup(tokens[2]);
}
- if (g_strcasecmp(type,STRING_KEY_TYPE_WPA_PSK) == 0) /* WPA key */
+ if (g_ascii_strcasecmp(type,STRING_KEY_TYPE_WPA_PSK) == 0) /* WPA key */
{
/* Create a new string */
key_string = g_string_new(key);
g_strfreev(tokens);
return dk;
}
- else if(g_strcasecmp(type,STRING_KEY_TYPE_WPA_PWD) == 0) /* WPA key *//* If the number of tokens is more than three, we accept the string... if the first three tokens are correct... */
+ else if(g_ascii_strcasecmp(type,STRING_KEY_TYPE_WPA_PWD) == 0) /* WPA key *//* If the number of tokens is more than three, we accept the string... if the first three tokens are correct... */
{
/* Create a new string */
key_string = g_string_new(key);
#include <epan/exceptions.h>
#include <epan/packet.h>
+#ifdef NEED_G_ASCII_STRCASECMP_H
+#include "g_ascii_strcasecmp.h"
+#endif
+
/* Enable debug logging by defining AM_CFLAGS
* so that it contains "-DDEBUG_dfilter".
* Usage: DebugLog(("Error: string=%s\n", str)); */
tf = hfinfo->strings;
}
- if (strcasecmp(s, tf->true_string) == 0) {
+ if (g_ascii_strcasecmp(s, tf->true_string) == 0) {
return mk_uint32_fvalue(TRUE);
}
- else if (strcasecmp(s, tf->false_string) == 0) {
+ else if (g_ascii_strcasecmp(s, tf->false_string) == 0) {
return mk_uint32_fvalue(FALSE);
}
else {
vals = hfinfo->strings;
while (vals->strptr != NULL) {
- if (strcasecmp(s, vals->strptr) == 0) {
+ if (g_ascii_strcasecmp(s, vals->strptr) == 0) {
return mk_uint32_fvalue(vals->value);
}
vals++;
#include <epan/packet.h>
#include <epan/emem.h>
+#ifdef NEED_G_ASCII_STRCASECMP_H
+#include "g_ascii_strcasecmp.h"
+#endif
+
/* protocol handles */
static int proto_njack = -1;
{
/* We need at least 'NJ200' + 1 Byte packet type */
if ( tvb_length(tvb) < 6 ||
- g_strncasecmp((const char *)tvb_get_ptr(tvb, 0, 5), "NJ200", 5) ) {
+ g_ascii_strncasecmp((const char *)tvb_get_ptr(tvb, 0, 5), "NJ200", 5) ) {
return FALSE;
}
return TRUE;
#include "packet-afp.h"
+#ifdef NEED_G_ASCII_STRCASECMP_H
+#include "g_ascii_strcasecmp.h"
+#endif
+
/* The information in this module (AFP) comes from:
AFP 2.1 & 2.2.pdf contained in AppleShare_IP_6.3_SDK
{
int len;
- if (!strncasecmp(uam, "Cleartxt passwrd", len_uam)) {
+ if (!g_ascii_strncasecmp(uam, "Cleartxt passwrd", len_uam)) {
if ((offset & 1))
PAD(1);
proto_tree_add_item(tree, hf_afp_passwd, tvb, offset, len,FALSE);
offset += len;
}
- else if (!strncasecmp(uam, "DHCAST128", len_uam)) {
+ else if (!g_ascii_strncasecmp(uam, "DHCAST128", len_uam)) {
if ((offset & 1))
PAD(1);
proto_tree_add_item(tree, hf_afp_random, tvb, offset, len,FALSE);
offset += len;
}
- else if (!strncasecmp(uam, "2-Way Randnum exchange", len_uam)) {
+ else if (!g_ascii_strncasecmp(uam, "2-Way Randnum exchange", len_uam)) {
/* nothing */
return offset;
}
proto_tree_add_item(tree, hf_afp_UAM, tvb, offset, 1,FALSE);
offset += len_uam +1;
- if (!strncasecmp(uam, "No User Authent", len_uam)) {
+ if (!g_ascii_strncasecmp(uam, "No User Authent", len_uam)) {
return offset;
}
#include <epan/prefs.h>
#include <epan/emem.h>
+#ifdef NEED_G_ASCII_STRCASECMP_H
+#include "g_ascii_strcasecmp.h"
+#endif
+
/* Forward declaration */
void proto_reg_handoff_cigi(void);
static gboolean packet_is_cigi(tvbuff_t*);
/* Format the Info String */
src_str = ip_to_str(pinfo->src.data);
- if ( !g_strcasecmp(global_host_ip, src_str) ) {
+ if ( !g_ascii_strcasecmp(global_host_ip, src_str) ) {
src_str = "Host";
- } else if ( !g_strcasecmp(global_ig_ip, src_str) ) {
+ } else if ( !g_ascii_strcasecmp(global_ig_ip, src_str) ) {
src_str = "IG";
}
dest_str = ip_to_str(pinfo->dst.data);
- if ( !g_strcasecmp(global_host_ip, dest_str) ) {
+ if ( !g_ascii_strcasecmp(global_host_ip, dest_str) ) {
dest_str = "Host";
- } else if ( !g_strcasecmp(global_ig_ip, dest_str) ) {
+ } else if ( !g_ascii_strcasecmp(global_ig_ip, dest_str) ) {
dest_str = "IG";
}
+/*
+ * This is like g_str_hash() (as of GLib 2.4.8), but it maps all
+ * upper-case ASCII characters to their ASCII lower-case equivalents.
+ * We can't use g_strdown(), as that doesn't do an ASCII mapping;
+ * in Turkish locales, for example, there are two lower-case "i"s
+ * and two upper-case "I"s, with and without dots - the ones with
+ * dots map between each other, as do the ones without dots, so "I"
+ * doesn't map to "i".
+ */
static guint strcase_hash(gconstpointer key) {
- char* k = ep_strdup(key);
- g_strdown(k);
- return g_str_hash(k);
+ const char *p = key;
+ guint h = *p;
+ char c;
+
+ if (h) {
+ if (h >= 'A' && h <= 'Z')
+ h = h - 'A' + 'a';
+ for (p += 1; *p != '\0'; p++) {
+ c = *p;
+ if (c >= 'A' && c <= 'Z')
+ c = c - 'A' + 'a';
+ h = (h << 5) - h + c;
+ }
+ }
+
+ return h;
}
+/*
+ * Again, use g_ascii_strcasecmp(), not strcasecmp(), so that only ASCII
+ * letters are mapped, and they're mapped to the lower-case ASCII
+ * equivalents.
+ */
static gboolean strcase_equal(gconstpointer ka, gconstpointer kb) {
- char* a = ep_strdup(ka);
- char* b = ep_strdup(kb);
- g_strdown(a);
- g_strdown(b);
- return g_str_equal(a,b);
+ const char* a = ka;
+ const char* b = kb;
+ return g_ascii_strcasecmp(a,b) == 0;
}
extern int dictionary_load(void);
#include "packet-edonkey.h"
#include "packet-tcp.h"
+#ifdef NEED_G_ASCII_STRCASECMP_H
+#include "g_ascii_strcasecmp.h"
+#endif
+
static int proto_edonkey = -1;
static int hf_edonkey_message = -1;
if (str == NULL) return -1;
while (vs[i].strptr) {
- if (strncasecmp(str, vs[i].strptr, length) == 0)
+ if (g_ascii_strncasecmp(str, vs[i].strptr, length) == 0)
return i;
i++;
}
#include "packet-tcp.h"
#include <wiretap/file_util.h>
+#ifdef NEED_G_ASCII_STRCASECMP_H
+#include "g_ascii_strcasecmp.h"
+#endif
+
/*
* Set to 1 for DEBUG output - TODO make this a runtime option
*/
/* Must start with IDL: , otherwise I get confused */
- if (g_strncasecmp("IDL:",repoid,4))
+ if (g_ascii_strncasecmp("IDL:",repoid,4))
return NULL;
/* Looks like a RepoID to me, so get Module or interface name */
#include <epan/tap.h>
+#ifdef NEED_G_ASCII_STRCASECMP_H
+#include "g_ascii_strcasecmp.h"
+#endif
+
static int http_tap = -1;
static int http_eo_tap = -1;
* Handle *transfer* encodings other than "identity".
*/
if (headers.transfer_encoding != NULL &&
- strcasecmp(headers.transfer_encoding, "identity") != 0) {
+ g_ascii_strcasecmp(headers.transfer_encoding, "identity") != 0) {
if (http_dechunk_body &&
- (strncasecmp(headers.transfer_encoding, "chunked", 7)
+ (g_ascii_strncasecmp(headers.transfer_encoding, "chunked", 7)
== 0)) {
chunks_decoded = chunked_encoding_dissector(
* we handle it in any case).
*/
if (headers.content_encoding != NULL &&
- strcasecmp(headers.content_encoding, "identity") != 0) {
+ g_ascii_strcasecmp(headers.content_encoding, "identity") != 0) {
/*
* We currently can't handle, for example, "compress";
* just handle them as data for now.
proto_tree *e_tree = NULL;
if (http_decompress_body &&
- (strcasecmp(headers.content_encoding, "gzip") == 0 ||
- strcasecmp(headers.content_encoding, "deflate")
+ (g_ascii_strcasecmp(headers.content_encoding, "gzip") == 0 ||
+ g_ascii_strcasecmp(headers.content_encoding, "deflate")
== 0)) {
uncomp_tvb = tvb_uncompress(next_tvb, 0,
#define MAX_ENCRYPTION_KEYS 64
#endif
+#ifdef NEED_G_ASCII_STRCASECMP_H
+#include "g_ascii_strcasecmp.h"
+#endif
+
#ifndef roundup2
#define roundup2(x, y) (((x)+((y)-1))&(~((y)-1))) /* if y is powers of two */
#endif
wep_str_to_bytes(const char *hex_str, GByteArray *bytes) {
char *first_nibble = (char *) hex_str;
- if (g_strncasecmp(hex_str, STRING_KEY_TYPE_WEP ":", 4) == 0) {
+ if (g_ascii_strncasecmp(hex_str, STRING_KEY_TYPE_WEP ":", 4) == 0) {
first_nibble += 4;
}
#include <gcrypt.h>
#endif /* HAVE_LIBGCRYPT */
+#ifdef NEED_G_ASCII_STRCASECMP_H
+#include "g_ascii_strcasecmp.h"
+#endif
+
static int proto_ah = -1;
static int hf_ah_spi = -1;
static int hf_ah_iv = -1;
(sa[index_start + IPSEC_TYP_LEN] != IPSEC_SA_SEPARATOR))
return FALSE;
- if(g_strncasecmp(&sa[index_start], "IPV6", IPSEC_TYP_LEN) == 0)
+ if(g_ascii_strncasecmp(&sa[index_start], "IPV6", IPSEC_TYP_LEN) == 0)
{
*pt_protocol_typ = IPSEC_SA_IPV6;
done_flag = TRUE;
}
- else if (g_strncasecmp(&sa[index_start], "IPV4", IPSEC_TYP_LEN) == 0)
+ else if (g_ascii_strncasecmp(&sa[index_start], "IPV4", IPSEC_TYP_LEN) == 0)
{
*pt_protocol_typ = IPSEC_SA_IPV4;
done_flag = TRUE;
#include <epan/gcp.h>
#include <epan/tap.h>
+#ifdef NEED_G_ASCII_STRCASECMP_H
+#include "g_ascii_strcasecmp.h"
+#endif
+
#define PORT_MEGACO_TXT 2944
#define PORT_MEGACO_BIN 2945
- if (strncasecmp(word, "MEGACO", 6) != 0 && tvb_get_guint8(tvb, tvb_offset ) != '!'){
+ if (g_ascii_strncasecmp(word, "MEGACO", 6) != 0 && tvb_get_guint8(tvb, tvb_offset ) != '!'){
gint8 class;
gboolean pc;
gint32 tag;
#include <epan/tap.h>
#include "packet-mgcp.h"
+#ifdef NEED_G_ASCII_STRCASECMP_H
+#include "g_ascii_strcasecmp.h"
+#endif
+
#define TCP_PORT_MGCP_GATEWAY 2427
#define UDP_PORT_MGCP_GATEWAY 2427
#define TCP_PORT_MGCP_CALLAGENT 2727
/* Read the string into 'word' and see if it looks like the start of a verb */
if ((maxlength >= 4) && tvb_get_nstringz0(tvb, offset, sizeof(word), word))
{
- if (((strncasecmp(word, "EPCF", 4) == 0) && (*verb_name = "EndpointConfiguration")) ||
- ((strncasecmp(word, "CRCX", 4) == 0) && (*verb_name = "CreateConnection")) ||
- ((strncasecmp(word, "MDCX", 4) == 0) && (*verb_name = "ModifyConnection")) ||
- ((strncasecmp(word, "DLCX", 4) == 0) && (*verb_name = "DeleteConnection")) ||
- ((strncasecmp(word, "RQNT", 4) == 0) && (*verb_name = "NotificationRequest")) ||
- ((strncasecmp(word, "NTFY", 4) == 0) && (*verb_name = "Notify")) ||
- ((strncasecmp(word, "AUEP", 4) == 0) && (*verb_name = "AuditEndpoint")) ||
- ((strncasecmp(word, "AUCX", 4) == 0) && (*verb_name = "AuditConnection")) ||
- ((strncasecmp(word, "RSIP", 4) == 0) && (*verb_name = "RestartInProgress")) ||
- ((strncasecmp(word, "MESG", 4) == 0) && (*verb_name = "Message")) ||
+ if (((g_ascii_strncasecmp(word, "EPCF", 4) == 0) && (*verb_name = "EndpointConfiguration")) ||
+ ((g_ascii_strncasecmp(word, "CRCX", 4) == 0) && (*verb_name = "CreateConnection")) ||
+ ((g_ascii_strncasecmp(word, "MDCX", 4) == 0) && (*verb_name = "ModifyConnection")) ||
+ ((g_ascii_strncasecmp(word, "DLCX", 4) == 0) && (*verb_name = "DeleteConnection")) ||
+ ((g_ascii_strncasecmp(word, "RQNT", 4) == 0) && (*verb_name = "NotificationRequest")) ||
+ ((g_ascii_strncasecmp(word, "NTFY", 4) == 0) && (*verb_name = "Notify")) ||
+ ((g_ascii_strncasecmp(word, "AUEP", 4) == 0) && (*verb_name = "AuditEndpoint")) ||
+ ((g_ascii_strncasecmp(word, "AUCX", 4) == 0) && (*verb_name = "AuditConnection")) ||
+ ((g_ascii_strncasecmp(word, "RSIP", 4) == 0) && (*verb_name = "RestartInProgress")) ||
+ ((g_ascii_strncasecmp(word, "MESG", 4) == 0) && (*verb_name = "Message")) ||
(word[0] == 'X' && is_rfc2234_alpha(word[1]) && is_rfc2234_alpha(word[2]) &&
is_rfc2234_alpha(word[3]) && (*verb_name = "*Experimental*")))
{
typval = ep_strsplit(tokens[i], "=", 2);
if ((typval[0] != NULL) && (typval[1] != NULL))
{
- if (!strcasecmp(g_strstrip(typval[0]), "PS"))
+ if (!g_ascii_strcasecmp(g_strstrip(typval[0]), "PS"))
{
hf_uint = hf_mgcp_param_connectionparam_ps;
}
- else if (!strcasecmp(g_strstrip(typval[0]), "OS"))
+ else if (!g_ascii_strcasecmp(g_strstrip(typval[0]), "OS"))
{
hf_uint = hf_mgcp_param_connectionparam_os;
}
- else if (!strcasecmp(g_strstrip(typval[0]), "PR"))
+ else if (!g_ascii_strcasecmp(g_strstrip(typval[0]), "PR"))
{
hf_uint = hf_mgcp_param_connectionparam_pr;
}
- else if (!strcasecmp(g_strstrip(typval[0]), "OR"))
+ else if (!g_ascii_strcasecmp(g_strstrip(typval[0]), "OR"))
{
hf_uint = hf_mgcp_param_connectionparam_or;
}
- else if (!strcasecmp(g_strstrip(typval[0]), "PL"))
+ else if (!g_ascii_strcasecmp(g_strstrip(typval[0]), "PL"))
{
hf_uint = hf_mgcp_param_connectionparam_pl;
}
- else if (!strcasecmp(g_strstrip(typval[0]), "JI"))
+ else if (!g_ascii_strcasecmp(g_strstrip(typval[0]), "JI"))
{
hf_uint = hf_mgcp_param_connectionparam_ji;
}
- else if (!strcasecmp(g_strstrip(typval[0]), "LA"))
+ else if (!g_ascii_strcasecmp(g_strstrip(typval[0]), "LA"))
{
hf_uint = hf_mgcp_param_connectionparam_la;
}
- else if (!strcasecmp(g_strstrip(typval[0]), "PC/RPS"))
+ else if (!g_ascii_strcasecmp(g_strstrip(typval[0]), "PC/RPS"))
{
hf_uint = hf_mgcp_param_connectionparam_pcrps;
- } else if (!strcasecmp(g_strstrip(typval[0]), "PC/ROS"))
+ } else if (!g_ascii_strcasecmp(g_strstrip(typval[0]), "PC/ROS"))
{
hf_uint = hf_mgcp_param_connectionparam_pcros;
}
- else if (!strcasecmp(g_strstrip(typval[0]), "PC/RPL"))
+ else if (!g_ascii_strcasecmp(g_strstrip(typval[0]), "PC/RPL"))
{
hf_uint = hf_mgcp_param_connectionparam_pcrpl;
}
- else if (!strcasecmp(g_strstrip(typval[0]), "PC/RJI"))
+ else if (!g_ascii_strcasecmp(g_strstrip(typval[0]), "PC/RJI"))
{
hf_uint = hf_mgcp_param_connectionparam_pcrji;
}
- else if (!strncasecmp(g_strstrip(typval[0]), "X-", 2))
+ else if (!g_ascii_strncasecmp(g_strstrip(typval[0]), "X-", 2))
{
hf_string = hf_mgcp_param_connectionparam_x;
}
typval = ep_strsplit(tokens[i], ":", 2);
if ((typval[0] != NULL) && (typval[1] != NULL))
{
- if (!strcasecmp(g_strstrip(typval[0]), "p"))
+ if (!g_ascii_strcasecmp(g_strstrip(typval[0]), "p"))
{
hf_uint = hf_mgcp_param_localconnoptions_p;
}
- else if (!strcasecmp(g_strstrip(typval[0]), "a"))
+ else if (!g_ascii_strcasecmp(g_strstrip(typval[0]), "a"))
{
hf_string = hf_mgcp_param_localconnoptions_a;
}
- else if (!strcasecmp(g_strstrip(typval[0]), "s"))
+ else if (!g_ascii_strcasecmp(g_strstrip(typval[0]), "s"))
{
hf_string = hf_mgcp_param_localconnoptions_s;
}
- else if (!strcasecmp(g_strstrip(typval[0]), "e"))
+ else if (!g_ascii_strcasecmp(g_strstrip(typval[0]), "e"))
{
hf_string = hf_mgcp_param_localconnoptions_e;
}
- else if (!strcasecmp(g_strstrip(typval[0]), "sc-rtp"))
+ else if (!g_ascii_strcasecmp(g_strstrip(typval[0]), "sc-rtp"))
{
hf_string = hf_mgcp_param_localconnoptions_scrtp;
}
- else if (!strcasecmp(g_strstrip(typval[0]), "sc-rtcp"))
+ else if (!g_ascii_strcasecmp(g_strstrip(typval[0]), "sc-rtcp"))
{
hf_string = hf_mgcp_param_localconnoptions_scrtcp;
}
- else if (!strcasecmp(g_strstrip(typval[0]), "b"))
+ else if (!g_ascii_strcasecmp(g_strstrip(typval[0]), "b"))
{
hf_string = hf_mgcp_param_localconnoptions_b;
}
- else if (!strcasecmp(g_strstrip(typval[0]), "es-ccd"))
+ else if (!g_ascii_strcasecmp(g_strstrip(typval[0]), "es-ccd"))
{
hf_string = hf_mgcp_param_localconnoptions_esccd;
}
- else if (!strcasecmp(g_strstrip(typval[0]), "es-cci"))
+ else if (!g_ascii_strcasecmp(g_strstrip(typval[0]), "es-cci"))
{
hf_string = hf_mgcp_param_localconnoptions_escci;
}
- else if (!strcasecmp(g_strstrip(typval[0]), "dq-gi"))
+ else if (!g_ascii_strcasecmp(g_strstrip(typval[0]), "dq-gi"))
{
hf_string = hf_mgcp_param_localconnoptions_dqgi;
}
- else if (!strcasecmp(g_strstrip(typval[0]), "dq-rd"))
+ else if (!g_ascii_strcasecmp(g_strstrip(typval[0]), "dq-rd"))
{
hf_string = hf_mgcp_param_localconnoptions_dqrd;
}
- else if (!strcasecmp(g_strstrip(typval[0]), "dq-ri"))
+ else if (!g_ascii_strcasecmp(g_strstrip(typval[0]), "dq-ri"))
{
hf_string = hf_mgcp_param_localconnoptions_dqri;
}
- else if (!strcasecmp(g_strstrip(typval[0]), "dq-rr"))
+ else if (!g_ascii_strcasecmp(g_strstrip(typval[0]), "dq-rr"))
{
hf_string = hf_mgcp_param_localconnoptions_dqrr;
}
- else if (!strcasecmp(g_strstrip(typval[0]), "k"))
+ else if (!g_ascii_strcasecmp(g_strstrip(typval[0]), "k"))
{
hf_string = hf_mgcp_param_localconnoptions_k;
}
- else if (!strcasecmp(g_strstrip(typval[0]), "gc"))
+ else if (!g_ascii_strcasecmp(g_strstrip(typval[0]), "gc"))
{
hf_uint = hf_mgcp_param_localconnoptions_gc;
}
- else if (!strcasecmp(g_strstrip(typval[0]), "fmtp"))
+ else if (!g_ascii_strcasecmp(g_strstrip(typval[0]), "fmtp"))
{
hf_string = hf_mgcp_param_localconnoptions_fmtp;
}
- else if (!strcasecmp(g_strstrip(typval[0]), "nt"))
+ else if (!g_ascii_strcasecmp(g_strstrip(typval[0]), "nt"))
{
hf_string = hf_mgcp_param_localconnoptions_nt;
}
- else if (!strcasecmp(g_strstrip(typval[0]), "o-fmtp"))
+ else if (!g_ascii_strcasecmp(g_strstrip(typval[0]), "o-fmtp"))
{
hf_string = hf_mgcp_param_localconnoptions_ofmtp;
}
- else if (!strcasecmp(g_strstrip(typval[0]), "r"))
+ else if (!g_ascii_strcasecmp(g_strstrip(typval[0]), "r"))
{
hf_string = hf_mgcp_param_localconnoptions_r;
}
- else if (!strcasecmp(g_strstrip(typval[0]), "t"))
+ else if (!g_ascii_strcasecmp(g_strstrip(typval[0]), "t"))
{
hf_string = hf_mgcp_param_localconnoptions_t;
}
- else if (!strcasecmp(g_strstrip(typval[0]), "r-cnf"))
+ else if (!g_ascii_strcasecmp(g_strstrip(typval[0]), "r-cnf"))
{
hf_string = hf_mgcp_param_localconnoptions_rcnf;
}
- else if (!strcasecmp(g_strstrip(typval[0]), "r-dir"))
+ else if (!g_ascii_strcasecmp(g_strstrip(typval[0]), "r-dir"))
{
hf_string = hf_mgcp_param_localconnoptions_rdir;
}
- else if (!strcasecmp(g_strstrip(typval[0]), "r-sh"))
+ else if (!g_ascii_strcasecmp(g_strstrip(typval[0]), "r-sh"))
{
hf_string = hf_mgcp_param_localconnoptions_rsh;
}
#include "packet-imf.h"
+#ifdef NEED_G_ASCII_STRCASECMP_H
+#include "g_ascii_strcasecmp.h"
+#endif
+
/* Dissector table for media requiring special attention in multipart
* encapsulation. */
static dissector_table_t multipart_media_subdissector_table;
while ((*p) && isspace((guchar)*p))
p++; /* Skip white space */
- if (strncasecmp(p, key, keylen) == 0)
+ if (g_ascii_strncasecmp(p, key, keylen) == 0)
break;
/* Skip to next parameter */
p = strchr(p, ';');
if(content_encoding_str && remove_base64_encoding) {
- if(!strncasecmp(content_encoding_str, "base64", 6))
+ if(!g_ascii_strncasecmp(content_encoding_str, "base64", 6))
tmp_tvb = base64_decode(pinfo, tmp_tvb, filename ? filename : (typename ? typename : content_type_str));
}
for (i = 1; i < array_length(multipart_headers); i++) {
if (len == strlen(multipart_headers[i].name) &&
- strncasecmp(header_str, multipart_headers[i].name, len) == 0)
+ g_ascii_strncasecmp(header_str, multipart_headers[i].name, len) == 0)
return i;
if (multipart_headers[i].compact_name != NULL &&
len == strlen(multipart_headers[i].compact_name) &&
- strncasecmp(header_str, multipart_headers[i].compact_name, len) == 0)
+ g_ascii_strncasecmp(header_str, multipart_headers[i].compact_name, len) == 0)
return i;
}
#include <epan/strutil.h>
#include "packet-tcp.h"
+#ifdef NEED_G_ASCII_STRCASECMP_H
+#include "g_ascii_strcasecmp.h"
+#endif
+
#define TCP_PORT_PVFS2 3334
#define PVFS2_FH_LENGTH 8
total_len = roundup8(4 + distlen + 1);
if (((distlen + 1) == PVFS_DIST_SIMPLE_STRIPE_NAME_SIZE) &&
- (strncasecmp(tmpstr, PVFS_DIST_SIMPLE_STRIPE_NAME,
+ (g_ascii_strncasecmp(tmpstr, PVFS_DIST_SIMPLE_STRIPE_NAME,
distlen) == 0))
{
/* Parameter for 'simple_stripe' is 8 bytes */
#include <epan/emem.h>
#include <epan/expert.h>
+#ifdef NEED_G_ASCII_STRCASECMP_H
+#include "g_ascii_strcasecmp.h"
+#endif
+
/* Version is the first 2 bits of the first octet*/
#define RTCP_VERSION(octet) ((octet) >> 6)
ascii_name );
/* See if we can handle this application type */
- if ( strncasecmp(ascii_name, poc1_app_name_str,4 ) == 0 )
+ if ( g_ascii_strncasecmp(ascii_name, poc1_app_name_str,4 ) == 0 )
{
/* PoC1 Application */
guint8 t2timer_code, participants_code;
#include "packet-e164.h"
#include <epan/emem.h>
+#ifdef NEED_G_ASCII_STRCASECMP_H
+#include "g_ascii_strcasecmp.h"
+#endif
+
static int proto_rtsp = -1;
static gint ett_rtsp = -1;
unsigned ii;
/* Is this an RTSP reply? */
- if (linelen >= 5 && strncasecmp("RTSP/", line, 5) == 0) {
+ if (linelen >= 5 && g_ascii_strncasecmp("RTSP/", line, 5) == 0) {
/*
* Yes.
*/
for (ii = 0; ii < RTSP_NMETHODS; ii++) {
size_t len = strlen(rtsp_methods[ii]);
if (linelen >= len &&
- strncasecmp(rtsp_methods[ii], line, len) == 0 &&
+ g_ascii_strncasecmp(rtsp_methods[ii], line, len) == 0 &&
(len == linelen || isspace(line[len])))
{
*type = RTSP_REQUEST;
tmp++;
/* Work out which transport type is here */
- if (strncasecmp(tmp, rtsp_rtp, strlen(rtsp_rtp)) == 0)
+ if (g_ascii_strncasecmp(tmp, rtsp_rtp, strlen(rtsp_rtp)) == 0)
rtp_transport = TRUE;
else
- if (strncasecmp(tmp, rtsp_real_rdt, strlen(rtsp_real_rdt)) == 0 ||
- strncasecmp(tmp, rtsp_real_tng, strlen(rtsp_real_tng)) == 0)
+ if (g_ascii_strncasecmp(tmp, rtsp_real_rdt, strlen(rtsp_real_rdt)) == 0 ||
+ g_ascii_strncasecmp(tmp, rtsp_real_tng, strlen(rtsp_real_tng)) == 0)
rdt_transport = TRUE;
else
{
*/
#define HDR_MATCHES(header) \
( (size_t)linelen > STRLEN_CONST(header) && \
- strncasecmp(line, (header), STRLEN_CONST(header)) == 0)
+ g_ascii_strncasecmp(line, (header), STRLEN_CONST(header)) == 0)
if (HDR_MATCHES(rtsp_transport))
{
for (ii = 0; ii < RTSP_NMETHODS; ii++) {
size_t len = strlen(rtsp_methods[ii]);
if (linelen >= len &&
- strncasecmp(rtsp_methods[ii], data, len) == 0 &&
+ g_ascii_strncasecmp(rtsp_methods[ii], data, len) == 0 &&
(len == linelen || isspace(data[len])))
break;
}
#include "tap.h"
#include <epan/uat.h>
+#ifdef NEED_G_ASCII_STRCASECMP_H
+#include "g_ascii_strcasecmp.h"
+#endif
+
static Standard_Type decode_mtp3_standard;
#define SCCP_SI 3
item = proto_tree_add_text(call_tree, tvb, offset - 1, ADDRESS_SSN_LENGTH, "Linked to %s", ssn_dissector_short_name);
PROTO_ITEM_SET_GENERATED(item);
- if (strncasecmp("TCAP", ssn_dissector_short_name, 4)== 0) {
+ if (g_ascii_strncasecmp("TCAP", ssn_dissector_short_name, 4)== 0) {
tcap_ssn_dissector = get_itu_tcap_subdissector(ssn);
if(tcap_ssn_dissector){
#include "packet-tcp.h"
#include "packet-ssl.h"
+#ifdef NEED_G_ASCII_STRCASECMP_H
+#include "g_ascii_strcasecmp.h"
+#endif
+
#define TCP_PORT_SIP 5060
#define UDP_PORT_SIP 5060
#define TLS_PORT_SIP 5061
i < array_length(auth_parameters_hf_array);
i++, auth_parameter++)
{
- if (strcasecmp(name, auth_parameter->param_name) == 0)
+ if (g_ascii_strcasecmp(name, auth_parameter->param_name) == 0)
{
proto_tree_add_item(tree, *(auth_parameter->hf_item), tvb,
equals_offset+1, current_offset-equals_offset-1,
"Reason Protocols: %s", tvb_format_text(tvb, start_offset, length));
param_name = tvb_get_ephemeral_string(tvb, start_offset, length);
- if (strcasecmp(param_name, "Q.850") == 0){
+ if (g_ascii_strcasecmp(param_name, "Q.850") == 0){
current_offset = tvb_find_guint8(tvb, semi_colon_offset, line_end_offset-semi_colon_offset, '=')+1;
length = line_end_offset - current_offset;
i < array_length(via_parameters_hf_array);
i++, via_parameter++)
{
- if (strcasecmp(param_name, via_parameter->param_name) == 0)
+ if (g_ascii_strcasecmp(param_name, via_parameter->param_name) == 0)
{
if (equals_found)
{
#include <epan/emem.h>
#include <epan/reassemble.h>
+#ifdef NEED_G_ASCII_STRCASECMP_H
+#include "g_ascii_strcasecmp.h"
+#endif
+
#define TCP_PORT_SMTP 25
static int proto_smtp = -1;
if (linelen >= 4 && ISALPHA(line[0]) && ISALPHA(line[1]) &&
ISALPHA(line[2]) && ISALPHA(line[3]) &&
(linelen == 4 || line[4] == ' ')) {
- if (strncasecmp(line, "DATA", 4) == 0) {
+ if (g_ascii_strncasecmp(line, "DATA", 4) == 0) {
/*
* DATA command.
request_val->reading_data = TRUE;
request_val->data_seen = TRUE;
- } else if (strncasecmp(line, "BDAT", 4) == 0) {
+ } else if (g_ascii_strncasecmp(line, "BDAT", 4) == 0) {
/*
* BDAT command.
request_val->reading_data = TRUE;
}
- if (strncasecmp(line+linelen-4, "LAST", 4) == 0) {
+ if (g_ascii_strncasecmp(line+linelen-4, "LAST", 4) == 0) {
/*
* This is the last data chunk.
*/
}
} else {
- if ((linelen >= 7) && line[0] == 'X' && ( (strncasecmp(line, "X-EXPS ", 7) == 0) ||
- ((linelen >=13) && (strncasecmp(line, "X-LINK2STATE ", 13) == 0)) ||
- ((linelen >= 8) && (strncasecmp(line, "XEXCH50 ", 8) == 0)) ))
+ if ((linelen >= 7) && line[0] == 'X' && ( (g_ascii_strncasecmp(line, "X-EXPS ", 7) == 0) ||
+ ((linelen >=13) && (g_ascii_strncasecmp(line, "X-LINK2STATE ", 13) == 0)) ||
+ ((linelen >= 8) && (g_ascii_strncasecmp(line, "XEXCH50 ", 8) == 0)) ))
frame_data->pdu_type = SMTP_PDU_CMD;
else
/*
#include <string.h>
#include <epan/packet.h>
#include "packet-sqloracle.h"
+
+#ifdef NEED_G_ASCII_STRCASECMP_H
+#include "g_ascii_strcasecmp.h"
+#endif
+
#define SWAP_UI16(ui16) (((ui16)>>8 & 0xff) | ((ui16)<<8 & 0xff00))
/* option flag 1 */
appMsg = (I8_P)m_pCurQuery;
#endif
- if (strncasecmp((I8_P)m_pCurQuery, "update", 6) == 0)
+ if (g_ascii_strncasecmp((I8_P)m_pCurQuery, "update", 6) == 0)
{
m_numOfUpdate++;
#if 0
m_pServerNode->m_numOfUpdate++;
#endif
}
- else if (strncasecmp((I8_P)m_pCurQuery, "select", 6) == 0)
+ else if (g_ascii_strncasecmp((I8_P)m_pCurQuery, "select", 6) == 0)
{
m_numOfSelect++;
#if 0
m_pServerNode->m_numOfSelect++;
#endif
}
- else if (strncasecmp((I8_P)m_pCurQuery, "insert", 6) == 0)
+ else if (g_ascii_strncasecmp((I8_P)m_pCurQuery, "insert", 6) == 0)
{
m_numOfInsert++;
#if 0
m_pServerNode->m_numOfInsert++;
#endif
}
- else if (strncasecmp((I8_P)m_pCurQuery, "delete", 6) == 0)
+ else if (g_ascii_strncasecmp((I8_P)m_pCurQuery, "delete", 6) == 0)
{
m_numOfDelete++;
#if 0
m_pServerNode->m_numOfDelete++;
#endif
}
- else if (strncasecmp((I8_P)m_pCurQuery, "rollback", 8) == 0)
+ else if (g_ascii_strncasecmp((I8_P)m_pCurQuery, "rollback", 8) == 0)
{
m_numOfRollback++;
#if 0
m_pServerNode->m_numOfRollback++;
#endif
}
- else if (strncasecmp((I8_P)m_pCurQuery, "set", 3) == 0)
+ else if (g_ascii_strncasecmp((I8_P)m_pCurQuery, "set", 3) == 0)
{
m_numOfSet++;
#if 0
m_pServerNode->m_numOfSet++;
#endif
}
- else if (strncasecmp((I8_P)m_pCurQuery, "start", 5) == 0)
+ else if (g_ascii_strncasecmp((I8_P)m_pCurQuery, "start", 5) == 0)
{
m_numOfStart++;
#if 0
m_pServerNode->m_numOfStart++;
#endif
}
- else if (strncasecmp((I8_P)m_pCurQuery, "commit", 6) == 0)
+ else if (g_ascii_strncasecmp((I8_P)m_pCurQuery, "commit", 6) == 0)
{
m_numOfCommit++;
#if 0
#include <epan/emem.h>
#include <epan/expert.h>
+#ifdef NEED_G_ASCII_STRCASECMP_H
+#include "g_ascii_strcasecmp.h"
+#endif
+
/* Things we may want to remember for a whole conversation */
typedef struct _tftp_conv_info_t {
guint16 blocksize;
}
/* Special code to handle individual options */
- if (!strcasecmp((const char *)optionname, "blksize") &&
+ if (!g_ascii_strcasecmp((const char *)optionname, "blksize") &&
opcode == TFTP_OACK) {
gint blocksize = strtol((const char *)optionvalue, NULL, 10);
if (blocksize < 8 || blocksize > 65464) {
#include <epan/prefs.h>
#include <epan/ipproto.h>
+#ifdef NEED_G_ASCII_STRCASECMP_H
+#include "g_ascii_strcasecmp.h"
+#endif
+
/* Forward declaration we need below */
void proto_reg_handoff_tivoconnect(void);
*value++='\0';
fieldlen=strlen(field)+1;
- if ( strcasecmp(field,"tivoconnect") == 0 ) {
+ if ( g_ascii_strcasecmp(field,"tivoconnect") == 0 ) {
proto_tree_add_item(tivoconnect_tree,
hf_tivoconnect_flavor, tvb, offset+fieldlen,
length-fieldlen-1, FALSE);
}
- else if ( strcasecmp(field,"method") == 0 ) {
+ else if ( g_ascii_strcasecmp(field,"method") == 0 ) {
proto_tree_add_item(tivoconnect_tree,
hf_tivoconnect_method, tvb, offset+fieldlen,
length-fieldlen-1, FALSE);
}
- else if ( strcasecmp(field,"platform") == 0 ) {
+ else if ( g_ascii_strcasecmp(field,"platform") == 0 ) {
proto_tree_add_item(tivoconnect_tree,
hf_tivoconnect_platform, tvb, offset+fieldlen,
length-fieldlen-1, FALSE);
}
- else if ( strcasecmp(field,"machine") == 0 ) {
+ else if ( g_ascii_strcasecmp(field,"machine") == 0 ) {
proto_tree_add_item(tivoconnect_tree,
hf_tivoconnect_machine, tvb, offset+fieldlen,
length-fieldlen-1, FALSE);
packet_machine = value;
}
- else if ( strcasecmp(field,"identity") == 0 ) {
+ else if ( g_ascii_strcasecmp(field,"identity") == 0 ) {
proto_tree_add_item(tivoconnect_tree,
hf_tivoconnect_identity, tvb, offset+fieldlen,
length-fieldlen-1, FALSE);
packet_identity = value;
}
- else if ( strcasecmp(field,"services") == 0 ) {
+ else if ( g_ascii_strcasecmp(field,"services") == 0 ) {
proto_tree_add_item(tivoconnect_tree,
hf_tivoconnect_services, tvb, offset+fieldlen,
length-fieldlen-1, FALSE);
}
- else if ( strcasecmp(field,"swversion") == 0 ) {
+ else if ( g_ascii_strcasecmp(field,"swversion") == 0 ) {
proto_tree_add_item(tivoconnect_tree,
hf_tivoconnect_version, tvb, offset+fieldlen,
length-fieldlen-1, FALSE);
#include "packet-x11-keysym.h" /* This contains the X11 value_string
* "keysym_vals_source" that VNC also uses. */
+#ifdef NEED_G_ASCII_STRCASECMP_H
+#include "g_ascii_strcasecmp.h"
+#endif
+
static const value_string security_types_vs[] = {
{ 0, "Invalid" },
{ 1, "None" },
ti = proto_tree_add_string(tree, hf_vnc_vendor_code, tvb,
offset, 4, vendor);
- if(strcasecmp(vendor, "STDV") == 0)
+ if(g_ascii_strcasecmp(vendor, "STDV") == 0)
proto_item_append_text(ti, " (Standard VNC vendor)");
- else if(strcasecmp(vendor, "TRDV") == 0)
+ else if(g_ascii_strcasecmp(vendor, "TRDV") == 0)
proto_item_append_text(ti, " (Tridia VNC vendor)");
- else if(strcasecmp(vendor, "TGHT") == 0)
+ else if(g_ascii_strcasecmp(vendor, "TGHT") == 0)
proto_item_append_text(ti, " (Tight VNC vendor)");
offset += 4;
/* We need the function tvb_get_guintvar() */
#include "packet-wap.h"
+#ifdef NEED_G_ASCII_STRCASECMP_H
+#include "g_ascii_strcasecmp.h"
+#endif
+
/* General-purpose debug logger.
* Requires double parentheses because of variable arguments of printf().
*
const wbxml_literal_list *item = content_type_list;
while (item && item->content_type) {
- if (strcasecmp(content_type, item->content_type) == 0) {
+ if (g_ascii_strcasecmp(content_type, item->content_type) == 0) {
/* Try the discriminator */
if (item->discriminator != NULL) {
map = item->discriminator(tvb, offset);
#include "packet-wap.h"
#include "packet-wsp.h"
+#ifdef NEED_G_ASCII_STRCASECMP_H
+#include "g_ascii_strcasecmp.h"
+#endif
+
/* General-purpose debug logger.
* Requires double parentheses because of variable arguments of printf().
*
} else {
/* Old-style X-WAP-TOD uses a non-textual value
* after a textual header. */
- if (strcasecmp(hdr_str, "x-wap.tod") == 0) {
+ if (g_ascii_strcasecmp(hdr_str, "x-wap.tod") == 0) {
get_delta_seconds_value(val, tvb, val_start, val_len, ok);
if (ok) {
if (val == 0) {
* Content type is a string.
*/
/*
- if (strcasecmp(contentTypeStr, "application/vnd.wap.sia") == 0) {
+ if (g_ascii_strcasecmp(contentTypeStr, "application/vnd.wap.sia") == 0) {
dissect_sir(tree, tmp_tvb);
} else
*/
return;
}
/* 2. Look up the string capability name */
- if (strcasecmp(capaName, "client-sdu-size") == 0) {
+ if (g_ascii_strcasecmp(capaName, "client-sdu-size") == 0) {
peek = WSP_CAPA_CLIENT_SDU_SIZE;
- } else if (strcasecmp(capaName, "server-sdu-size") == 0) {
+ } else if (g_ascii_strcasecmp(capaName, "server-sdu-size") == 0) {
peek = WSP_CAPA_SERVER_SDU_SIZE;
- } else if (strcasecmp(capaName, "protocol options") == 0) {
+ } else if (g_ascii_strcasecmp(capaName, "protocol options") == 0) {
peek = WSP_CAPA_PROTOCOL_OPTIONS;
- } else if (strcasecmp(capaName, "method-mor") == 0) {
+ } else if (g_ascii_strcasecmp(capaName, "method-mor") == 0) {
peek = WSP_CAPA_METHOD_MOR;
- } else if (strcasecmp(capaName, "push-mor") == 0) {
+ } else if (g_ascii_strcasecmp(capaName, "push-mor") == 0) {
peek = WSP_CAPA_PUSH_MOR;
- } else if (strcasecmp(capaName, "extended methods") == 0) {
+ } else if (g_ascii_strcasecmp(capaName, "extended methods") == 0) {
peek = WSP_CAPA_EXTENDED_METHODS;
- } else if (strcasecmp(capaName, "header code pages") == 0) {
+ } else if (g_ascii_strcasecmp(capaName, "header code pages") == 0) {
peek = WSP_CAPA_HEADER_CODE_PAGES;
- } else if (strcasecmp(capaName, "aliases") == 0) {
+ } else if (g_ascii_strcasecmp(capaName, "aliases") == 0) {
peek = WSP_CAPA_ALIASES;
- } else if (strcasecmp(capaName, "client-message-size") == 0) {
+ } else if (g_ascii_strcasecmp(capaName, "client-message-size") == 0) {
peek = WSP_CAPA_CLIENT_MESSAGE_SIZE;
- } else if (strcasecmp(capaName, "server-message-size") == 0) {
+ } else if (g_ascii_strcasecmp(capaName, "server-message-size") == 0) {
peek = WSP_CAPA_SERVER_MESSAGE_SIZE;
} else {
DebugLog(("add_capabilities(): unknown capability '%s' at offset %u\n",
}
if ( (contentTypeStr == NULL && contentType == 0x12)
- || (contentTypeStr && (strcasecmp(contentTypeStr,
+ || (contentTypeStr && (g_ascii_strcasecmp(contentTypeStr,
"application/x-www-form-urlencoded") == 0)) )
{
if (tree) {
#include <epan/prefs.h>
#include <epan/garrayfix.h>
+#ifdef NEED_G_ASCII_STRCASECMP_H
+#include "g_ascii_strcasecmp.h"
+#endif
+
typedef struct _xml_ns_t {
/* the name of this namespace */
gchar* name;
filename = GETFNAME_OP(file);
namelen = strlen(filename);
- if ( namelen > 4 && ( g_strcasecmp(filename+(namelen-4),".dtd") == 0 ) ) {
+ if ( namelen > 4 && ( g_ascii_strcasecmp(filename+(namelen-4),".dtd") == 0 ) ) {
GString* errors = g_string_new("");
GString* preparsed = dtd_preparse(dirname, filename, errors);
dtd_build_data_t* dtd_data;
#include "dtd_parse.h"
#include "dtd_parse_lex.h"
+#ifdef NEED_G_ASCII_STRCASECMP_H
+#include "g_ascii_strcasecmp.h"
+#endif
+
struct _proto_xmlpi_attr {
gchar* name;
void (*act)(gchar*);
static void set_media_type (gchar* val) { if(build_data->media_type) g_free(build_data->media_type); build_data->media_type = g_strdup(val); }
static void set_proto_root (gchar* val) { if(build_data->proto_root) g_free(build_data->proto_root); build_data->proto_root = g_strdup(val); }
static void set_description (gchar* val) { if(build_data->description) g_free(build_data->description); build_data->description = g_strdup(val); }
- static void set_recursive (gchar* val) { build_data->recursion = ( g_strcasecmp(val,"yes") == 0 ) ? TRUE : FALSE; }
+ static void set_recursive (gchar* val) { build_data->recursion = ( g_ascii_strcasecmp(val,"yes") == 0 ) ? TRUE : FALSE; }
static struct _proto_xmlpi_attr proto_attrs[] =
{
gboolean got_it = FALSE;
for(pa = proto_attrs; pa->name; pa++) {
- if (g_strcasecmp(attr_name,pa->name) == 0) {
+ if (g_ascii_strcasecmp(attr_name,pa->name) == 0) {
pa->act(yytext);
got_it = TRUE;
break;
--- /dev/null
+/* GLIB - Library of useful routines for C programming
+ * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+/*
+ * Modified by the GLib Team and others 1997-2000. See the AUTHORS
+ * file for a list of people on the GLib Team. See the ChangeLog
+ * files for a list of changes. These files are distributed with
+ * GLib at ftp://ftp.gtk.org/pub/gtk/.
+ */
+
+/*
+ * $Id$
+ *
+ * "g_ascii_strcasecmp()" and "g_ascii_strncasecmp()" extracted from
+ * GLib 2.4.8, for use with GLibs that don't have it (e.g., GLib 1.2[.x]).
+ */
+
+#include "g_ascii_strcasecmp.h"
+
+#define ISUPPER(c) ((c) >= 'A' && (c) <= 'Z')
+#define ISLOWER(c) ((c) >= 'a' && (c) <= 'z')
+#define TOUPPER(c) (ISLOWER (c) ? (c) - 'a' + 'A' : (c))
+#define TOLOWER(c) (ISUPPER (c) ? (c) - 'A' + 'a' : (c))
+
+/**
+ * g_ascii_strcasecmp:
+ * @s1: string to compare with @s2.
+ * @s2: string to compare with @s1.
+ *
+ * Compare two strings, ignoring the case of ASCII characters.
+ *
+ * Unlike the BSD strcasecmp() function, this only recognizes standard
+ * ASCII letters and ignores the locale, treating all non-ASCII
+ * characters as if they are not letters.
+ *
+ * Return value: an integer less than, equal to, or greater than
+ * zero if @s1 is found, respectively, to be less than,
+ * to match, or to be greater than @s2.
+ **/
+gint
+g_ascii_strcasecmp (const gchar *s1,
+ const gchar *s2)
+{
+ gint c1, c2;
+
+ g_return_val_if_fail (s1 != NULL, 0);
+ g_return_val_if_fail (s2 != NULL, 0);
+
+ while (*s1 && *s2)
+ {
+ c1 = (gint)(guchar) TOLOWER (*s1);
+ c2 = (gint)(guchar) TOLOWER (*s2);
+ if (c1 != c2)
+ return (c1 - c2);
+ s1++; s2++;
+ }
+
+ return (((gint)(guchar) *s1) - ((gint)(guchar) *s2));
+}
+
+/**
+ * g_ascii_strncasecmp:
+ * @s1: string to compare with @s2.
+ * @s2: string to compare with @s1.
+ * @n: number of characters to compare.
+ *
+ * Compare @s1 and @s2, ignoring the case of ASCII characters and any
+ * characters after the first @n in each string.
+ *
+ * Unlike the BSD strcasecmp() function, this only recognizes standard
+ * ASCII letters and ignores the locale, treating all non-ASCII
+ * characters as if they are not letters.
+ *
+ * Return value: an integer less than, equal to, or greater than zero
+ * if the first @n bytes of @s1 is found, respectively,
+ * to be less than, to match, or to be greater than the
+ * first @n bytes of @s2.
+ **/
+gint
+g_ascii_strncasecmp (const gchar *s1,
+ const gchar *s2,
+ gsize n)
+{
+ gint c1, c2;
+
+ g_return_val_if_fail (s1 != NULL, 0);
+ g_return_val_if_fail (s2 != NULL, 0);
+
+ while (n && *s1 && *s2)
+ {
+ n -= 1;
+ c1 = (gint)(guchar) TOLOWER (*s1);
+ c2 = (gint)(guchar) TOLOWER (*s2);
+ if (c1 != c2)
+ return (c1 - c2);
+ s1++; s2++;
+ }
+
+ if (n)
+ return (((gint) (guchar) *s1) - ((gint) (guchar) *s2));
+ else
+ return 0;
+}
+
--- /dev/null
+/*
+ * $Id$
+ *
+ * "g_ascii_strcasecmp()" and "g_ascii_strncasecmp()" extracted from
+ * GLib 2.4.8, for use with GLibs that don't have it (e.g., GLib 1.2[.x]).
+ */
+
+#ifndef __WIRESHARK_G_ASCII_STRCASECMP_H__
+#define __WIRESHARK_G_ASCII_STRCASECMP_H__
+
+extern gint g_ascii_strcasecmp (const gchar *s1,
+ const gchar *s2);
+
+extern gint g_ascii_strncasecmp (const gchar *s1,
+ const gchar *s2,
+ gsize n);
+
+#endif
#include <epan/prefs-int.h>
#include <epan/uat-int.h>
+#ifdef NEED_G_ASCII_STRCASECMP_H
+#include "g_ascii_strcasecmp.h"
+#endif
+
/* Internal functions */
static module_t *find_subtree(module_t *parent, const char *name);
static module_t *prefs_register_module_or_subtree(module_t *parent,
const module_t *p1 = p1_arg;
const module_t *p2 = p2_arg;
- return g_strcasecmp(p1->name, p2->name);
+ return g_ascii_strcasecmp(p1->name, p2->name);
}
static gint
const module_t *p1 = p1_arg;
const module_t *p2 = p2_arg;
- return g_strcasecmp(p1->title, p2->title);
+ return g_ascii_strcasecmp(p1->title, p2->title);
}
/*
int i;
for (i = 0; haystack[i].name != NULL; i++) {
- if (strcasecmp(needle, haystack[i].name) == 0) {
+ if (g_ascii_strcasecmp(needle, haystack[i].name) == 0) {
return haystack[i].value;
}
}
for (i = 0; haystack[i].name != NULL; i++) {
- if (strcasecmp(needle, haystack[i].description) == 0) {
+ if (g_ascii_strcasecmp(needle, haystack[i].description) == 0) {
return haystack[i].value;
}
}
prefs.st_server_bg.green = GREEN_COMPONENT(cval);
prefs.st_server_bg.blue = BLUE_COMPONENT(cval);
} else if (strcmp(pref_name, PRS_GUI_SCROLLBAR_ON_RIGHT) == 0) {
- if (strcasecmp(value, "true") == 0) {
+ if (g_ascii_strcasecmp(value, "true") == 0) {
prefs.gui_scrollbar_on_right = TRUE;
}
else {
prefs.gui_scrollbar_on_right = FALSE;
}
} else if (strcmp(pref_name, PRS_GUI_PLIST_SEL_BROWSE) == 0) {
- if (strcasecmp(value, "true") == 0) {
+ if (g_ascii_strcasecmp(value, "true") == 0) {
prefs.gui_plist_sel_browse = TRUE;
}
else {
prefs.gui_plist_sel_browse = FALSE;
}
} else if (strcmp(pref_name, PRS_GUI_PTREE_SEL_BROWSE) == 0) {
- if (strcasecmp(value, "true") == 0) {
+ if (g_ascii_strcasecmp(value, "true") == 0) {
prefs.gui_ptree_sel_browse = TRUE;
}
else {
prefs.gui_ptree_sel_browse = FALSE;
}
} else if (strcmp(pref_name, PRS_GUI_ALTERN_COLORS) == 0) {
- if (strcasecmp(value, "true") == 0) {
+ if (g_ascii_strcasecmp(value, "true") == 0) {
prefs.gui_altern_colors = TRUE;
}
else {
prefs.gui_hex_dump_highlight_style =
find_index_from_string_array(value, gui_hex_dump_highlight_style_text, 1);
} else if (strcmp(pref_name, PRS_GUI_FILTER_TOOLBAR_IN_STATUSBAR) == 0) {
- if (strcasecmp(value, "true") == 0) {
+ if (g_ascii_strcasecmp(value, "true") == 0) {
prefs.filter_toolbar_show_in_statusbar = TRUE;
}
else {
g_free(prefs.gui_colorized_bg);
prefs.gui_colorized_bg = g_strdup(value);
} else if (strcmp(pref_name, PRS_GUI_GEOMETRY_SAVE_POSITION) == 0) {
- if (strcasecmp(value, "true") == 0) {
+ if (g_ascii_strcasecmp(value, "true") == 0) {
prefs.gui_geometry_save_position = TRUE;
}
else {
prefs.gui_geometry_save_position = FALSE;
}
} else if (strcmp(pref_name, PRS_GUI_GEOMETRY_SAVE_SIZE) == 0) {
- if (strcasecmp(value, "true") == 0) {
+ if (g_ascii_strcasecmp(value, "true") == 0) {
prefs.gui_geometry_save_size = TRUE;
}
else {
prefs.gui_geometry_save_size = FALSE;
}
} else if (strcmp(pref_name, PRS_GUI_GEOMETRY_SAVE_MAXIMIZED) == 0) {
- if (strcasecmp(value, "true") == 0) {
+ if (g_ascii_strcasecmp(value, "true") == 0) {
prefs.gui_geometry_save_maximized = TRUE;
}
else {
} else if (strcmp(pref_name, PRS_GUI_FILEOPEN_PREVIEW) == 0) {
prefs.gui_fileopen_preview = strtoul(value, NULL, 10);
} else if (strcmp(pref_name, PRS_GUI_ASK_UNSAVED) == 0) {
- if (strcasecmp(value, "true") == 0) {
+ if (g_ascii_strcasecmp(value, "true") == 0) {
prefs.gui_ask_unsaved = TRUE;
}
else {
prefs.gui_ask_unsaved = FALSE;
}
} else if (strcmp(pref_name, PRS_GUI_FIND_WRAP) == 0) {
- if (strcasecmp(value, "true") == 0) {
+ if (g_ascii_strcasecmp(value, "true") == 0) {
prefs.gui_find_wrap = TRUE;
}
else {
prefs.gui_find_wrap = FALSE;
}
} else if (strcmp(pref_name, PRS_GUI_USE_PREF_SAVE) == 0) {
- if (strcasecmp(value, "true") == 0) {
+ if (g_ascii_strcasecmp(value, "true") == 0) {
prefs.gui_use_pref_save = TRUE;
}
else {
g_free(prefs.capture_devices_hide);
prefs.capture_devices_hide = g_strdup(value);
} else if (strcmp(pref_name, PRS_CAP_PROM_MODE) == 0) {
- prefs.capture_prom_mode = ((strcasecmp(value, "true") == 0)?TRUE:FALSE);
+ prefs.capture_prom_mode = ((g_ascii_strcasecmp(value, "true") == 0)?TRUE:FALSE);
} else if (strcmp(pref_name, PRS_CAP_REAL_TIME) == 0) {
- prefs.capture_real_time = ((strcasecmp(value, "true") == 0)?TRUE:FALSE);
+ prefs.capture_real_time = ((g_ascii_strcasecmp(value, "true") == 0)?TRUE:FALSE);
} else if (strcmp(pref_name, PRS_CAP_AUTO_SCROLL) == 0) {
- prefs.capture_auto_scroll = ((strcasecmp(value, "true") == 0)?TRUE:FALSE);
+ prefs.capture_auto_scroll = ((g_ascii_strcasecmp(value, "true") == 0)?TRUE:FALSE);
} else if (strcmp(pref_name, PRS_CAP_SHOW_INFO) == 0) {
- prefs.capture_show_info = ((strcasecmp(value, "true") == 0)?TRUE:FALSE);
+ prefs.capture_show_info = ((g_ascii_strcasecmp(value, "true") == 0)?TRUE:FALSE);
/* handle the global options */
} else if (strcmp(pref_name, PRS_NAME_RESOLVE) == 0 ||
*
* Otherwise, we treat it as a list of name types we want to resolve.
*/
- if (strcasecmp(value, "true") == 0)
+ if (g_ascii_strcasecmp(value, "true") == 0)
prefs.name_resolve = RESOLV_ALL;
- else if (strcasecmp(value, "false") == 0)
+ else if (g_ascii_strcasecmp(value, "false") == 0)
prefs.name_resolve = RESOLV_NONE;
else {
prefs.name_resolve = RESOLV_NONE; /* start out with none set */
case PREF_BOOL:
/* XXX - give an error if it's neither "true" nor "false"? */
- if (strcasecmp(value, "true") == 0)
+ if (g_ascii_strcasecmp(value, "true") == 0)
bval = TRUE;
else
bval = FALSE;
#include "emem.h"
#include "charsets.h"
+#ifdef NEED_G_ASCII_STRCASECMP_H
+#include "g_ascii_strcasecmp.h"
+#endif
+
#define SUBTREE_ONCE_ALLOCATION_NUMBER 8
#define SUBTREE_MAX_LEVELS 256
const protocol_t *p1 = p1_arg;
const protocol_t *p2 = p2_arg;
- return g_strcasecmp(p1->short_name, p2->short_name);
+ return g_ascii_strcasecmp(p1->short_name, p2->short_name);
}
#include <epan/req_resp_hdrs.h>
+#ifdef NEED_G_ASCII_STRCASECMP_H
+#include "g_ascii_strcasecmp.h"
+#endif
+
/*
* Optionally do reassembly of the request/response line, headers, and body.
*/
while(*header_val==' '){
header_val++;
}
- if(!strncasecmp(header_val, "Keep-Alive", 10)){
+ if(!g_ascii_strncasecmp(header_val, "Keep-Alive", 10)){
keepalive_found = TRUE;
}
}
(*p == ' ' || *p == '\t'))
p++;
if (p <= header_val + len) {
- if (strncasecmp(p, "chunked", 7)
+ if (g_ascii_strncasecmp(p, "chunked", 7)
== 0) {
/*
* Don't bother looking
#include <wchar.h>
#endif
+#ifdef NEED_G_ASCII_STRCASECMP_H
+#include "g_ascii_strcasecmp.h"
+#endif
+
static const char hex[16] = { '0', '1', '2', '3', '4', '5', '6', '7',
'8', '9', 'A', 'B', 'C', 'D', 'E', 'F' };
gsize nlen = strlen(needle);
while (hlen-- >= nlen) {
- if (!g_strncasecmp(haystack, needle, nlen))
+ if (!g_ascii_strncasecmp(haystack, needle, nlen))
return (char*) haystack;
haystack++;
}
#include "emem.h"
#include "proto.h" /* XXX - only used for DISSECTOR_ASSERT, probably a new header file? */
+#ifdef NEED_G_ASCII_STRCASECMP_H
+#include "g_ascii_strcasecmp.h"
+#endif
+
static const guint8*
ensure_contiguous_no_exception(tvbuff_t *tvb, gint offset, gint length,
int *exception);
}
/*
- * Call strncasecmp after checking if enough chars left, returning 0 if
- * it returns 0 (meaning "equal") and -1 otherwise, otherwise return -1.
+ * Call g_ascii_strncasecmp after checking if enough chars left, returning
+ * 0 if it returns 0 (meaning "equal") and -1 otherwise, otherwise return -1.
*/
gint
tvb_strncaseeql(tvbuff_t *tvb, gint offset, const gchar *str, gint size)
ptr = ensure_contiguous_no_exception(tvb, offset, size, NULL);
if (ptr) {
- int cmp = strncasecmp((const char *)ptr, str, size);
+ int cmp = g_ascii_strncasecmp((const char *)ptr, str, size);
/*
* Return 0 if equal, -1 otherwise.
#include <epan/guid-utils.h>
#include "exceptions.h"
+#ifdef NEED_G_ASCII_STRCASECMP_H
+#include "g_ascii_strcasecmp.h"
+#endif
+
/** @file
* "testy, virtual(-izable) buffer". They are testy in that they get mad when
* an attempt is made to access data beyond the bounds of their array. In that
gint size);
/**
- * Call strncasecmp after checking if enough chars left, returning 0 if
- * it returns 0 (meaning "equal") and -1 otherwise, otherwise return -1.
+ * Call g_ascii_strncasecmp after checking if enough chars left, returning
+ * 0 if it returns 0 (meaning "equal") and -1 otherwise, otherwise return -1.
*/
extern gint tvb_strncaseeql(tvbuff_t *tvb, gint offset, const gchar *str,
gint size);
#include "keys.h"
+#ifdef NEED_G_ASCII_STRCASECMP_H
+#include "g_ascii_strcasecmp.h"
+#endif
+
/* temporary block signals to widgets */
BOOL block_advanced_signals;
* If it is a WEP key, no SSID is required! Gray out rhe entry text so
* it doesn't create confusion ...
*/
- if (g_strcasecmp(type_text,AIRPCAP_WEP_KEY_STRING) == 0)
+ if (g_ascii_strcasecmp(type_text,AIRPCAP_WEP_KEY_STRING) == 0)
{
gtk_widget_set_sensitive(edit_ssid_te,FALSE);
/*
gtk_label_set_text(GTK_LABEL(key_lb),"Key");
gtk_label_set_text(GTK_LABEL(ssid_lb),"");
}
- else if (g_strcasecmp(type_text,AIRPCAP_WPA_BIN_KEY_STRING) == 0)
+ else if (g_ascii_strcasecmp(type_text,AIRPCAP_WPA_BIN_KEY_STRING) == 0)
{
gtk_widget_set_sensitive(edit_ssid_te,FALSE);
/*
gtk_label_set_text(GTK_LABEL(key_lb),"Key");
gtk_label_set_text(GTK_LABEL(ssid_lb),"");
}
- else if (g_strcasecmp(type_text,AIRPCAP_WPA_PWD_KEY_STRING) == 0)
+ else if (g_ascii_strcasecmp(type_text,AIRPCAP_WPA_PWD_KEY_STRING) == 0)
{
gtk_widget_set_sensitive(edit_ssid_te,TRUE);
/*
* If it is a WEP key, no SSID is required! Gray out rhe entry text so
* it doesn't create confusion ...
*/
- if (g_strcasecmp(type_text,AIRPCAP_WEP_KEY_STRING) == 0)
+ if (g_ascii_strcasecmp(type_text,AIRPCAP_WEP_KEY_STRING) == 0)
{
gtk_widget_set_sensitive(add_ssid_te,FALSE);
/*
gtk_label_set_text(GTK_LABEL(key_lb),"Key");
gtk_label_set_text(GTK_LABEL(ssid_lb),"");
}
- else if (g_strcasecmp(type_text,AIRPCAP_WPA_BIN_KEY_STRING) == 0)
+ else if (g_ascii_strcasecmp(type_text,AIRPCAP_WPA_BIN_KEY_STRING) == 0)
{
gtk_widget_set_sensitive(add_ssid_te,FALSE);
/*
gtk_label_set_text(GTK_LABEL(key_lb),"Key");
gtk_label_set_text(GTK_LABEL(ssid_lb),"");
}
- else if (g_strcasecmp(type_text,AIRPCAP_WPA_PWD_KEY_STRING) == 0)
+ else if (g_ascii_strcasecmp(type_text,AIRPCAP_WPA_PWD_KEY_STRING) == 0)
{
gtk_widget_set_sensitive(add_ssid_te,TRUE);
/*
gboolean
string_is_not_empty(gchar *s)
{
- if (g_strcasecmp(s,"") != 0)
+ if (g_ascii_strcasecmp(s,"") != 0)
return TRUE;
else
return FALSE;
if ( !block_advanced_signals && (data != NULL) && (w != NULL) )
{
- if ((g_strcasecmp("",s)))
+ if ((g_ascii_strcasecmp("",s)))
{
airpcap_if_selected->CrcValidationOn = airpcap_get_validation_type(s);
airpcap_if_selected->saved = FALSE;
if ( !block_advanced_signals && (data != NULL) && (w != NULL) )
{
s = gtk_entry_get_text(GTK_ENTRY(w));
- if ((g_strcasecmp("",s)))
+ if ((g_ascii_strcasecmp("",s)))
{
if (airpcap_if_selected != NULL)
{
if ( !block_advanced_signals && (data != NULL) && (w != NULL) )
{
s = gtk_entry_get_text(GTK_ENTRY(w));
- if ((g_strcasecmp("",s)))
+ if ((g_ascii_strcasecmp("",s)))
{
if (airpcap_if_selected != NULL)
{
if ( !block_advanced_signals && (data != NULL) && (w != NULL) )
{
- if ((g_strcasecmp("",s)))
+ if ((g_ascii_strcasecmp("",s)))
{
airpcap_if_selected->linkType = airpcap_get_link_type(s);
airpcap_if_selected->saved = FALSE;
"- Close all the airpcap-based applications.\n"\
"- Have administrative privileges."
/* Set the Decryption Mode */
- if (g_strcasecmp(gtk_entry_get_text(GTK_ENTRY(decryption_en)),AIRPCAP_DECRYPTION_TYPE_STRING_WIRESHARK) == 0)
+ if (g_ascii_strcasecmp(gtk_entry_get_text(GTK_ENTRY(decryption_en)),AIRPCAP_DECRYPTION_TYPE_STRING_WIRESHARK) == 0)
{
set_wireshark_decryption(TRUE);
if (!set_airpcap_decryption(FALSE)) simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK, CANT_SAVE_ERR_STR);
}
- else if (g_strcasecmp(gtk_entry_get_text(GTK_ENTRY(decryption_en)),AIRPCAP_DECRYPTION_TYPE_STRING_AIRPCAP) == 0)
+ else if (g_ascii_strcasecmp(gtk_entry_get_text(GTK_ENTRY(decryption_en)),AIRPCAP_DECRYPTION_TYPE_STRING_AIRPCAP) == 0)
{
set_wireshark_decryption(FALSE);
if (!set_airpcap_decryption(TRUE)) simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK, CANT_SAVE_ERR_STR);
}
- else if (g_strcasecmp(gtk_entry_get_text(GTK_ENTRY(decryption_en)),AIRPCAP_DECRYPTION_TYPE_STRING_NONE) == 0)
+ else if (g_ascii_strcasecmp(gtk_entry_get_text(GTK_ENTRY(decryption_en)),AIRPCAP_DECRYPTION_TYPE_STRING_NONE) == 0)
{
set_wireshark_decryption(FALSE);
if (!set_airpcap_decryption(FALSE)) simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK, CANT_SAVE_ERR_STR);
airpcap_save_selected_if_configuration(airpcap_if_selected);
/* Update toolbar (only if airpcap_if_selected is airpcap_if_active)*/
- if ( g_strcasecmp(airpcap_if_selected->description,airpcap_if_active->description) == 0)
+ if ( g_ascii_strcasecmp(airpcap_if_selected->description,airpcap_if_active->description) == 0)
{
gtk_label_set_text(GTK_LABEL(toolbar_if_lb), g_strdup_printf("%s %s\t","Current Wireless Interface: #",airpcap_get_if_string_number(airpcap_if_selected)));
airpcap_update_channel_combo(GTK_WIDGET(toolbar_channel_cm),airpcap_if_selected);
gtk_timeout_remove(airpcap_if_selected->tag);
/* Update toolbar (only if airpcap_if_selected is airpcap_if_active)*/
- if ( g_strcasecmp(airpcap_if_selected->description,airpcap_if_active->description) == 0)
+ if ( g_ascii_strcasecmp(airpcap_if_selected->description,airpcap_if_active->description) == 0)
{
gtk_label_set_text(GTK_LABEL(toolbar_if_lb), g_strdup_printf("%s %s\t","Current Wireless Interface: #",airpcap_get_if_string_number(airpcap_if_selected)));
airpcap_update_channel_combo(GTK_WIDGET(toolbar_channel_cm),airpcap_if_selected);
g_strchomp(new_ssid_string->str);
/* Check which type of key the user has entered */
- if (g_strcasecmp(new_type_string->str,AIRPCAP_WEP_KEY_STRING) == 0) /* WEP key */
+ if (g_ascii_strcasecmp(new_type_string->str,AIRPCAP_WEP_KEY_STRING) == 0) /* WEP key */
{
if ( ((new_key_string->len) > WEP_KEY_MAX_CHAR_SIZE) || ((new_key_string->len) < WEP_KEY_MIN_CHAR_SIZE))
if (airpcap_if_selected != NULL) airpcap_if_selected->saved = FALSE;
}
- else if (g_strcasecmp(new_type_string->str,AIRPCAP_WPA_PWD_KEY_STRING) == 0) /* WPA Key */
+ else if (g_ascii_strcasecmp(new_type_string->str,AIRPCAP_WPA_PWD_KEY_STRING) == 0) /* WPA Key */
{
/* XXX - Perform some WPA related input fields check */
/* If everything is ok, modify the entry int he list */
if (airpcap_if_selected != NULL) airpcap_if_selected->saved = FALSE;
}
- else if (g_strcasecmp(new_type_string->str,AIRPCAP_WPA_BIN_KEY_STRING) == 0) /* WPA_BIN Key */
+ else if (g_ascii_strcasecmp(new_type_string->str,AIRPCAP_WPA_BIN_KEY_STRING) == 0) /* WPA_BIN Key */
{
/* XXX - Perform some WPA_BIN related input fields check */
/* If everything is ok, modify the entry int he list */
g_strchomp(new_ssid_string->str);
/* Check which type of key the user has entered */
- if (g_strcasecmp(new_type_string->str,AIRPCAP_WEP_KEY_STRING) == 0) /* WEP key */
+ if (g_ascii_strcasecmp(new_type_string->str,AIRPCAP_WEP_KEY_STRING) == 0) /* WEP key */
{
if ( ((new_key_string->len) > WEP_KEY_MAX_CHAR_SIZE) || ((new_key_string->len) < WEP_KEY_MIN_CHAR_SIZE))
if (airpcap_if_selected != NULL) airpcap_if_selected->saved = FALSE;
}
- else if (g_strcasecmp(new_type_string->str,AIRPCAP_WPA_PWD_KEY_STRING) == 0) /* WPA Key */
+ else if (g_ascii_strcasecmp(new_type_string->str,AIRPCAP_WPA_PWD_KEY_STRING) == 0) /* WPA Key */
{
/* XXX - Perform some WPA related input fields check */
/* If everything is ok, modify the entry int he list */
if (airpcap_if_selected != NULL) airpcap_if_selected->saved = FALSE;
}
- else if (g_strcasecmp(new_type_string->str,AIRPCAP_WPA_BIN_KEY_STRING) == 0) /* WPA_BIN Key */
+ else if (g_ascii_strcasecmp(new_type_string->str,AIRPCAP_WPA_BIN_KEY_STRING) == 0) /* WPA_BIN Key */
{
/* XXX - Perform some WPA_BIN related input fields check */
/* If everything is ok, modify the entry int he list */
gtk_widget_set_name (edit_ssid_te, "edit_ssid_te");
/* Set current ssid (if key type is not WEP!)*/
- if (g_strcasecmp(row_type,AIRPCAP_WEP_KEY_STRING) == 0)
+ if (g_ascii_strcasecmp(row_type,AIRPCAP_WEP_KEY_STRING) == 0)
{
gtk_widget_set_sensitive(edit_ssid_te,FALSE);
}
* and then when the 'new text' is added ("new text"). We don't really
* care about the first time, and we just return.
*/
- if (g_strcasecmp(gtk_entry_get_text(decryption_en),"") == 0)
+ if (g_ascii_strcasecmp(gtk_entry_get_text(decryption_en),"") == 0)
return;
- if (g_strcasecmp(gtk_entry_get_text(decryption_en),AIRPCAP_DECRYPTION_TYPE_STRING_WIRESHARK) == 0)
+ if (g_ascii_strcasecmp(gtk_entry_get_text(decryption_en),AIRPCAP_DECRYPTION_TYPE_STRING_WIRESHARK) == 0)
{
set_wireshark_decryption(TRUE);
if (!set_airpcap_decryption(FALSE)) simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK, CANT_SAVE_ERR_STR);
}
- else if (g_strcasecmp(gtk_entry_get_text(decryption_en),AIRPCAP_DECRYPTION_TYPE_STRING_AIRPCAP) == 0)
+ else if (g_ascii_strcasecmp(gtk_entry_get_text(decryption_en),AIRPCAP_DECRYPTION_TYPE_STRING_AIRPCAP) == 0)
{
set_wireshark_decryption(FALSE);
if (!set_airpcap_decryption(TRUE)) simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK, CANT_SAVE_ERR_STR);
}
- else if (g_strcasecmp(gtk_entry_get_text(decryption_en),AIRPCAP_DECRYPTION_TYPE_STRING_NONE) == 0)
+ else if (g_ascii_strcasecmp(gtk_entry_get_text(decryption_en),AIRPCAP_DECRYPTION_TYPE_STRING_NONE) == 0)
{
set_wireshark_decryption(FALSE);
if (!set_airpcap_decryption(FALSE)) simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK, CANT_SAVE_ERR_STR);
else
{
/* The last decryption mode was 'Driver', but no more AirPcap adapter are found */
- if (g_strcasecmp(current_text,AIRPCAP_DECRYPTION_TYPE_STRING_AIRPCAP) == 0)
+ if (g_ascii_strcasecmp(current_text,AIRPCAP_DECRYPTION_TYPE_STRING_AIRPCAP) == 0)
{
if (current_text != NULL) g_free(current_text);
gtk_timeout_remove(airpcap_if_selected->tag);
/* Update toolbar (only if airpcap_if_selected is airpcap_if_active)*/
- if ( g_strcasecmp(airpcap_if_selected->description,airpcap_if_active->description) == 0)
+ if ( g_ascii_strcasecmp(airpcap_if_selected->description,airpcap_if_active->description) == 0)
{
gtk_label_set_text(GTK_LABEL(toolbar_if_lb), g_strdup_printf("%s %s\t","Current Wireless Interface: #",airpcap_get_if_string_number(airpcap_if_selected)));
airpcap_update_channel_combo(GTK_WIDGET(toolbar_channel_cm),airpcap_if_selected);
#include "keys.h"
+#ifdef NEED_G_ASCII_STRCASECMP_H
+#include "g_ascii_strcasecmp.h"
+#endif
+
/* Controls the releay of settings back to the adapter. */
gboolean change_airpcap_settings = FALSE;
{
current_item = g_list_nth(airpcap_if_list,i);
current_adapter = (airpcap_if_info_t*)current_item->data;
- if(current_adapter != if_info && g_strncasecmp("AirPcap USB wireless capture adapter nr.", current_adapter->description, 40) == 0)
+ if(current_adapter != if_info && g_ascii_strncasecmp("AirPcap USB wireless capture adapter nr.", current_adapter->description, 40) == 0)
{
g_string_sprintfa(freq_str, "%s%s", sep,
ieee80211_mhz_to_str(current_adapter->channelInfo.Frequency));
AirpcapValidationType
airpcap_get_validation_type(const gchar* name)
{
- if(!(g_strcasecmp(AIRPCAP_VALIDATION_TYPE_NAME_ALL,name)))
+ if(!(g_ascii_strcasecmp(AIRPCAP_VALIDATION_TYPE_NAME_ALL,name)))
{
return AIRPCAP_VT_ACCEPT_EVERYTHING;
}
- else if(!(g_strcasecmp(AIRPCAP_VALIDATION_TYPE_NAME_CORRECT,name)))
+ else if(!(g_ascii_strcasecmp(AIRPCAP_VALIDATION_TYPE_NAME_CORRECT,name)))
{
return AIRPCAP_VT_ACCEPT_CORRECT_FRAMES;
}
- else if(!(g_strcasecmp(AIRPCAP_VALIDATION_TYPE_NAME_CORRUPT,name)))
+ else if(!(g_ascii_strcasecmp(AIRPCAP_VALIDATION_TYPE_NAME_CORRUPT,name)))
{
return AIRPCAP_VT_ACCEPT_CORRUPT_FRAMES;
}
AirpcapLinkType
airpcap_get_link_type(const gchar* name)
{
- if(!(g_strcasecmp(AIRPCAP_LINK_TYPE_NAME_802_11_ONLY,name))){
+ if(!(g_ascii_strcasecmp(AIRPCAP_LINK_TYPE_NAME_802_11_ONLY,name))){
return AIRPCAP_LT_802_11;
- }else if(!(g_strcasecmp(AIRPCAP_LINK_TYPE_NAME_802_11_PLUS_RADIO,name))){
+ }else if(!(g_ascii_strcasecmp(AIRPCAP_LINK_TYPE_NAME_802_11_PLUS_RADIO,name))){
return AIRPCAP_LT_802_11_PLUS_RADIO;
- }else if(!(g_strcasecmp(AIRPCAP_LINK_TYPE_NAME_802_11_PLUS_PPI,name))){
+ }else if(!(g_ascii_strcasecmp(AIRPCAP_LINK_TYPE_NAME_802_11_PLUS_PPI,name))){
return AIRPCAP_LT_802_11_PLUS_PPI;
}else{
return AIRPCAP_LT_UNKNOWN;
int
airpcap_if_is_any(airpcap_if_info_t* if_info)
{
- if(g_strcasecmp(if_info->name,AIRPCAP_DEVICE_ANY_EXTRACT_STRING)==0)
+ if(g_ascii_strcasecmp(if_info->name,AIRPCAP_DEVICE_ANY_EXTRACT_STRING)==0)
return 1;
else
return 0;
gtk_clist_get_text(GTK_CLIST(key_ls),i,1,&row_key);
gtk_clist_get_text(GTK_CLIST(key_ls),i,2,&row_ssid);
- if(g_strcasecmp(row_type,AIRPCAP_WEP_KEY_STRING) == 0)
+ if(g_ascii_strcasecmp(row_type,AIRPCAP_WEP_KEY_STRING) == 0)
KeysCollection->Keys[i].KeyType = AIRPDCAP_KEY_TYPE_WEP;
- else if(g_strcasecmp(row_type,AIRPCAP_WPA_PWD_KEY_STRING) == 0)
+ else if(g_ascii_strcasecmp(row_type,AIRPCAP_WPA_PWD_KEY_STRING) == 0)
KeysCollection->Keys[i].KeyType = AIRPCAP_KEYTYPE_TKIP;
- else if(g_strcasecmp(row_type,AIRPCAP_WPA_BIN_KEY_STRING) == 0)
+ else if(g_ascii_strcasecmp(row_type,AIRPCAP_WPA_BIN_KEY_STRING) == 0)
KeysCollection->Keys[i].KeyType = AIRPCAP_KEYTYPE_CCMP;
/* Retrieve the Item corresponding to the i-th key */
gtk_clist_get_text(GTK_CLIST(key_ls),i,1,&row_key);
gtk_clist_get_text(GTK_CLIST(key_ls),i,2,&row_ssid);
- if(g_strcasecmp(row_type,AIRPCAP_WEP_KEY_STRING) == 0)
+ if(g_ascii_strcasecmp(row_type,AIRPCAP_WEP_KEY_STRING) == 0)
KeysCollection->Keys[i].KeyType = AIRPDCAP_KEY_TYPE_WEP;
- else if(g_strcasecmp(row_type,AIRPCAP_WPA_PWD_KEY_STRING) == 0)
+ else if(g_ascii_strcasecmp(row_type,AIRPCAP_WPA_PWD_KEY_STRING) == 0)
KeysCollection->Keys[i].KeyType = AIRPDCAP_KEY_TYPE_WPA_PWD;
- else if(g_strcasecmp(row_type,AIRPCAP_WPA_BIN_KEY_STRING) == 0)
+ else if(g_ascii_strcasecmp(row_type,AIRPCAP_WPA_BIN_KEY_STRING) == 0)
KeysCollection->Keys[i].KeyType = AIRPDCAP_KEY_TYPE_WPA_PMK;
/* Retrieve the Item corresponding to the i-th key */
gtk_clist_get_text(GTK_CLIST(key_ls),i,1,&tmp_key);
gtk_clist_get_text(GTK_CLIST(key_ls),i,2,&tmp_ssid);
- if(g_strcasecmp(tmp_type,AIRPCAP_WEP_KEY_STRING) == 0)
+ if(g_ascii_strcasecmp(tmp_type,AIRPCAP_WEP_KEY_STRING) == 0)
{
tmp_dk = (decryption_key_t*)g_malloc(sizeof(decryption_key_t));
tmp_dk->key = g_string_new(tmp_key);
tmp_dk->bits = tmp_dk->key->len * 4;
key_list = g_list_append(key_list,tmp_dk);
}
- else if(g_strcasecmp(tmp_type,AIRPCAP_WPA_PWD_KEY_STRING) == 0)
+ else if(g_ascii_strcasecmp(tmp_type,AIRPCAP_WPA_PWD_KEY_STRING) == 0)
{
tmp_dk = (decryption_key_t*)g_malloc(sizeof(decryption_key_t));
tmp_dk->key = g_string_new(tmp_key);
tmp_dk->bits = 256;
key_list = g_list_append(key_list,tmp_dk);
}
- else if(g_strcasecmp(tmp_type,AIRPCAP_WPA_BIN_KEY_STRING) == 0)
+ else if(g_ascii_strcasecmp(tmp_type,AIRPCAP_WPA_BIN_KEY_STRING) == 0)
{
tmp_dk = (decryption_key_t*)g_malloc(sizeof(decryption_key_t));
tmp_dk->key = g_string_new(tmp_key);
#include "airpcap_dlg.h"
#endif
+#ifdef NEED_G_ASCII_STRCASECMP_H
+#include "g_ascii_strcasecmp.h"
+#endif
+
/*
* Keep a static pointer to the current "Capture Interfaces" window, if
* any, so that if somebody tries to do "Capture:Start" while there's
if (first != NULL && first->description != NULL &&
second != NULL && second->description != NULL) {
- return g_strcasecmp(first->description, second->description);
+ return g_ascii_strcasecmp(first->description, second->description);
} else {
return 0;
}
#include "decode_as_ber.h"
#include "help_dlg.h"
+#ifdef NEED_G_ASCII_STRCASECMP_H
+#include "g_ascii_strcasecmp.h"
+#endif
+
#undef DEBUG
/**************************************************/
#include <epan/expert.h>
#include <epan/emem.h>
+#ifdef NEED_G_ASCII_STRCASECMP_H
+#include "g_ascii_strcasecmp.h"
+#endif
+
#define GTK_MENU_FUNC(a) ((GtkItemFactoryCallback)(a))
#define SORT_ALPHABETICAL 0
/* XXX - remove this later again, when dlg_xx function cleanup done */
#include "dlg_utils.h"
+#ifdef NEED_G_ASCII_STRCASECMP_H
+#include "g_ascii_strcasecmp.h"
+#endif
+
#define WINDOW_GEOM_KEY "window_geom"
geom.height = strtol(value, NULL, 10);
geom.set_size = TRUE;
} else if (strcmp(key, "maximized") == 0) {
- if (strcasecmp(value, "true") == 0) {
+ if (g_ascii_strcasecmp(value, "true") == 0) {
geom.maximized = TRUE;
}
else {
/* Davide Schiera (2006-11-22) ---------------------------------------------- */
#endif
+#ifdef NEED_G_ASCII_STRCASECMP_H
+#include "g_ascii_strcasecmp.h"
+#endif
+
/*
* Files under personal and global preferences directories in which
* GTK settings for Wireshark are stored.
if ((data != NULL) && (w != NULL) && change_airpcap_settings) {
s = gtk_entry_get_text(GTK_ENTRY(w));
- if ((g_strcasecmp("",s))) {
+ if ((g_ascii_strcasecmp("",s))) {
ch_freq = airpcap_get_frequency_from_str(s);
if (airpcap_if_active != NULL) {
airpcap_if_active->channelInfo.Frequency = ch_freq;
if ((data != NULL) && (w != NULL) && change_airpcap_settings)
{
s = gtk_entry_get_text(GTK_ENTRY(w));
- if ((g_strcasecmp("",s)))
+ if ((g_ascii_strcasecmp("",s)))
{
if (airpcap_if_active != NULL)
{
#include "export_object.h"
#endif
+#ifdef NEED_G_ASCII_STRCASECMP_H
+#include "g_ascii_strcasecmp.h"
+#endif
+
GtkWidget *popup_menu_object;
static void
if (!widget_cf_name ||
#ifdef _WIN32
/* do a case insensitive compare on win32 */
-#if GLIB_MAJOR_VERSION < 2
- g_strncasecmp(widget_cf_name, normalized_cf_name, 1000) == 0 ||
-#else
g_ascii_strncasecmp(widget_cf_name, normalized_cf_name, 1000) == 0 ||
-#endif
#else /* _WIN32 */
/* do a case sensitive compare on unix */
strncmp(widget_cf_name, normalized_cf_name, 1000) == 0 ||
#include "../tap_dfilter_dlg.h"
#include "gui_utils.h"
+#ifdef NEED_G_ASCII_STRCASECMP_H
+#include "g_ascii_strcasecmp.h"
+#endif
+
#define NUM_TIMESTATS 10
/* calculate time delta between request and response */
nstime_delta(&delta, &pinfo->fd->abs_ts, &mi->req_time);
- if (strncasecmp(mi->code, "EPCF", 4) == 0 ) {
+ if (g_ascii_strncasecmp(mi->code, "EPCF", 4) == 0 ) {
time_stat_update(&(ms->rtd[0]),&delta, pinfo);
}
- else if (strncasecmp(mi->code, "CRCX", 4) == 0 ) {
+ else if (g_ascii_strncasecmp(mi->code, "CRCX", 4) == 0 ) {
time_stat_update(&(ms->rtd[1]),&delta, pinfo);
}
- else if (strncasecmp(mi->code, "MDCX", 4) == 0 ) {
+ else if (g_ascii_strncasecmp(mi->code, "MDCX", 4) == 0 ) {
time_stat_update(&(ms->rtd[2]),&delta, pinfo);
}
- else if (strncasecmp(mi->code, "DLCX", 4) == 0 ) {
+ else if (g_ascii_strncasecmp(mi->code, "DLCX", 4) == 0 ) {
time_stat_update(&(ms->rtd[3]),&delta, pinfo);
}
- else if (strncasecmp(mi->code, "RQNT", 4) == 0 ) {
+ else if (g_ascii_strncasecmp(mi->code, "RQNT", 4) == 0 ) {
time_stat_update(&(ms->rtd[4]),&delta, pinfo);
}
- else if (strncasecmp(mi->code, "NTFY", 4) == 0 ) {
+ else if (g_ascii_strncasecmp(mi->code, "NTFY", 4) == 0 ) {
time_stat_update(&(ms->rtd[5]),&delta, pinfo);
}
- else if (strncasecmp(mi->code, "AUEP", 4) == 0 ) {
+ else if (g_ascii_strncasecmp(mi->code, "AUEP", 4) == 0 ) {
time_stat_update(&(ms->rtd[6]),&delta, pinfo);
}
- else if (strncasecmp(mi->code, "AUCX", 4) == 0 ) {
+ else if (g_ascii_strncasecmp(mi->code, "AUCX", 4) == 0 ) {
time_stat_update(&(ms->rtd[7]),&delta, pinfo);
}
- else if (strncasecmp(mi->code, "RSIP", 4) == 0 ) {
+ else if (g_ascii_strncasecmp(mi->code, "RSIP", 4) == 0 ) {
time_stat_update(&(ms->rtd[8]),&delta, pinfo);
}
else {
#endif
#endif
+#ifdef NEED_G_ASCII_STRCASECMP_H
+#include "g_ascii_strcasecmp.h"
+#endif
+
static void prefs_main_ok_cb(GtkWidget *, gpointer);
static void prefs_main_apply_cb(GtkWidget *, gpointer);
static void prefs_main_save_cb(GtkWidget *, gpointer);
gtk_label_get(GTK_LABEL(label), &label_string);
for (i = 0; enumvals[i].name != NULL; i++) {
- if (strcasecmp(label_string, enumvals[i].description) == 0) {
+ if (g_ascii_strcasecmp(label_string, enumvals[i].description) == 0) {
return enumvals[i].value;
}
}
decryption_cm = GTK_WIDGET(OBJECT_GET_DATA(airpcap_tb,AIRPCAP_TOOLBAR_DECRYPTION_KEY));
decryption_en = GTK_WIDGET(GTK_ENTRY(GTK_COMBO(decryption_cm)->entry));
-if( g_strcasecmp(gtk_entry_get_text(GTK_ENTRY(decryption_en)),AIRPCAP_DECRYPTION_TYPE_STRING_WIRESHARK) == 0 )
+if( g_ascii_strcasecmp(gtk_entry_get_text(GTK_ENTRY(decryption_en)),AIRPCAP_DECRYPTION_TYPE_STRING_WIRESHARK) == 0 )
{
wireshark_decryption_was_enabled = TRUE;
airpcap_decryption_was_enabled = FALSE;
}
-else if( g_strcasecmp(gtk_entry_get_text(GTK_ENTRY(decryption_en)),AIRPCAP_DECRYPTION_TYPE_STRING_AIRPCAP) == 0 )
+else if( g_ascii_strcasecmp(gtk_entry_get_text(GTK_ENTRY(decryption_en)),AIRPCAP_DECRYPTION_TYPE_STRING_AIRPCAP) == 0 )
{
wireshark_decryption_was_enabled = FALSE;
airpcap_decryption_was_enabled = TRUE;
}
-else if( g_strcasecmp(gtk_entry_get_text(GTK_ENTRY(decryption_en)),AIRPCAP_DECRYPTION_TYPE_STRING_NONE) == 0 )
+else if( g_ascii_strcasecmp(gtk_entry_get_text(GTK_ENTRY(decryption_en)),AIRPCAP_DECRYPTION_TYPE_STRING_NONE) == 0 )
{
wireshark_decryption_was_enabled = FALSE;
airpcap_decryption_was_enabled = FALSE;
#include "file_util.h"
#include "u3.h"
+#ifdef NEED_G_ASCII_STRCASECMP_H
+#include "g_ascii_strcasecmp.h"
+#endif
+
#define RECENT_KEY_MAIN_TOOLBAR_SHOW "gui.toolbar_main_show"
#define RECENT_KEY_FILTER_TOOLBAR_SHOW "gui.filter_toolbar_show"
#define RECENT_KEY_AIRPCAP_TOOLBAR_SHOW "gui.airpcap_toolbar_show"
char *p;
if (strcmp(key, RECENT_KEY_MAIN_TOOLBAR_SHOW) == 0) {
- if (strcasecmp(value, "true") == 0) {
+ if (g_ascii_strcasecmp(value, "true") == 0) {
recent.main_toolbar_show = TRUE;
}
else {
recent.main_toolbar_show = FALSE;
}
} else if (strcmp(key, RECENT_KEY_FILTER_TOOLBAR_SHOW) == 0) {
- if (strcasecmp(value, "true") == 0) {
+ if (g_ascii_strcasecmp(value, "true") == 0) {
recent.filter_toolbar_show = TRUE;
}
else {
recent.filter_toolbar_show = FALSE;
}
} else if (strcmp(key, RECENT_KEY_AIRPCAP_TOOLBAR_SHOW) == 0) {
- if (strcasecmp(value, "true") == 0) {
+ if (g_ascii_strcasecmp(value, "true") == 0) {
recent.airpcap_toolbar_show = TRUE;
}
else {
recent.airpcap_toolbar_show = FALSE;
}
} else if (strcmp(key, RECENT_KEY_DRIVER_CHECK_SHOW) == 0) {
- if (strcasecmp(value, "true") == 0) {
+ if (g_ascii_strcasecmp(value, "true") == 0) {
recent.airpcap_driver_check_show = TRUE;
}
else {
recent.airpcap_driver_check_show = FALSE;
}
}else if (strcmp(key, RECENT_KEY_PACKET_LIST_SHOW) == 0) {
- if (strcasecmp(value, "true") == 0) {
+ if (g_ascii_strcasecmp(value, "true") == 0) {
recent.packet_list_show = TRUE;
}
else {
recent.packet_list_show = FALSE;
}
} else if (strcmp(key, RECENT_KEY_TREE_VIEW_SHOW) == 0) {
- if (strcasecmp(value, "true") == 0) {
+ if (g_ascii_strcasecmp(value, "true") == 0) {
recent.tree_view_show = TRUE;
}
else {
recent.tree_view_show = FALSE;
}
} else if (strcmp(key, RECENT_KEY_BYTE_VIEW_SHOW) == 0) {
- if (strcasecmp(value, "true") == 0) {
+ if (g_ascii_strcasecmp(value, "true") == 0) {
recent.byte_view_show = TRUE;
}
else {
recent.byte_view_show = FALSE;
}
} else if (strcmp(key, RECENT_KEY_STATUSBAR_SHOW) == 0) {
- if (strcasecmp(value, "true") == 0) {
+ if (g_ascii_strcasecmp(value, "true") == 0) {
recent.statusbar_show = TRUE;
}
else {
recent.statusbar_show = FALSE;
}
} else if (strcmp(key, RECENT_KEY_PACKET_LIST_COLORIZE) == 0) {
- if (strcasecmp(value, "true") == 0) {
+ if (g_ascii_strcasecmp(value, "true") == 0) {
recent.packet_list_colorize = TRUE;
}
else {
return PREFS_SET_SYNTAX_ERR; /* number was bad */
recent.gui_zoom_level = num;
} else if (strcmp(key, RECENT_GUI_GEOMETRY_MAIN_MAXIMIZED) == 0) {
- if (strcasecmp(value, "true") == 0) {
+ if (g_ascii_strcasecmp(value, "true") == 0) {
recent.gui_geometry_main_maximized = TRUE;
}
else {
window_geom_recent_read_pair(win, sub_key, value);
}
} else if (strcmp(key, RECENT_KEY_PRIVS_WARN_IF_ELEVATED) == 0) {
- if (strcasecmp(value, "true") == 0) {
+ if (g_ascii_strcasecmp(value, "true") == 0) {
recent.privs_warn_if_elevated = TRUE;
}
else {
recent.privs_warn_if_elevated = FALSE;
}
} else if (strcmp(key, RECENT_KEY_PRIVS_WARN_IF_NO_NPF) == 0) {
- if (strcasecmp(value, "true") == 0) {
+ if (g_ascii_strcasecmp(value, "true") == 0) {
recent.privs_warn_if_no_npf = TRUE;
}
else {
#include "rtp_stream.h"
#include "rtp_stream_dlg.h"
+#ifdef NEED_G_ASCII_STRCASECMP_H
+#include "g_ascii_strcasecmp.h"
+#endif
+
/****************************************************************************/
size_t i;
for (i = 0; i < NUM_DYN_CLOCK_VALUES; i++) {
- if (strncasecmp(mimetype_and_clock_map[i].pt_mime_name_str,payload_type_str,(strlen(mimetype_and_clock_map[i].pt_mime_name_str))) == 0)
+ if (g_ascii_strncasecmp(mimetype_and_clock_map[i].pt_mime_name_str,payload_type_str,(strlen(mimetype_and_clock_map[i].pt_mime_name_str))) == 0)
return mimetype_and_clock_map[i].value;
}
#endif /* GTK_MAJOR_VERSION >= 2 */
#endif /* HAVE_LIBPORTAUDIO */
+#ifdef NEED_G_ASCII_STRCASECMP_H
+#include "g_ascii_strcasecmp.h"
+#endif
+
const char *voip_call_state_name[8]={
"",
"CALL SETUP",
if ((tmp_listinfo->protocol == VOIP_MGCP) && (tmp_listinfo->call_active_state == VOIP_ACTIVE)){
tmp_mgcpinfo = tmp_listinfo->prot_info;
if (pi->endpointId != NULL){
- if (g_strcasecmp(tmp_mgcpinfo->endpointId,pi->endpointId) == 0){
+ if (g_ascii_strcasecmp(tmp_mgcpinfo->endpointId,pi->endpointId) == 0){
/*
check first if it is an ended call. We can still match packets to this Endpoint 2 seconds
after the call has been released
#include <epan/tap.h>
#include "packet-mgcp.h"
+#ifdef NEED_G_ASCII_STRCASECMP_H
+#include "g_ascii_strcasecmp.h"
+#endif
+
#define TCP_PORT_MGCP_GATEWAY 2427
#define UDP_PORT_MGCP_GATEWAY 2427
#define TCP_PORT_MGCP_CALLAGENT 2727
/* Read the string into 'word' and see if it looks like the start of a verb */
if ((maxlength >= 4) && tvb_get_nstringz0(tvb, offset, sizeof(word), word))
{
- if (((strncasecmp(word, "EPCF", 4) == 0) && (*verb_name = "EndpointConfiguration")) ||
- ((strncasecmp(word, "CRCX", 4) == 0) && (*verb_name = "CreateConnection")) ||
- ((strncasecmp(word, "MDCX", 4) == 0) && (*verb_name = "ModifyConnection")) ||
- ((strncasecmp(word, "DLCX", 4) == 0) && (*verb_name = "DeleteConnection")) ||
- ((strncasecmp(word, "RQNT", 4) == 0) && (*verb_name = "NotificationRequest")) ||
- ((strncasecmp(word, "NTFY", 4) == 0) && (*verb_name = "Notify")) ||
- ((strncasecmp(word, "AUEP", 4) == 0) && (*verb_name = "AuditEndpoint")) ||
- ((strncasecmp(word, "AUCX", 4) == 0) && (*verb_name = "AuditConnection")) ||
- ((strncasecmp(word, "RSIP", 4) == 0) && (*verb_name = "RestartInProgress")) ||
- ((strncasecmp(word, "MESG", 4) == 0) && (*verb_name = "Message")) ||
+ if (((g_ascii_strncasecmp(word, "EPCF", 4) == 0) && (*verb_name = "EndpointConfiguration")) ||
+ ((g_ascii_strncasecmp(word, "CRCX", 4) == 0) && (*verb_name = "CreateConnection")) ||
+ ((g_ascii_strncasecmp(word, "MDCX", 4) == 0) && (*verb_name = "ModifyConnection")) ||
+ ((g_ascii_strncasecmp(word, "DLCX", 4) == 0) && (*verb_name = "DeleteConnection")) ||
+ ((g_ascii_strncasecmp(word, "RQNT", 4) == 0) && (*verb_name = "NotificationRequest")) ||
+ ((g_ascii_strncasecmp(word, "NTFY", 4) == 0) && (*verb_name = "Notify")) ||
+ ((g_ascii_strncasecmp(word, "AUEP", 4) == 0) && (*verb_name = "AuditEndpoint")) ||
+ ((g_ascii_strncasecmp(word, "AUCX", 4) == 0) && (*verb_name = "AuditConnection")) ||
+ ((g_ascii_strncasecmp(word, "RSIP", 4) == 0) && (*verb_name = "RestartInProgress")) ||
+ ((g_ascii_strncasecmp(word, "MESG", 4) == 0) && (*verb_name = "Message")) ||
(word[0] == 'X' && is_rfc2234_alpha(word[1]) && is_rfc2234_alpha(word[2]) &&
is_rfc2234_alpha(word[3]) && (*verb_name = "*Experimental*")))
{
typval = ep_strsplit(tokens[i], "=", 2);
if ((typval[0] != NULL) && (typval[1] != NULL))
{
- if (!strcasecmp(g_strstrip(typval[0]), "PS"))
+ if (!g_ascii_strcasecmp(g_strstrip(typval[0]), "PS"))
{
hf_uint = hf_mgcp_param_connectionparam_ps;
}
- else if (!strcasecmp(g_strstrip(typval[0]), "OS"))
+ else if (!g_ascii_strcasecmp(g_strstrip(typval[0]), "OS"))
{
hf_uint = hf_mgcp_param_connectionparam_os;
}
- else if (!strcasecmp(g_strstrip(typval[0]), "PR"))
+ else if (!g_ascii_strcasecmp(g_strstrip(typval[0]), "PR"))
{
hf_uint = hf_mgcp_param_connectionparam_pr;
}
- else if (!strcasecmp(g_strstrip(typval[0]), "OR"))
+ else if (!g_ascii_strcasecmp(g_strstrip(typval[0]), "OR"))
{
hf_uint = hf_mgcp_param_connectionparam_or;
}
- else if (!strcasecmp(g_strstrip(typval[0]), "PL"))
+ else if (!g_ascii_strcasecmp(g_strstrip(typval[0]), "PL"))
{
hf_uint = hf_mgcp_param_connectionparam_pl;
}
- else if (!strcasecmp(g_strstrip(typval[0]), "JI"))
+ else if (!g_ascii_strcasecmp(g_strstrip(typval[0]), "JI"))
{
hf_uint = hf_mgcp_param_connectionparam_ji;
}
- else if (!strcasecmp(g_strstrip(typval[0]), "LA"))
+ else if (!g_ascii_strcasecmp(g_strstrip(typval[0]), "LA"))
{
hf_uint = hf_mgcp_param_connectionparam_la;
}
- else if (!strcasecmp(g_strstrip(typval[0]), "PC/RPS"))
+ else if (!g_ascii_strcasecmp(g_strstrip(typval[0]), "PC/RPS"))
{
hf_uint = hf_mgcp_param_connectionparam_pcrps;
- } else if (!strcasecmp(g_strstrip(typval[0]), "PC/ROS"))
+ } else if (!g_ascii_strcasecmp(g_strstrip(typval[0]), "PC/ROS"))
{
hf_uint = hf_mgcp_param_connectionparam_pcros;
}
- else if (!strcasecmp(g_strstrip(typval[0]), "PC/RPL"))
+ else if (!g_ascii_strcasecmp(g_strstrip(typval[0]), "PC/RPL"))
{
hf_uint = hf_mgcp_param_connectionparam_pcrpl;
}
- else if (!strcasecmp(g_strstrip(typval[0]), "PC/RJI"))
+ else if (!g_ascii_strcasecmp(g_strstrip(typval[0]), "PC/RJI"))
{
hf_uint = hf_mgcp_param_connectionparam_pcrji;
}
- else if (!strncasecmp(g_strstrip(typval[0]), "X-", 2))
+ else if (!g_ascii_strncasecmp(g_strstrip(typval[0]), "X-", 2))
{
hf_string = hf_mgcp_param_connectionparam_x;
}
typval = ep_strsplit(tokens[i], ":", 2);
if ((typval[0] != NULL) && (typval[1] != NULL))
{
- if (!strcasecmp(g_strstrip(typval[0]), "p"))
+ if (!g_ascii_strcasecmp(g_strstrip(typval[0]), "p"))
{
hf_uint = hf_mgcp_param_localconnoptions_p;
}
- else if (!strcasecmp(g_strstrip(typval[0]), "a"))
+ else if (!g_ascii_strcasecmp(g_strstrip(typval[0]), "a"))
{
hf_string = hf_mgcp_param_localconnoptions_a;
}
- else if (!strcasecmp(g_strstrip(typval[0]), "s"))
+ else if (!g_ascii_strcasecmp(g_strstrip(typval[0]), "s"))
{
hf_string = hf_mgcp_param_localconnoptions_s;
}
- else if (!strcasecmp(g_strstrip(typval[0]), "e"))
+ else if (!g_ascii_strcasecmp(g_strstrip(typval[0]), "e"))
{
hf_string = hf_mgcp_param_localconnoptions_e;
}
- else if (!strcasecmp(g_strstrip(typval[0]), "sc-rtp"))
+ else if (!g_ascii_strcasecmp(g_strstrip(typval[0]), "sc-rtp"))
{
hf_string = hf_mgcp_param_localconnoptions_scrtp;
}
- else if (!strcasecmp(g_strstrip(typval[0]), "sc-rtcp"))
+ else if (!g_ascii_strcasecmp(g_strstrip(typval[0]), "sc-rtcp"))
{
hf_string = hf_mgcp_param_localconnoptions_scrtcp;
}
- else if (!strcasecmp(g_strstrip(typval[0]), "b"))
+ else if (!g_ascii_strcasecmp(g_strstrip(typval[0]), "b"))
{
hf_string = hf_mgcp_param_localconnoptions_b;
}
- else if (!strcasecmp(g_strstrip(typval[0]), "es-ccd"))
+ else if (!g_ascii_strcasecmp(g_strstrip(typval[0]), "es-ccd"))
{
hf_string = hf_mgcp_param_localconnoptions_esccd;
}
- else if (!strcasecmp(g_strstrip(typval[0]), "es-cci"))
+ else if (!g_ascii_strcasecmp(g_strstrip(typval[0]), "es-cci"))
{
hf_string = hf_mgcp_param_localconnoptions_escci;
}
- else if (!strcasecmp(g_strstrip(typval[0]), "dq-gi"))
+ else if (!g_ascii_strcasecmp(g_strstrip(typval[0]), "dq-gi"))
{
hf_string = hf_mgcp_param_localconnoptions_dqgi;
}
- else if (!strcasecmp(g_strstrip(typval[0]), "dq-rd"))
+ else if (!g_ascii_strcasecmp(g_strstrip(typval[0]), "dq-rd"))
{
hf_string = hf_mgcp_param_localconnoptions_dqrd;
}
- else if (!strcasecmp(g_strstrip(typval[0]), "dq-ri"))
+ else if (!g_ascii_strcasecmp(g_strstrip(typval[0]), "dq-ri"))
{
hf_string = hf_mgcp_param_localconnoptions_dqri;
}
- else if (!strcasecmp(g_strstrip(typval[0]), "dq-rr"))
+ else if (!g_ascii_strcasecmp(g_strstrip(typval[0]), "dq-rr"))
{
hf_string = hf_mgcp_param_localconnoptions_dqrr;
}
- else if (!strcasecmp(g_strstrip(typval[0]), "k"))
+ else if (!g_ascii_strcasecmp(g_strstrip(typval[0]), "k"))
{
hf_string = hf_mgcp_param_localconnoptions_k;
}
- else if (!strcasecmp(g_strstrip(typval[0]), "gc"))
+ else if (!g_ascii_strcasecmp(g_strstrip(typval[0]), "gc"))
{
hf_uint = hf_mgcp_param_localconnoptions_gc;
}
- else if (!strcasecmp(g_strstrip(typval[0]), "fmtp"))
+ else if (!g_ascii_strcasecmp(g_strstrip(typval[0]), "fmtp"))
{
hf_string = hf_mgcp_param_localconnoptions_fmtp;
}
- else if (!strcasecmp(g_strstrip(typval[0]), "nt"))
+ else if (!g_ascii_strcasecmp(g_strstrip(typval[0]), "nt"))
{
hf_string = hf_mgcp_param_localconnoptions_nt;
}
- else if (!strcasecmp(g_strstrip(typval[0]), "o-fmtp"))
+ else if (!g_ascii_strcasecmp(g_strstrip(typval[0]), "o-fmtp"))
{
hf_string = hf_mgcp_param_localconnoptions_ofmtp;
}
- else if (!strcasecmp(g_strstrip(typval[0]), "r"))
+ else if (!g_ascii_strcasecmp(g_strstrip(typval[0]), "r"))
{
hf_string = hf_mgcp_param_localconnoptions_r;
}
- else if (!strcasecmp(g_strstrip(typval[0]), "t"))
+ else if (!g_ascii_strcasecmp(g_strstrip(typval[0]), "t"))
{
hf_string = hf_mgcp_param_localconnoptions_t;
}
- else if (!strcasecmp(g_strstrip(typval[0]), "r-cnf"))
+ else if (!g_ascii_strcasecmp(g_strstrip(typval[0]), "r-cnf"))
{
hf_string = hf_mgcp_param_localconnoptions_rcnf;
}
- else if (!strcasecmp(g_strstrip(typval[0]), "r-dir"))
+ else if (!g_ascii_strcasecmp(g_strstrip(typval[0]), "r-dir"))
{
hf_string = hf_mgcp_param_localconnoptions_rdir;
}
- else if (!strcasecmp(g_strstrip(typval[0]), "r-sh"))
+ else if (!g_ascii_strcasecmp(g_strstrip(typval[0]), "r-sh"))
{
hf_string = hf_mgcp_param_localconnoptions_rsh;
}
#include "epan/dissectors/packet-mgcp.h"
#include "timestats.h"
+#ifdef NEED_G_ASCII_STRCASECMP_H
+#include "g_ascii_strcasecmp.h"
+#endif
+
#define NUM_TIMESTATS 11
/* used to keep track of the statistics for an entire program interface */
time_stat_update(&(ms->rtd[0]),&delta, pinfo);
- if (strncasecmp(mi->code, "EPCF", 4) == 0 ) {
+ if (g_ascii_strncasecmp(mi->code, "EPCF", 4) == 0 ) {
time_stat_update(&(ms->rtd[1]),&delta, pinfo);
}
- else if (strncasecmp(mi->code, "CRCX", 4) == 0 ) {
+ else if (g_ascii_strncasecmp(mi->code, "CRCX", 4) == 0 ) {
time_stat_update(&(ms->rtd[2]),&delta, pinfo);
}
- else if (strncasecmp(mi->code, "MDCX", 4) == 0 ) {
+ else if (g_ascii_strncasecmp(mi->code, "MDCX", 4) == 0 ) {
time_stat_update(&(ms->rtd[3]),&delta, pinfo);
}
- else if (strncasecmp(mi->code, "DLCX", 4) == 0 ) {
+ else if (g_ascii_strncasecmp(mi->code, "DLCX", 4) == 0 ) {
time_stat_update(&(ms->rtd[4]),&delta, pinfo);
}
- else if (strncasecmp(mi->code, "RQNT", 4) == 0 ) {
+ else if (g_ascii_strncasecmp(mi->code, "RQNT", 4) == 0 ) {
time_stat_update(&(ms->rtd[5]),&delta, pinfo);
}
- else if (strncasecmp(mi->code, "NTFY", 4) == 0 ) {
+ else if (g_ascii_strncasecmp(mi->code, "NTFY", 4) == 0 ) {
time_stat_update(&(ms->rtd[6]),&delta, pinfo);
}
- else if (strncasecmp(mi->code, "AUEP", 4) == 0 ) {
+ else if (g_ascii_strncasecmp(mi->code, "AUEP", 4) == 0 ) {
time_stat_update(&(ms->rtd[7]),&delta, pinfo);
}
- else if (strncasecmp(mi->code, "AUCX", 4) == 0 ) {
+ else if (g_ascii_strncasecmp(mi->code, "AUCX", 4) == 0 ) {
time_stat_update(&(ms->rtd[8]),&delta, pinfo);
}
- else if (strncasecmp(mi->code, "RSIP", 4) == 0 ) {
+ else if (g_ascii_strncasecmp(mi->code, "RSIP", 4) == 0 ) {
time_stat_update(&(ms->rtd[9]),&delta, pinfo);
}
else {
#include "util.h"
+#ifdef NEED_G_ASCII_STRCASECMP_H
+#include "g_ascii_strcasecmp.h"
+#endif
+
/*
* Collect command-line arguments as a string consisting of the arguments,
* separated by spaces.
"and tcp port %s)", tokens[1], host_ip_af(tokens[0]), tokens[0], tokens[2]);
return filter_str->str;
} else if ((env = getenv("REMOTEHOST")) != NULL) {
- if (strcasecmp(env, "localhost") == 0 || strcmp(env, "127.0.0.1") == 0) {
+ if (g_ascii_strcasecmp(env, "localhost") == 0 || strcmp(env, "127.0.0.1") == 0) {
return "";
}
g_string_sprintf(filter_str, "not %s host %s", host_ip_af(env), env);
pprotocol = p;
/* Is it TCP? */
- if (p - lastp != 3 || strncasecmp(lastp, "tcp", 3) != 0)
+ if (p - lastp != 3 || g_ascii_strncasecmp(lastp, "tcp", 3) != 0)
return ""; /* not TCP */
p++; /* skip the '/' */
} else
* XXX - compare against our host name?
* _X11TransConnectDisplay() does.
*/
- if (strcasecmp(phostname, "localhost") == 0 ||
+ if (g_ascii_strcasecmp(phostname, "localhost") == 0 ||
strcmp(phostname, "127.0.0.1") == 0) {
g_free(phostname);
return "";
* XXX - There's a better way to do this described at
* http://www.microsoft.com/technet/archive/termsrv/maintain/featusability/tsrvapi.mspx?mfr=true
*/
- if (g_strncasecmp(env, "rdp", 3) == 0) {
+ if (g_ascii_strncasecmp(env, "rdp", 3) == 0) {
g_string_sprintf(filter_str, "not tcp port 3389");
return filter_str->str;
}