aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ui/cli/tap-afpstat.c6
-rw-r--r--ui/cli/tap-ansi_astat.c2
-rw-r--r--ui/cli/tap-bootpstat.c6
-rw-r--r--ui/cli/tap-camelcounter.c6
-rw-r--r--ui/cli/tap-camelsrt.c6
-rw-r--r--ui/cli/tap-comparestat.c10
-rw-r--r--ui/cli/tap-dcerpcstat.c6
-rw-r--r--ui/cli/tap-diameter-avp.c4
-rw-r--r--ui/cli/tap-expert.c6
-rw-r--r--ui/cli/tap-follow.c80
-rw-r--r--ui/cli/tap-funnel.c4
-rw-r--r--ui/cli/tap-gsm_astat.c2
-rw-r--r--ui/cli/tap-h225counter.c6
-rw-r--r--ui/cli/tap-h225rassrt.c6
-rw-r--r--ui/cli/tap-hosts.c6
-rw-r--r--ui/cli/tap-httpstat.c6
-rw-r--r--ui/cli/tap-icmpstat.c6
-rw-r--r--ui/cli/tap-icmpv6stat.c6
-rw-r--r--ui/cli/tap-iostat.c10
-rw-r--r--ui/cli/tap-iousers.c62
-rw-r--r--ui/cli/tap-macltestat.c6
-rw-r--r--ui/cli/tap-megacostat.c6
-rw-r--r--ui/cli/tap-mgcpstat.c6
-rw-r--r--ui/cli/tap-protocolinfo.c6
-rw-r--r--ui/cli/tap-protohierstat.c8
-rw-r--r--ui/cli/tap-radiusstat.c6
-rw-r--r--ui/cli/tap-rlcltestat.c6
-rw-r--r--ui/cli/tap-rpcprogs.c2
-rw-r--r--ui/cli/tap-rpcstat.c6
-rw-r--r--ui/cli/tap-rtp.c2
-rw-r--r--ui/cli/tap-rtspstat.c6
-rw-r--r--ui/cli/tap-scsistat.c6
-rw-r--r--ui/cli/tap-sctpchunkstat.c6
-rw-r--r--ui/cli/tap-sipstat.c6
-rw-r--r--ui/cli/tap-smbsids.c2
-rw-r--r--ui/cli/tap-smbstat.c6
-rw-r--r--ui/cli/tap-stats_tree.c10
-rw-r--r--ui/cli/tap-sv.c2
-rw-r--r--ui/cli/tap-wspstat.c6
39 files changed, 175 insertions, 175 deletions
diff --git a/ui/cli/tap-afpstat.c b/ui/cli/tap-afpstat.c
index 43db7d616f..a35cc8574f 100644
--- a/ui/cli/tap-afpstat.c
+++ b/ui/cli/tap-afpstat.c
@@ -106,15 +106,15 @@ afpstat_draw(void *pss)
static void
-afpstat_init(const char *optarg, void* userdata _U_)
+afpstat_init(const char *opt_arg, void* userdata _U_)
{
afpstat_t *ss;
guint32 i;
const char *filter=NULL;
GString *error_string;
- if(!strncmp(optarg,"afp,srt,",8)){
- filter=optarg+8;
+ if(!strncmp(opt_arg,"afp,srt,",8)){
+ filter=opt_arg+8;
} else {
filter=NULL;
}
diff --git a/ui/cli/tap-ansi_astat.c b/ui/cli/tap-ansi_astat.c
index 5ec46d6e8d..90518541f2 100644
--- a/ui/cli/tap-ansi_astat.c
+++ b/ui/cli/tap-ansi_astat.c
@@ -128,7 +128,7 @@ ansi_a_stat_draw(
static void
-ansi_a_stat_init(const char *optarg _U_, void* userdata _U_)
+ansi_a_stat_init(const char *opt_arg _U_, void* userdata _U_)
{
ansi_a_stat_t *stat_p;
GString *err_p;
diff --git a/ui/cli/tap-bootpstat.c b/ui/cli/tap-bootpstat.c
index 2bdb2f3cd5..736381a582 100644
--- a/ui/cli/tap-bootpstat.c
+++ b/ui/cli/tap-bootpstat.c
@@ -134,14 +134,14 @@ dhcpstat_draw(void *psp)
/* When called, this function will create a new instance of tap-boopstat.
*/
static void
-dhcpstat_init(const char *optarg, void* userdata _U_)
+dhcpstat_init(const char *opt_arg, void* userdata _U_)
{
dhcpstat_t *sp;
const char *filter=NULL;
GString *error_string;
- if (!strncmp (optarg, "bootp,stat,", 11)){
- filter=optarg+11;
+ if (!strncmp (opt_arg, "bootp,stat,", 11)){
+ filter=opt_arg+11;
} else {
filter=NULL;
}
diff --git a/ui/cli/tap-camelcounter.c b/ui/cli/tap-camelcounter.c
index 2d82d311cb..e16c2e1ced 100644
--- a/ui/cli/tap-camelcounter.c
+++ b/ui/cli/tap-camelcounter.c
@@ -85,14 +85,14 @@ static void camelcounter_draw(void *phs)
printf("------------------------------------------\n");
}
-static void camelcounter_init(const char *optarg, void* userdata _U_)
+static void camelcounter_init(const char *opt_arg, void* userdata _U_)
{
struct camelcounter_t *p_camelcounter;
GString *error_string;
p_camelcounter = g_new(struct camelcounter_t,1);
- if(!strncmp(optarg,"camel,counter,",13)){
- p_camelcounter->filter=g_strdup(optarg+13);
+ if(!strncmp(opt_arg,"camel,counter,",13)){
+ p_camelcounter->filter=g_strdup(opt_arg+13);
} else {
p_camelcounter->filter=NULL;
}
diff --git a/ui/cli/tap-camelsrt.c b/ui/cli/tap-camelsrt.c
index 2eb78990a7..47712660ab 100644
--- a/ui/cli/tap-camelsrt.c
+++ b/ui/cli/tap-camelsrt.c
@@ -199,14 +199,14 @@ static void camelsrt_draw(void *phs)
printf("\n");
}
-static void camelsrt_init(const char *optarg, void* userdata _U_)
+static void camelsrt_init(const char *opt_arg, void* userdata _U_)
{
struct camelsrt_t *p_camelsrt;
GString *error_string;
p_camelsrt = g_new(struct camelsrt_t,1);
- if(!strncmp(optarg,"camel,srt,",9)){
- p_camelsrt->filter=g_strdup(optarg+9);
+ if(!strncmp(opt_arg,"camel,srt,",9)){
+ p_camelsrt->filter=g_strdup(opt_arg+9);
} else {
p_camelsrt->filter=NULL;
}
diff --git a/ui/cli/tap-comparestat.c b/ui/cli/tap-comparestat.c
index a31931f3a5..3d454281a3 100644
--- a/ui/cli/tap-comparestat.c
+++ b/ui/cli/tap-comparestat.c
@@ -501,7 +501,7 @@ comparestat_draw(void *prs)
* new instance for the compare tap.
*/
static void
-comparestat_init(const char *optarg, void* userdata _U_)
+comparestat_init(const char *opt_arg, void* userdata _U_)
{
comparestat_t *cs;
const char *filter=NULL;
@@ -509,12 +509,12 @@ comparestat_init(const char *optarg, void* userdata _U_)
gint start, stop,ttl, order, pos=0;
gdouble variance;
- if(sscanf(optarg,"compare,%d,%d,%d,%d,%lf%n",&start, &stop, &ttl, &order, &variance, &pos)==5){
+ if(sscanf(opt_arg,"compare,%d,%d,%d,%d,%lf%n",&start, &stop, &ttl, &order, &variance, &pos)==5){
if(pos){
- if(*(optarg+pos)==',')
- filter=optarg+pos+1;
+ if(*(opt_arg+pos)==',')
+ filter=opt_arg+pos+1;
else
- filter=optarg+pos;
+ filter=opt_arg+pos;
} else {
filter=NULL;
}
diff --git a/ui/cli/tap-dcerpcstat.c b/ui/cli/tap-dcerpcstat.c
index cc0afe7b75..9f3c9f23ec 100644
--- a/ui/cli/tap-dcerpcstat.c
+++ b/ui/cli/tap-dcerpcstat.c
@@ -173,7 +173,7 @@ dcerpcstat_draw(void *prs)
static void
-dcerpcstat_init(const char *optarg, void* userdata _U_)
+dcerpcstat_init(const char *opt_arg, void* userdata _U_)
{
rpcstat_t *rs;
guint32 i, max_procs;
@@ -198,7 +198,7 @@ dcerpcstat_init(const char *optarg, void* userdata _U_)
* report aggregate statistics for all minor version numbers
* if it's omitted?
*/
- if(sscanf(optarg,
+ if(sscanf(opt_arg,
"dcerpc,srt,%08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x,%d.%d%n",
&d1,&d2,&d3,&d40,&d41,&d42,&d43,&d44,&d45,&d46,&d47,
&major,&minor,&pos)==13){
@@ -214,7 +214,7 @@ dcerpcstat_init(const char *optarg, void* userdata _U_)
uuid.Data4[6]=d46;
uuid.Data4[7]=d47;
if(pos){
- filter=optarg+pos;
+ filter=opt_arg+pos;
} else {
filter=NULL;
}
diff --git a/ui/cli/tap-diameter-avp.c b/ui/cli/tap-diameter-avp.c
index ce773bfccb..0e64cd2e07 100644
--- a/ui/cli/tap-diameter-avp.c
+++ b/ui/cli/tap-diameter-avp.c
@@ -213,7 +213,7 @@ diameteravp_draw(void* pds)
static void
-diameteravp_init(const char *optarg, void* userdata _U_)
+diameteravp_init(const char *opt_arg, void* userdata _U_)
{
diameteravp_t *ds;
gchar* field=NULL;
@@ -235,7 +235,7 @@ diameteravp_init(const char *optarg, void* userdata _U_)
filter=g_string_new("diameter");
/* Split command line options. */
- tokens = g_strsplit(optarg,",", 1024);
+ tokens = g_strsplit(opt_arg,",", 1024);
opt_count=0;
while (tokens[opt_count])
opt_count++;
diff --git a/ui/cli/tap-expert.c b/ui/cli/tap-expert.c
index 7bc79f266d..4047e25e82 100644
--- a/ui/cli/tap-expert.c
+++ b/ui/cli/tap-expert.c
@@ -190,7 +190,7 @@ expert_stat_draw(void *phs _U_)
}
/* Create a new expert stats struct */
-static void expert_stat_init(const char *optarg, void *userdata _U_)
+static void expert_stat_init(const char *opt_arg, void *userdata _U_)
{
const char *args = NULL;
const char *filter = NULL;
@@ -199,9 +199,9 @@ static void expert_stat_init(const char *optarg, void *userdata _U_)
int n;
/* Check for args. */
- if (strncmp(optarg, "expert", 6) == 0) {
+ if (strncmp(opt_arg, "expert", 6) == 0) {
/* Skip those characters */
- args = optarg + 6;
+ args = opt_arg + 6;
}
else {
/* No args. Will show all reports, with no filter */
diff --git a/ui/cli/tap-follow.c b/ui/cli/tap-follow.c
index 71ddd5898f..f4f6543b2c 100644
--- a/ui/cli/tap-follow.c
+++ b/ui/cli/tap-follow.c
@@ -718,15 +718,15 @@ done:
static gboolean
followArgStrncmp(
- const char ** optargp,
+ const char ** opt_argp,
const char * strp
)
{
int len = (guint32)strlen(strp);
- if (strncmp(*optargp, strp, len) == 0)
+ if (strncmp(*opt_argp, strp, len) == 0)
{
- *optargp += len;
+ *opt_argp += len;
return TRUE;
}
return FALSE;
@@ -734,19 +734,19 @@ followArgStrncmp(
static void
followArgMode(
- const char ** optargp,
+ const char ** opt_argp,
follow_t * fp
)
{
- if (followArgStrncmp(optargp, STR_HEX))
+ if (followArgStrncmp(opt_argp, STR_HEX))
{
fp->mode = mode_HEX;
}
- else if (followArgStrncmp(optargp, STR_ASCII))
+ else if (followArgStrncmp(opt_argp, STR_ASCII))
{
fp->mode = mode_ASCII;
}
- else if (followArgStrncmp(optargp, STR_RAW))
+ else if (followArgStrncmp(opt_argp, STR_RAW))
{
fp->mode = mode_RAW;
}
@@ -758,7 +758,7 @@ followArgMode(
static void
followArgFilter(
- const char ** optargp,
+ const char ** opt_argp,
follow_t * fp
)
{
@@ -774,17 +774,17 @@ followArgFilter(
unsigned int ii;
char addr[ADDR_LEN];
- if (sscanf(*optargp, ",%u%n", &fp->index, &len) == 1 &&
- ((*optargp)[len] == 0 || (*optargp)[len] == ','))
+ if (sscanf(*opt_argp, ",%u%n", &fp->index, &len) == 1 &&
+ ((*opt_argp)[len] == 0 || (*opt_argp)[len] == ','))
{
- *optargp += len;
+ *opt_argp += len;
}
else
{
for (ii = 0; ii < sizeof fp->addr/sizeof *fp->addr; ii++)
{
- if ((sscanf(*optargp, ADDRv6_FMT, addr, &fp->port[ii], &len) != 2 &&
- sscanf(*optargp, ADDRv4_FMT, addr, &fp->port[ii], &len) != 2) ||
+ if ((sscanf(*opt_argp, ADDRv6_FMT, addr, &fp->port[ii], &len) != 2 &&
+ sscanf(*opt_argp, ADDRv4_FMT, addr, &fp->port[ii], &len) != 2) ||
fp->port[ii] <= 0 || fp->port[ii] > G_MAXUINT16)
{
followExit("Invalid address:port pair.");
@@ -807,7 +807,7 @@ followArgFilter(
SET_ADDRESS(&fp->addr[ii], AT_IPv4, 4, fp->addrBuf[ii]);
}
- *optargp += len;
+ *opt_argp += len;
}
if (fp->addr[0].type != fp->addr[1].type)
@@ -820,27 +820,27 @@ followArgFilter(
static void
followArgRange(
- const char ** optargp,
+ const char ** opt_argp,
follow_t * fp
)
{
int len;
- if (**optargp == 0)
+ if (**opt_argp == 0)
{
fp->chunkMin = 1;
fp->chunkMax = G_MAXUINT32;
}
else
{
- if (sscanf(*optargp, ",%u-%u%n", &fp->chunkMin, &fp->chunkMax, &len) == 2)
+ if (sscanf(*opt_argp, ",%u-%u%n", &fp->chunkMin, &fp->chunkMax, &len) == 2)
{
- *optargp += len;
+ *opt_argp += len;
}
- else if (sscanf(*optargp, ",%u%n", &fp->chunkMin, &len) == 1)
+ else if (sscanf(*opt_argp, ",%u%n", &fp->chunkMin, &len) == 1)
{
fp->chunkMax = fp->chunkMin;
- *optargp += len;
+ *opt_argp += len;
}
else
{
@@ -856,10 +856,10 @@ followArgRange(
static void
followArgDone(
- const char * optargp
+ const char * opt_argp
)
{
- if (*optargp != 0)
+ if (*opt_argp != 0)
{
followExit("Invalid parameter.");
}
@@ -867,21 +867,21 @@ followArgDone(
static void
followTcp(
- const char * optargp,
+ const char * opt_argp,
void * userdata _U_
)
{
follow_t * fp;
GString * errp;
- optargp += strlen(STR_FOLLOW_TCP);
+ opt_argp += strlen(STR_FOLLOW_TCP);
fp = followAlloc(type_TCP);
- followArgMode(&optargp, fp);
- followArgFilter(&optargp, fp);
- followArgRange(&optargp, fp);
- followArgDone(optargp);
+ followArgMode(&opt_argp, fp);
+ followArgFilter(&opt_argp, fp);
+ followArgRange(&opt_argp, fp);
+ followArgDone(opt_argp);
reset_tcp_reassembly();
if (fp->index != G_MAXUINT32)
@@ -914,21 +914,21 @@ followTcp(
static void
followUdp(
- const char * optargp,
+ const char * opt_argp,
void * userdata _U_
)
{
follow_t * fp;
GString * errp;
- optargp += strlen(STR_FOLLOW_UDP);
+ opt_argp += strlen(STR_FOLLOW_UDP);
fp = followAlloc(type_UDP);
- followArgMode(&optargp, fp);
- followArgFilter(&optargp, fp);
- followArgRange(&optargp, fp);
- followArgDone(optargp);
+ followArgMode(&opt_argp, fp);
+ followArgFilter(&opt_argp, fp);
+ followArgRange(&opt_argp, fp);
+ followArgDone(opt_argp);
if (fp->index != G_MAXUINT32)
{
@@ -949,21 +949,21 @@ followUdp(
static void
followSsl(
- const char * optargp,
+ const char * opt_argp,
void * userdata _U_
)
{
follow_t * fp;
GString * errp;
- optargp += strlen(STR_FOLLOW_SSL);
+ opt_argp += strlen(STR_FOLLOW_SSL);
fp = followAlloc(type_SSL);
- followArgMode(&optargp, fp);
- followArgFilter(&optargp, fp);
- followArgRange(&optargp, fp);
- followArgDone(optargp);
+ followArgMode(&opt_argp, fp);
+ followArgFilter(&opt_argp, fp);
+ followArgRange(&opt_argp, fp);
+ followArgDone(opt_argp);
if (fp->index == G_MAXUINT32)
{
diff --git a/ui/cli/tap-funnel.c b/ui/cli/tap-funnel.c
index acbc89cbd4..673082e1a8 100644
--- a/ui/cli/tap-funnel.c
+++ b/ui/cli/tap-funnel.c
@@ -150,8 +150,8 @@ typedef struct _menu_cb_t {
} menu_cb_t;
-static void init_funnel_cmd(const char *optarg, void* data ) {
- gchar** args = g_strsplit(optarg,",",0);
+static void init_funnel_cmd(const char *opt_arg, void* data ) {
+ gchar** args = g_strsplit(opt_arg,",",0);
gchar** arg;
menu_cb_t* mcb = data;
diff --git a/ui/cli/tap-gsm_astat.c b/ui/cli/tap-gsm_astat.c
index f358218979..b76932a2b1 100644
--- a/ui/cli/tap-gsm_astat.c
+++ b/ui/cli/tap-gsm_astat.c
@@ -315,7 +315,7 @@ gsm_a_stat_draw(
static void
-gsm_a_stat_init(const char *optarg _U_,void* userdata _U_)
+gsm_a_stat_init(const char *opt_arg _U_,void* userdata _U_)
{
gsm_a_stat_t *stat_p;
GString *err_p;
diff --git a/ui/cli/tap-h225counter.c b/ui/cli/tap-h225counter.c
index fe1a8141fc..e84d9df4f1 100644
--- a/ui/cli/tap-h225counter.c
+++ b/ui/cli/tap-h225counter.c
@@ -343,14 +343,14 @@ h225counter_draw(void *phs)
static void
-h225counter_init(const char *optarg, void* userdata _U_)
+h225counter_init(const char *opt_arg, void* userdata _U_)
{
h225counter_t *hs;
GString *error_string;
hs = g_new(h225counter_t,1);
- if(!strncmp(optarg,"h225,counter,",13)){
- hs->filter=g_strdup(optarg+13);
+ if(!strncmp(opt_arg,"h225,counter,",13)){
+ hs->filter=g_strdup(opt_arg+13);
} else {
hs->filter=NULL;
}
diff --git a/ui/cli/tap-h225rassrt.c b/ui/cli/tap-h225rassrt.c
index 8cf596bdc4..433198246e 100644
--- a/ui/cli/tap-h225rassrt.c
+++ b/ui/cli/tap-h225rassrt.c
@@ -205,14 +205,14 @@ h225rassrt_draw(void *phs)
static void
-h225rassrt_init(const char *optarg, void* userdata _U_)
+h225rassrt_init(const char *opt_arg, void* userdata _U_)
{
h225rassrt_t *hs;
GString *error_string;
hs = g_new(h225rassrt_t,1);
- if(!strncmp(optarg,"h225,srt,",9)){
- hs->filter=g_strdup(optarg+9);
+ if(!strncmp(opt_arg,"h225,srt,",9)){
+ hs->filter=g_strdup(opt_arg+9);
} else {
hs->filter=NULL;
}
diff --git a/ui/cli/tap-hosts.c b/ui/cli/tap-hosts.c
index 5e397feb15..ba8723bf10 100644
--- a/ui/cli/tap-hosts.c
+++ b/ui/cli/tap-hosts.c
@@ -128,7 +128,7 @@ hosts_draw(void *dummy _U_)
static void
-hosts_init(const char *optarg, void* userdata _U_)
+hosts_init(const char *opt_arg, void* userdata _U_)
{
GString *error_string;
gchar **tokens;
@@ -137,12 +137,12 @@ hosts_init(const char *optarg, void* userdata _U_)
dump_v4 = FALSE;
dump_v6 = FALSE;
- if(strcmp(TAP_NAME, optarg)==0) {
+ if(strcmp(TAP_NAME, opt_arg)==0) {
/* No arguments; dump everything */
dump_v4 = TRUE;
dump_v6 = TRUE;
} else {
- tokens = g_strsplit(optarg,",", 0);
+ tokens = g_strsplit(opt_arg,",", 0);
opt_count=0;
while (tokens[opt_count]) {
if (strcmp("ipv4", tokens[opt_count]) == 0) {
diff --git a/ui/cli/tap-httpstat.c b/ui/cli/tap-httpstat.c
index f5e6eb6e1b..122b686811 100644
--- a/ui/cli/tap-httpstat.c
+++ b/ui/cli/tap-httpstat.c
@@ -278,14 +278,14 @@ httpstat_draw(void *psp )
/* When called, this function will create a new instance of gtk_httpstat.
*/
static void
-gtk_httpstat_init(const char *optarg,void* userdata _U_)
+gtk_httpstat_init(const char *opt_arg,void* userdata _U_)
{
httpstat_t *sp;
const char *filter=NULL;
GString *error_string;
- if (!strncmp (optarg, "http,stat,", 10)){
- filter=optarg+10;
+ if (!strncmp (opt_arg, "http,stat,", 10)){
+ filter=opt_arg+10;
} else {
filter=NULL;
}
diff --git a/ui/cli/tap-icmpstat.c b/ui/cli/tap-icmpstat.c
index 39c0c10e96..0e89b3d844 100644
--- a/ui/cli/tap-icmpstat.c
+++ b/ui/cli/tap-icmpstat.c
@@ -263,14 +263,14 @@ icmpstat_draw(void *tapdata)
* instance for the icmp tap.
*/
static void
-icmpstat_init(const char *optarg, void* userdata _U_)
+icmpstat_init(const char *opt_arg, void* userdata _U_)
{
icmpstat_t *icmpstat;
const char *filter = NULL;
GString *error_string;
- if (strstr(optarg, "icmp,srt,"))
- filter = optarg + strlen("icmp,srt,");
+ if (strstr(opt_arg, "icmp,srt,"))
+ filter = opt_arg + strlen("icmp,srt,");
icmpstat = (icmpstat_t *)g_try_malloc(sizeof(icmpstat_t));
if (icmpstat == NULL) {
diff --git a/ui/cli/tap-icmpv6stat.c b/ui/cli/tap-icmpv6stat.c
index 88bb472b53..cfe0a02629 100644
--- a/ui/cli/tap-icmpv6stat.c
+++ b/ui/cli/tap-icmpv6stat.c
@@ -264,14 +264,14 @@ icmpv6stat_draw(void *tapdata)
* instance for the icmpv6 tap.
*/
static void
-icmpv6stat_init(const char *optarg, void* userdata _U_)
+icmpv6stat_init(const char *opt_arg, void* userdata _U_)
{
icmpv6stat_t *icmpv6stat;
const char *filter = NULL;
GString *error_string;
- if (strstr(optarg, "icmpv6,srt,"))
- filter = optarg + strlen("icmpv6,srt,");
+ if (strstr(opt_arg, "icmpv6,srt,"))
+ filter = opt_arg + strlen("icmpv6,srt,");
icmpv6stat = (icmpv6stat_t *)g_try_malloc(sizeof(icmpv6stat_t));
if (icmpv6stat == NULL) {
diff --git a/ui/cli/tap-iostat.c b/ui/cli/tap-iostat.c
index 4c10790219..b6835946bd 100644
--- a/ui/cli/tap-iostat.c
+++ b/ui/cli/tap-iostat.c
@@ -1304,7 +1304,7 @@ register_io_tap(io_stat_t *io, int i, const char *filter)
}
static void
-iostat_init(const char *optarg, void* userdata _U_)
+iostat_init(const char *opt_arg, void* userdata _U_)
{
gdouble interval_float;
guint32 idx=0;
@@ -1312,14 +1312,14 @@ iostat_init(const char *optarg, void* userdata _U_)
io_stat_t *io;
const gchar *filters, *str, *pos;
- if ((*(optarg+(strlen(optarg)-1)) == ',') ||
- (sscanf(optarg, "io,stat,%lf%n", &interval_float, (int *)&idx) != 1) ||
+ if ((*(opt_arg+(strlen(opt_arg)-1)) == ',') ||
+ (sscanf(opt_arg, "io,stat,%lf%n", &interval_float, (int *)&idx) != 1) ||
(idx < 8)) {
fprintf(stderr, "\ntshark: invalid \"-z io,stat,<interval>[,<filter>][,<filter>]...\" argument\n");
exit(1);
}
- filters=optarg+idx;
+ filters=opt_arg+idx;
if (*filters) {
if (*filters != ',') {
/* For locale's that use ',' instead of '.', the comma might
@@ -1371,7 +1371,7 @@ iostat_init(const char *optarg, void* userdata _U_)
interval of 1 and the last interval becomes "9 <> 9". If the interval is instead set to
1.1, the last interval becomes
last interval is rounded up to value that is greater than the duration. */
- const gchar *invl_start = optarg+8;
+ const gchar *invl_start = opt_arg+8;
gchar *intv_end;
int invl_len;
diff --git a/ui/cli/tap-iousers.c b/ui/cli/tap-iousers.c
index beeef9084e..b51d708e59 100644
--- a/ui/cli/tap-iousers.c
+++ b/ui/cli/tap-iousers.c
@@ -449,7 +449,7 @@ iousers_draw(void *arg)
}
static void
-iousers_init(const char *optarg, void* userdata _U_)
+iousers_init(const char *opt_arg, void* userdata _U_)
{
const char *filter=NULL;
const char *tap_type, *tap_type_name;
@@ -457,90 +457,90 @@ iousers_init(const char *optarg, void* userdata _U_)
io_users_t *iu=NULL;
GString *error_string;
- if(!strncmp(optarg,"conv,eth",8)){
- if(optarg[8]==','){
- filter=optarg+9;
+ if(!strncmp(opt_arg,"conv,eth",8)){
+ if(opt_arg[8]==','){
+ filter=opt_arg+9;
} else {
filter=NULL;
}
tap_type="eth";
tap_type_name="Ethernet";
packet_func=iousers_eth_packet;
- } else if(!strncmp(optarg,"conv,fc",7)){
- if(optarg[7]==','){
- filter=optarg+8;
+ } else if(!strncmp(opt_arg,"conv,fc",7)){
+ if(opt_arg[7]==','){
+ filter=opt_arg+8;
} else {
filter=NULL;
}
tap_type="fc";
tap_type_name="Fibre Channel";
packet_func=iousers_fc_packet;
- } else if(!strncmp(optarg,"conv,fddi",9)){
- if(optarg[9]==','){
- filter=optarg+10;
+ } else if(!strncmp(opt_arg,"conv,fddi",9)){
+ if(opt_arg[9]==','){
+ filter=opt_arg+10;
} else {
filter=NULL;
}
tap_type="fddi";
tap_type_name="FDDI";
packet_func=iousers_fddi_packet;
- } else if(!strncmp(optarg,"conv,tcp",8)){
- if(optarg[8]==','){
- filter=optarg+9;
+ } else if(!strncmp(opt_arg,"conv,tcp",8)){
+ if(opt_arg[8]==','){
+ filter=opt_arg+9;
} else {
filter=NULL;
}
tap_type="tcp";
tap_type_name="TCP";
packet_func=iousers_tcpip_packet;
- } else if(!strncmp(optarg,"conv,udp",8)){
- if(optarg[8]==','){
- filter=optarg+9;
+ } else if(!strncmp(opt_arg,"conv,udp",8)){
+ if(opt_arg[8]==','){
+ filter=opt_arg+9;
} else {
filter=NULL;
}
tap_type="udp";
tap_type_name="UDP";
packet_func=iousers_udpip_packet;
- } else if(!strncmp(optarg,"conv,tr",7)){
- if(optarg[7]==','){
- filter=optarg+8;
+ } else if(!strncmp(opt_arg,"conv,tr",7)){
+ if(opt_arg[7]==','){
+ filter=opt_arg+8;
} else {
filter=NULL;
}
tap_type="tr";
tap_type_name="Token Ring";
packet_func=iousers_tr_packet;
- } else if(!strncmp(optarg,"conv,ipx",8)){
- if(optarg[8]==','){
- filter=optarg+9;
+ } else if(!strncmp(opt_arg,"conv,ipx",8)){
+ if(opt_arg[8]==','){
+ filter=opt_arg+9;
} else {
filter=NULL;
}
tap_type="ipx";
tap_type_name="IPX";
packet_func=iousers_ipx_packet;
- } else if(!strncmp(optarg,"conv,ipv6",9)){
- if(optarg[9]==','){
- filter=optarg+10;
+ } else if(!strncmp(opt_arg,"conv,ipv6",9)){
+ if(opt_arg[9]==','){
+ filter=opt_arg+10;
} else {
filter=NULL;
}
tap_type="ipv6";
tap_type_name="IPv6";
packet_func=iousers_ipv6_packet;
- } else if(!strncmp(optarg,"conv,ip",7)){
- if(optarg[7]==','){
- filter=optarg+8;
+ } else if(!strncmp(opt_arg,"conv,ip",7)){
+ if(opt_arg[7]==','){
+ filter=opt_arg+8;
} else {
filter=NULL;
}
tap_type="ip";
tap_type_name="IPv4";
packet_func=iousers_ip_packet;
- } else if(!strncmp(optarg,"conv,sctp",9)) {
- if(optarg[9]==','){
- filter=optarg+10;
+ } else if(!strncmp(opt_arg,"conv,sctp",9)) {
+ if(opt_arg[9]==','){
+ filter=opt_arg+10;
} else {
filter=NULL;
}
diff --git a/ui/cli/tap-macltestat.c b/ui/cli/tap-macltestat.c
index d6f0ccd477..c841d0a590 100644
--- a/ui/cli/tap-macltestat.c
+++ b/ui/cli/tap-macltestat.c
@@ -508,16 +508,16 @@ mac_lte_stat_draw(void *phs)
}
/* Create a new MAC LTE stats struct */
-static void mac_lte_stat_init(const char *optarg, void *userdata _U_)
+static void mac_lte_stat_init(const char *opt_arg, void *userdata _U_)
{
mac_lte_stat_t *hs;
const char *filter = NULL;
GString *error_string;
/* Check for a filter string */
- if (strncmp(optarg, "mac-lte,stat,", 13) == 0) {
+ if (strncmp(opt_arg, "mac-lte,stat,", 13) == 0) {
/* Skip those characters from filter to display */
- filter = optarg + 13;
+ filter = opt_arg + 13;
}
else {
/* No filter */
diff --git a/ui/cli/tap-megacostat.c b/ui/cli/tap-megacostat.c
index 546d2c65b8..325caa154b 100644
--- a/ui/cli/tap-megacostat.c
+++ b/ui/cli/tap-megacostat.c
@@ -72,7 +72,7 @@ megacostat_draw(void *pms)
static void
-megacostat_init(const char *optarg, void* userdata _U_)
+megacostat_init(const char *opt_arg, void* userdata _U_)
{
megacostat_t *ms;
int i;
@@ -94,8 +94,8 @@ megacostat_init(const char *optarg, void* userdata _U_)
}
ms=g_new(megacostat_t,1);
- if(!strncmp(optarg,"megaco,rtd,",11)){
- ms->filter=g_strdup(optarg+11);
+ if(!strncmp(opt_arg,"megaco,rtd,",11)){
+ ms->filter=g_strdup(opt_arg+11);
} else {
ms->filter=NULL;
}
diff --git a/ui/cli/tap-mgcpstat.c b/ui/cli/tap-mgcpstat.c
index 2c764e2b15..d901bbd0e9 100644
--- a/ui/cli/tap-mgcpstat.c
+++ b/ui/cli/tap-mgcpstat.c
@@ -169,15 +169,15 @@ mgcpstat_draw(void *pms)
static void
-mgcpstat_init(const char *optarg, void* userdata _U_)
+mgcpstat_init(const char *opt_arg, void* userdata _U_)
{
mgcpstat_t *ms;
int i;
GString *error_string;
ms=g_new(mgcpstat_t,1);
- if(!strncmp(optarg,"mgcp,rtd,",9)){
- ms->filter=g_strdup(optarg+9);
+ if(!strncmp(opt_arg,"mgcp,rtd,",9)){
+ ms->filter=g_strdup(opt_arg+9);
} else {
ms->filter=NULL;
}
diff --git a/ui/cli/tap-protocolinfo.c b/ui/cli/tap-protocolinfo.c
index 7324b68932..6138f34e50 100644
--- a/ui/cli/tap-protocolinfo.c
+++ b/ui/cli/tap-protocolinfo.c
@@ -81,7 +81,7 @@ protocolinfo_packet(void *prs, packet_info *pinfo, epan_dissect_t *edt, const vo
static void
-protocolinfo_init(const char *optarg, void* userdata _U_)
+protocolinfo_init(const char *opt_arg, void* userdata _U_)
{
pci_t *rs;
const char *field=NULL;
@@ -89,8 +89,8 @@ protocolinfo_init(const char *optarg, void* userdata _U_)
header_field_info *hfi;
GString *error_string;
- if(!strncmp("proto,colinfo,",optarg,14)){
- filter=optarg+14;
+ if(!strncmp("proto,colinfo,",opt_arg,14)){
+ filter=opt_arg+14;
field=strchr(filter,',');
if(field){
field+=1; /* skip the ',' */
diff --git a/ui/cli/tap-protohierstat.c b/ui/cli/tap-protohierstat.c
index e9308045fa..aa544f78fc 100644
--- a/ui/cli/tap-protohierstat.c
+++ b/ui/cli/tap-protohierstat.c
@@ -166,18 +166,18 @@ protohierstat_draw(void *prs)
static void
-protohierstat_init(const char *optarg, void* userdata _U_)
+protohierstat_init(const char *opt_arg, void* userdata _U_)
{
phs_t *rs;
int pos=0;
const char *filter=NULL;
GString *error_string;
- if(strcmp("io,phs",optarg)==0){
+ if(strcmp("io,phs",opt_arg)==0){
/* No arguments */
- } else if(sscanf(optarg,"io,phs,%n",&pos)==0){
+ } else if(sscanf(opt_arg,"io,phs,%n",&pos)==0){
if(pos){
- filter=optarg+pos;
+ filter=opt_arg+pos;
}
} else {
fprintf(stderr, "tshark: invalid \"-z io,phs[,<filter>]\" argument\n");
diff --git a/ui/cli/tap-radiusstat.c b/ui/cli/tap-radiusstat.c
index 42f6e7f8fe..c75cfc168e 100644
--- a/ui/cli/tap-radiusstat.c
+++ b/ui/cli/tap-radiusstat.c
@@ -185,15 +185,15 @@ radiusstat_draw(void *prs)
static void
-radiusstat_init(const char *optarg, void* userdata _U_)
+radiusstat_init(const char *opt_arg, void* userdata _U_)
{
radiusstat_t *rs;
int i;
GString *error_string;
rs=g_new(radiusstat_t,1);
- if(!strncmp(optarg,"radius,rtd,",11)){
- rs->filter=g_strdup(optarg+11);
+ if(!strncmp(opt_arg,"radius,rtd,",11)){
+ rs->filter=g_strdup(opt_arg+11);
} else {
rs->filter=NULL;
}
diff --git a/ui/cli/tap-rlcltestat.c b/ui/cli/tap-rlcltestat.c
index 3aa87bcb20..d78d062efc 100644
--- a/ui/cli/tap-rlcltestat.c
+++ b/ui/cli/tap-rlcltestat.c
@@ -362,16 +362,16 @@ rlc_lte_stat_draw(void *phs)
/* Create a new RLC LTE stats struct */
-static void rlc_lte_stat_init(const char *optarg, void *userdata _U_)
+static void rlc_lte_stat_init(const char *opt_arg, void *userdata _U_)
{
rlc_lte_stat_t *hs;
const char *filter = NULL;
GString *error_string;
/* Check for a filter string */
- if (strncmp(optarg, "rlc-lte,stat,", 13) == 0) {
+ if (strncmp(opt_arg, "rlc-lte,stat,", 13) == 0) {
/* Skip those characters from filter to display */
- filter = optarg + 13;
+ filter = opt_arg + 13;
}
else {
/* No filter */
diff --git a/ui/cli/tap-rpcprogs.c b/ui/cli/tap-rpcprogs.c
index 900621d724..f1fb0444f0 100644
--- a/ui/cli/tap-rpcprogs.c
+++ b/ui/cli/tap-rpcprogs.c
@@ -206,7 +206,7 @@ rpcprogs_draw(void *dummy _U_)
static void
-rpcprogs_init(const char *optarg _U_, void* userdata _U_)
+rpcprogs_init(const char *opt_arg _U_, void* userdata _U_)
{
GString *error_string;
diff --git a/ui/cli/tap-rpcstat.c b/ui/cli/tap-rpcstat.c
index 9a34faec7b..82a1856468 100644
--- a/ui/cli/tap-rpcstat.c
+++ b/ui/cli/tap-rpcstat.c
@@ -262,7 +262,7 @@ rpcstat_find_procs(gpointer *key, gpointer *value _U_, gpointer *user_data _U_)
* instance for the rpc tap.
*/
static void
-rpcstat_init(const char *optarg, void* userdata _U_)
+rpcstat_init(const char *opt_arg, void* userdata _U_)
{
rpcstat_t *rs;
guint32 i;
@@ -271,9 +271,9 @@ rpcstat_init(const char *optarg, void* userdata _U_)
const char *filter=NULL;
GString *error_string;
- if(sscanf(optarg,"rpc,srt,%d,%d,%n",&program,&version,&pos)==2){
+ if(sscanf(opt_arg,"rpc,srt,%d,%d,%n",&program,&version,&pos)==2){
if(pos){
- filter=optarg+pos;
+ filter=opt_arg+pos;
} else {
filter=NULL;
}
diff --git a/ui/cli/tap-rtp.c b/ui/cli/tap-rtp.c
index c07b1a29f3..da8809590f 100644
--- a/ui/cli/tap-rtp.c
+++ b/ui/cli/tap-rtp.c
@@ -131,7 +131,7 @@ rtp_streams_stat_draw(void *arg _U_)
static void
-rtp_streams_stat_init(const char *optarg _U_, void* userdata _U_)
+rtp_streams_stat_init(const char *opt_arg _U_, void* userdata _U_)
{
GString *err_p;
diff --git a/ui/cli/tap-rtspstat.c b/ui/cli/tap-rtspstat.c
index 57623d6d61..fb073a0f42 100644
--- a/ui/cli/tap-rtspstat.c
+++ b/ui/cli/tap-rtspstat.c
@@ -231,14 +231,14 @@ rtspstat_draw(void *psp )
/* When called, this function will create a new instance of gtk_rtspstat.
*/
static void
-gtk_rtspstat_init(const char *optarg,void* userdata _U_)
+gtk_rtspstat_init(const char *opt_arg,void* userdata _U_)
{
rtspstat_t *sp;
const char *filter=NULL;
GString *error_string;
- if (!strncmp (optarg, "rtsp,stat,", 10)){
- filter=optarg+10;
+ if (!strncmp (opt_arg, "rtsp,stat,", 10)){
+ filter=opt_arg+10;
} else {
filter=NULL;
}
diff --git a/ui/cli/tap-scsistat.c b/ui/cli/tap-scsistat.c
index c479f8dc27..31a2cff8a3 100644
--- a/ui/cli/tap-scsistat.c
+++ b/ui/cli/tap-scsistat.c
@@ -168,7 +168,7 @@ scsistat_draw(void *prs)
}
static void
-scsistat_init(const char *optarg, void* userdata _U_)
+scsistat_init(const char *opt_arg, void* userdata _U_)
{
scsistat_t *rs;
guint32 i;
@@ -177,9 +177,9 @@ scsistat_init(const char *optarg, void* userdata _U_)
GString *error_string;
pos=0;
- if(sscanf(optarg, "scsi,srt,%d,%n", &program, &pos)==1) {
+ if(sscanf(opt_arg, "scsi,srt,%d,%n", &program, &pos)==1) {
if(pos) {
- filter=optarg+pos;
+ filter=opt_arg+pos;
} else {
filter=NULL;
}
diff --git a/ui/cli/tap-sctpchunkstat.c b/ui/cli/tap-sctpchunkstat.c
index 1b0f26c134..9f69774177 100644
--- a/ui/cli/tap-sctpchunkstat.c
+++ b/ui/cli/tap-sctpchunkstat.c
@@ -211,14 +211,14 @@ sctpstat_draw(void *phs)
static void
-sctpstat_init(const char *optarg, void* userdata _U_)
+sctpstat_init(const char *opt_arg, void* userdata _U_)
{
sctpstat_t *hs;
GString *error_string;
hs = (sctpstat_t *)g_malloc(sizeof(sctpstat_t));
- if(!strncmp(optarg,"sctp,stat,",11)){
- hs->filter=g_strdup(optarg+11);
+ if(!strncmp(opt_arg,"sctp,stat,",11)){
+ hs->filter=g_strdup(opt_arg+11);
} else {
hs->filter=NULL;
}
diff --git a/ui/cli/tap-sipstat.c b/ui/cli/tap-sipstat.c
index 4c57f806fc..2eaf370730 100644
--- a/ui/cli/tap-sipstat.c
+++ b/ui/cli/tap-sipstat.c
@@ -386,14 +386,14 @@ sipstat_draw(void *psp )
}
static void
-sipstat_init(const char *optarg, void* userdata _U_)
+sipstat_init(const char *opt_arg, void* userdata _U_)
{
sipstat_t *sp;
const char *filter=NULL;
GString *error_string;
- if (strncmp (optarg, "sip,stat,", 9) == 0){
- filter=optarg+9;
+ if (strncmp (opt_arg, "sip,stat,", 9) == 0){
+ filter=opt_arg+9;
} else {
filter=NULL;
}
diff --git a/ui/cli/tap-smbsids.c b/ui/cli/tap-smbsids.c
index e5c65e9039..c065873e0c 100644
--- a/ui/cli/tap-smbsids.c
+++ b/ui/cli/tap-smbsids.c
@@ -62,7 +62,7 @@ smbsids_draw(void *pss _U_)
static void
-smbsids_init(const char *optarg _U_, void* userdata _U_)
+smbsids_init(const char *opt_arg _U_, void* userdata _U_)
{
GString *error_string;
diff --git a/ui/cli/tap-smbstat.c b/ui/cli/tap-smbstat.c
index a1c6a9b761..69fccaccbd 100644
--- a/ui/cli/tap-smbstat.c
+++ b/ui/cli/tap-smbstat.c
@@ -180,15 +180,15 @@ smbstat_draw(void *pss)
static void
-smbstat_init(const char *optarg,void* userdata _U_)
+smbstat_init(const char *opt_arg,void* userdata _U_)
{
smbstat_t *ss;
guint32 i;
const char *filter=NULL;
GString *error_string;
- if(!strncmp(optarg,"smb,srt,",8)){
- filter=optarg+8;
+ if(!strncmp(opt_arg,"smb,srt,",8)){
+ filter=opt_arg+8;
} else {
filter=NULL;
}
diff --git a/ui/cli/tap-stats_tree.c b/ui/cli/tap-stats_tree.c
index 2861b2394d..58201a7df7 100644
--- a/ui/cli/tap-stats_tree.c
+++ b/ui/cli/tap-stats_tree.c
@@ -72,9 +72,9 @@ draw_stats_tree(void *psp)
}
static void
-init_stats_tree(const char *optarg, void *userdata _U_)
+init_stats_tree(const char *opt_arg, void *userdata _U_)
{
- char *abbr = stats_tree_get_abbr(optarg);
+ char *abbr = stats_tree_get_abbr(opt_arg);
GString *error_string;
stats_tree_cfg *cfg = NULL;
stats_tree *st = NULL;
@@ -83,8 +83,8 @@ init_stats_tree(const char *optarg, void *userdata _U_)
cfg = stats_tree_get_cfg_by_abbr(abbr);
if (cfg != NULL) {
- if (strncmp (optarg, cfg->pr->init_string, strlen(cfg->pr->init_string)) == 0){
- st = stats_tree_new(cfg,NULL,optarg+strlen(cfg->pr->init_string));
+ if (strncmp (opt_arg, cfg->pr->init_string, strlen(cfg->pr->init_string)) == 0){
+ st = stats_tree_new(cfg,NULL,opt_arg+strlen(cfg->pr->init_string));
} else {
report_failure("Wrong stats_tree (%s) found when looking at ->init_string",abbr);
return;
@@ -97,7 +97,7 @@ init_stats_tree(const char *optarg, void *userdata _U_)
g_free(abbr);
} else {
- report_failure("could not obtain stats_tree abbr (%s) from arg '%s'",abbr,optarg);
+ report_failure("could not obtain stats_tree abbr (%s) from arg '%s'",abbr,opt_arg);
return;
}
diff --git a/ui/cli/tap-sv.c b/ui/cli/tap-sv.c
index 8f2960a297..81f3070b8a 100644
--- a/ui/cli/tap-sv.c
+++ b/ui/cli/tap-sv.c
@@ -52,7 +52,7 @@ sv_packet(void *prs _U_, packet_info *pinfo, epan_dissect_t *edt _U_, const void
}
static void
-svstat_init(const char *optarg _U_, void* userdata _U_)
+svstat_init(const char *opt_arg _U_, void* userdata _U_)
{
GString *error_string;
diff --git a/ui/cli/tap-wspstat.c b/ui/cli/tap-wspstat.c
index 165f78d0c8..0bf539ea9c 100644
--- a/ui/cli/tap-wspstat.c
+++ b/ui/cli/tap-wspstat.c
@@ -207,7 +207,7 @@ wspstat_draw(void *psp)
* new instance for the wsp tap.
*/
static void
-wspstat_init(const char *optarg, void* userdata _U_)
+wspstat_init(const char *opt_arg, void* userdata _U_)
{
wspstat_t *sp;
const char *filter=NULL;
@@ -216,8 +216,8 @@ wspstat_init(const char *optarg, void* userdata _U_)
wsp_status_code_t *sc;
const value_string *wsp_vals_status_p;
- if (!strncmp (optarg, "wsp,stat," , 9)){
- filter=optarg+9;
+ if (!strncmp (opt_arg, "wsp,stat," , 9)){
+ filter=opt_arg+9;
} else {
filter=NULL;
}