git.samba.org
/
obnox
/
wireshark
/
wip.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
From Xiao Xiangquan:
[obnox/wireshark/wip.git]
/
tap-h225rassrt.c
diff --git
a/tap-h225rassrt.c
b/tap-h225rassrt.c
old mode 100755
(executable)
new mode 100644
(file)
index
97f5409
..
a0c6d8e
--- a/
tap-h225rassrt.c
+++ b/
tap-h225rassrt.c
@@
-1,11
+1,11
@@
/* tap_h225rassrt.c
/* tap_h225rassrt.c
- * h225 RAS Service Response Time statistics for
ethereal
+ * h225 RAS Service Response Time statistics for
wireshark
* Copyright 2003 Lars Roland
*
* $Id$
*
* Copyright 2003 Lars Roland
*
* $Id$
*
- *
Ethereal
- Network traffic analyzer
- * By Gerald Combs <gerald@
ethereal.com
>
+ *
Wireshark
- Network traffic analyzer
+ * By Gerald Combs <gerald@
wireshark.org
>
* Copyright 1998 Gerald Combs
*
* This program is free software; you can redistribute it and/or
* Copyright 1998 Gerald Combs
*
* This program is free software; you can redistribute it and/or
@@
-34,11
+34,12
@@
#endif
#include <string.h>
#endif
#include <string.h>
+#include "epan/packet.h"
#include "epan/packet_info.h"
#include "epan/packet_info.h"
-#include "tap.h"
+#include <epan/tap.h>
+#include <epan/stat_cmd_args.h>
#include "epan/value_string.h"
#include "epan/value_string.h"
-#include "register.h"
-#include "packet-h225.h"
+#include <epan/dissectors/packet-h225.h>
#include "timestats.h"
/* following values represent the size of their valuestring arrays */
#include "timestats.h"
/* following values represent the size of their valuestring arrays */
@@
-114,10
+115,10
@@
h225rassrt_reset(void *phs)
}
static int
}
static int
-h225rassrt_packet(void *phs, packet_info *pinfo _U_, epan_dissect_t *edt _U_, void *phi)
+h225rassrt_packet(void *phs, packet_info *pinfo _U_, epan_dissect_t *edt _U_,
const
void *phi)
{
h225rassrt_t *hs=(h225rassrt_t *)phs;
{
h225rassrt_t *hs=(h225rassrt_t *)phs;
- h225_packet_info *pi=phi;
+
const
h225_packet_info *pi=phi;
ras_type rasmsg_type = RAS_OTHER;
ras_category rascategory = RAS_OTHERS;
ras_type rasmsg_type = RAS_OTHER;
ras_category rascategory = RAS_OTHERS;
@@
-167,7
+168,6
@@
h225rassrt_packet(void *phs, packet_info *pinfo _U_, epan_dissect_t *edt _U_, vo
default:
return 0;
default:
return 0;
- break;
}
return 1;
}
}
return 1;
}
@@
-211,32
+211,27
@@
h225rassrt_draw(void *phs)
static void
static void
-h225rassrt_init(c
har *optarg
)
+h225rassrt_init(c
onst char *optarg, void* userdata _U_
)
{
h225rassrt_t *hs;
{
h225rassrt_t *hs;
- char *filter=NULL;
GString *error_string;
GString *error_string;
+ hs = g_malloc(sizeof(h225rassrt_t));
if(!strncmp(optarg,"h225,srt,",9)){
if(!strncmp(optarg,"h225,srt,",9)){
-
filter=optarg+9
;
+
hs->filter=g_strdup(optarg+9)
;
} else {
} else {
- filter=g_malloc(1);
- *filter='\0';
+ hs->filter=NULL;
}
}
- hs = g_malloc(sizeof(h225rassrt_t));
- hs->filter=g_malloc(strlen(filter)+1);
- strcpy(hs->filter, filter);
-
h225rassrt_reset(hs);
h225rassrt_reset(hs);
- error_string=register_tap_listener("h225", hs,
filter
, NULL, h225rassrt_packet, h225rassrt_draw);
+ error_string=register_tap_listener("h225", hs,
hs->filter, 0
, NULL, h225rassrt_packet, h225rassrt_draw);
if(error_string){
/* error, we failed to attach to the tap. clean up */
g_free(hs->filter);
g_free(hs);
if(error_string){
/* error, we failed to attach to the tap. clean up */
g_free(hs->filter);
g_free(hs);
- fprintf(stderr, "t
ethereal
: Couldn't register h225,srt tap: %s\n",
+ fprintf(stderr, "t
shark
: Couldn't register h225,srt tap: %s\n",
error_string->str);
g_string_free(error_string, TRUE);
exit(1);
error_string->str);
g_string_free(error_string, TRUE);
exit(1);
@@
-247,5
+242,5
@@
h225rassrt_init(char *optarg)
void
register_tap_listener_h225rassrt(void)
{
void
register_tap_listener_h225rassrt(void)
{
- register_
ethereal_tap("h225,srt", h225rassrt_init
);
+ register_
stat_cmd_arg("h225,srt", h225rassrt_init,NULL
);
}
}