forked from osmocom/wireshark
Get rid of some GTK+-only stuff.
Change-Id: I841a1cdb637f37673466e4d065474c0f7e2dfc56 Reviewed-on: https://code.wireshark.org/review/27512 Reviewed-by: Guy Harris <guy@alum.mit.edu>
This commit is contained in:
parent
bd166c2b08
commit
3a0dd69d04
|
@ -322,13 +322,13 @@ static void dbg(guint level, char *fmt, ...) {
|
|||
#endif
|
||||
|
||||
static void
|
||||
camelstat_init(struct register_srt* srt _U_, GArray* srt_array, srt_gui_init_cb gui_callback, void* gui_data)
|
||||
camelstat_init(struct register_srt* srt _U_, GArray* srt_array)
|
||||
{
|
||||
srt_stat_table *camel_srt_table;
|
||||
gchar* tmp_str;
|
||||
guint32 i;
|
||||
|
||||
camel_srt_table = init_srt_table("CAMEL Commands", NULL, srt_array, NB_CAMELSRT_CATEGORY, NULL, NULL, gui_callback, gui_data, NULL);
|
||||
camel_srt_table = init_srt_table("CAMEL Commands", NULL, srt_array, NB_CAMELSRT_CATEGORY, NULL, NULL, NULL);
|
||||
for (i = 0; i < NB_CAMELSRT_CATEGORY; i++)
|
||||
{
|
||||
tmp_str = val_to_str_wmem(NULL,i,camelSRTtype_naming,"Unknown (%d)");
|
||||
|
|
|
@ -290,12 +290,12 @@ static const value_string netlogon_opcode_vals[] = {
|
|||
#define LDAP_NUM_PROCEDURES 24
|
||||
|
||||
static void
|
||||
ldapstat_init(struct register_srt* srt _U_, GArray* srt_array, srt_gui_init_cb gui_callback, void* gui_data)
|
||||
ldapstat_init(struct register_srt* srt _U_, GArray* srt_array)
|
||||
{
|
||||
srt_stat_table *ldap_srt_table;
|
||||
guint32 i;
|
||||
|
||||
ldap_srt_table = init_srt_table("LDAP Commands", NULL, srt_array, LDAP_NUM_PROCEDURES, NULL, "ldap.protocolOp", gui_callback, gui_data, NULL);
|
||||
ldap_srt_table = init_srt_table("LDAP Commands", NULL, srt_array, LDAP_NUM_PROCEDURES, NULL, "ldap.protocolOp", NULL);
|
||||
for (i = 0; i < LDAP_NUM_PROCEDURES; i++)
|
||||
{
|
||||
init_srt_table_row(ldap_srt_table, i, val_to_str_const(i, ldap_procedure_names, "<unknown>"));
|
||||
|
|
|
@ -1085,12 +1085,12 @@ value_string_ext afp_server_addr_type_vals_ext = VALUE_STRING_EXT_INIT(afp_serve
|
|||
#define AFP_NUM_PROCEDURES 256
|
||||
|
||||
static void
|
||||
afpstat_init(struct register_srt* srt _U_, GArray* srt_array, srt_gui_init_cb gui_callback, void* gui_data)
|
||||
afpstat_init(struct register_srt* srt _U_, GArray* srt_array)
|
||||
{
|
||||
srt_stat_table *afp_srt_table;
|
||||
guint32 i;
|
||||
|
||||
afp_srt_table = init_srt_table("AFP Commands", NULL, srt_array, AFP_NUM_PROCEDURES, NULL, "afp.command", gui_callback, gui_data, NULL);
|
||||
afp_srt_table = init_srt_table("AFP Commands", NULL, srt_array, AFP_NUM_PROCEDURES, NULL, "afp.command", NULL);
|
||||
for (i = 0; i < AFP_NUM_PROCEDURES; i++)
|
||||
{
|
||||
gchar* tmp_str = val_to_str_ext_wmem(NULL, i, &CommandCode_vals_ext, "Unknown(%u)");
|
||||
|
|
|
@ -1295,13 +1295,13 @@ static void dbg(guint level, char *fmt, ...) {
|
|||
#endif
|
||||
|
||||
static void
|
||||
camelstat_init(struct register_srt* srt _U_, GArray* srt_array, srt_gui_init_cb gui_callback, void* gui_data)
|
||||
camelstat_init(struct register_srt* srt _U_, GArray* srt_array)
|
||||
{
|
||||
srt_stat_table *camel_srt_table;
|
||||
gchar* tmp_str;
|
||||
guint32 i;
|
||||
|
||||
camel_srt_table = init_srt_table("CAMEL Commands", NULL, srt_array, NB_CAMELSRT_CATEGORY, NULL, NULL, gui_callback, gui_data, NULL);
|
||||
camel_srt_table = init_srt_table("CAMEL Commands", NULL, srt_array, NB_CAMELSRT_CATEGORY, NULL, NULL, NULL);
|
||||
for (i = 0; i < NB_CAMELSRT_CATEGORY; i++)
|
||||
{
|
||||
tmp_str = val_to_str_wmem(NULL,i,camelSRTtype_naming,"Unknown (%d)");
|
||||
|
|
|
@ -1908,7 +1908,7 @@ uuid_equal(e_guid_t *uuid1, e_guid_t *uuid2)
|
|||
}
|
||||
|
||||
static void
|
||||
dcerpcstat_init(struct register_srt* srt, GArray* srt_array, srt_gui_init_cb gui_callback, void* gui_data)
|
||||
dcerpcstat_init(struct register_srt* srt, GArray* srt_array)
|
||||
{
|
||||
dcerpcstat_tap_data_t* tap_data = (dcerpcstat_tap_data_t*)get_srt_table_param_data(srt);
|
||||
srt_stat_table *dcerpc_srt_table;
|
||||
|
@ -1921,9 +1921,9 @@ dcerpcstat_init(struct register_srt* srt, GArray* srt_array, srt_gui_init_cb gui
|
|||
procs = dcerpc_get_proto_sub_dissector(&tap_data->uuid, tap_data->ver);
|
||||
|
||||
if(hf_opnum != -1){
|
||||
dcerpc_srt_table = init_srt_table(tap_data->prog, NULL, srt_array, tap_data->num_procedures, NULL, proto_registrar_get_nth(hf_opnum)->abbrev, gui_callback, gui_data, tap_data);
|
||||
dcerpc_srt_table = init_srt_table(tap_data->prog, NULL, srt_array, tap_data->num_procedures, NULL, proto_registrar_get_nth(hf_opnum)->abbrev, tap_data);
|
||||
} else {
|
||||
dcerpc_srt_table = init_srt_table(tap_data->prog, NULL, srt_array, tap_data->num_procedures, NULL, NULL, gui_callback, gui_data, tap_data);
|
||||
dcerpc_srt_table = init_srt_table(tap_data->prog, NULL, srt_array, tap_data->num_procedures, NULL, NULL, tap_data);
|
||||
}
|
||||
|
||||
for(i=0;i<tap_data->num_procedures;i++){
|
||||
|
|
|
@ -360,7 +360,7 @@ static GHashTable* diameterstat_cmd_str_hash = NULL;
|
|||
#define DIAMETER_NUM_PROCEDURES 1
|
||||
|
||||
static void
|
||||
diameterstat_init(struct register_srt* srt _U_, GArray* srt_array, srt_gui_init_cb gui_callback, void* gui_data)
|
||||
diameterstat_init(struct register_srt* srt _U_, GArray* srt_array)
|
||||
{
|
||||
srt_stat_table *diameter_srt_table;
|
||||
int* idx;
|
||||
|
@ -381,7 +381,7 @@ diameterstat_init(struct register_srt* srt _U_, GArray* srt_array, srt_gui_init_
|
|||
* Note to make it work the command code must be stored rather than the
|
||||
* index.
|
||||
*/
|
||||
diameter_srt_table = init_srt_table("Diameter Requests", NULL, srt_array, DIAMETER_NUM_PROCEDURES, NULL, NULL, gui_callback, gui_data, NULL);
|
||||
diameter_srt_table = init_srt_table("Diameter Requests", NULL, srt_array, DIAMETER_NUM_PROCEDURES, NULL, NULL, NULL);
|
||||
init_srt_table_row(diameter_srt_table, 0, "Unknown");
|
||||
}
|
||||
|
||||
|
|
|
@ -234,12 +234,12 @@ fc_hostlist_packet(void *pit, packet_info *pinfo, epan_dissect_t *edt _U_, const
|
|||
#define FC_NUM_PROCEDURES 256
|
||||
|
||||
static void
|
||||
fcstat_init(struct register_srt* srt _U_, GArray* srt_array, srt_gui_init_cb gui_callback, void* gui_data)
|
||||
fcstat_init(struct register_srt* srt _U_, GArray* srt_array)
|
||||
{
|
||||
srt_stat_table *fc_srt_table;
|
||||
guint32 i;
|
||||
|
||||
fc_srt_table = init_srt_table("Fibre Channel Types", NULL, srt_array, FC_NUM_PROCEDURES, NULL, NULL, gui_callback, gui_data, NULL);
|
||||
fc_srt_table = init_srt_table("Fibre Channel Types", NULL, srt_array, FC_NUM_PROCEDURES, NULL, NULL, NULL);
|
||||
for (i = 0; i < FC_NUM_PROCEDURES; i++)
|
||||
{
|
||||
gchar* tmp_str = val_to_str_wmem(NULL, i, fc_fc4_val, "Unknown(0x%02x)");
|
||||
|
|
|
@ -1796,11 +1796,11 @@ static const value_string geographic_location_type[] = {
|
|||
#define MM_PROTO_NON_CALL_RELATED 0x0B
|
||||
|
||||
static void
|
||||
gtpstat_init(struct register_srt* srt _U_, GArray* srt_array, srt_gui_init_cb gui_callback, void* gui_data)
|
||||
gtpstat_init(struct register_srt* srt _U_, GArray* srt_array)
|
||||
{
|
||||
srt_stat_table *gtp_srt_table;
|
||||
|
||||
gtp_srt_table = init_srt_table("GTP Requests", NULL, srt_array, 4, NULL, NULL, gui_callback, gui_data, NULL);
|
||||
gtp_srt_table = init_srt_table("GTP Requests", NULL, srt_array, 4, NULL, NULL, NULL);
|
||||
init_srt_table_row(gtp_srt_table, 0, "Echo");
|
||||
init_srt_table_row(gtp_srt_table, 1, "Create PDP context");
|
||||
init_srt_table_row(gtp_srt_table, 2, "Update PDP context");
|
||||
|
|
|
@ -504,12 +504,12 @@ static const value_string netlogon_opcode_vals[] = {
|
|||
#define LDAP_NUM_PROCEDURES 24
|
||||
|
||||
static void
|
||||
ldapstat_init(struct register_srt* srt _U_, GArray* srt_array, srt_gui_init_cb gui_callback, void* gui_data)
|
||||
ldapstat_init(struct register_srt* srt _U_, GArray* srt_array)
|
||||
{
|
||||
srt_stat_table *ldap_srt_table;
|
||||
guint32 i;
|
||||
|
||||
ldap_srt_table = init_srt_table("LDAP Commands", NULL, srt_array, LDAP_NUM_PROCEDURES, NULL, "ldap.protocolOp", gui_callback, gui_data, NULL);
|
||||
ldap_srt_table = init_srt_table("LDAP Commands", NULL, srt_array, LDAP_NUM_PROCEDURES, NULL, "ldap.protocolOp", NULL);
|
||||
for (i = 0; i < LDAP_NUM_PROCEDURES; i++)
|
||||
{
|
||||
init_srt_table_row(ldap_srt_table, i, val_to_str_const(i, ldap_procedure_names, "<unknown>"));
|
||||
|
|
|
@ -398,45 +398,45 @@ WS_DLL_PUBLIC_DEF const value_string ncp_nds_verb_vals[] = {
|
|||
};
|
||||
|
||||
static void
|
||||
ncpstat_init(struct register_srt* srt _U_, GArray* srt_array, srt_gui_init_cb gui_callback, void* gui_data)
|
||||
ncpstat_init(struct register_srt* srt _U_, GArray* srt_array)
|
||||
{
|
||||
/* Initialize all of the SRT tables with 0 rows. That way we can "filter" the drawing
|
||||
function to only output tables with rows > 0 */
|
||||
|
||||
init_srt_table("NCP", "Groups", srt_array, NCP_NUM_PROCEDURES, NULL, "ncp.group", gui_callback, gui_data, NULL);
|
||||
init_srt_table("NCP", "Groups", srt_array, NCP_NUM_PROCEDURES, NULL, "ncp.group", NULL);
|
||||
|
||||
/* NDS Verbs */
|
||||
init_srt_table("NDS Verbs", "NDS", srt_array, NCP_NUM_PROCEDURES, NULL, "ncp.ndsverb", gui_callback, gui_data, NULL);
|
||||
init_srt_table("NDS Verbs", "NDS", srt_array, NCP_NUM_PROCEDURES, NULL, "ncp.ndsverb", NULL);
|
||||
|
||||
/* NCP Functions */
|
||||
init_srt_table("NCP Functions without Subfunctions", "Functions", srt_array, NCP_NUM_PROCEDURES, NULL, "ncp.func", gui_callback, gui_data, NULL);
|
||||
init_srt_table("NCP Functions without Subfunctions", "Functions", srt_array, NCP_NUM_PROCEDURES, NULL, "ncp.func", NULL);
|
||||
|
||||
/* Secret Store Verbs */
|
||||
init_srt_table("Secret Store Verbs", "SSS", srt_array, NCP_NUM_PROCEDURES, NULL, "sss.subverb", gui_callback, gui_data, NULL);
|
||||
init_srt_table("Secret Store Verbs", "SSS", srt_array, NCP_NUM_PROCEDURES, NULL, "sss.subverb", NULL);
|
||||
|
||||
/* NMAS Verbs */
|
||||
init_srt_table("NMAS Verbs", "NMAS", srt_array, NCP_NUM_PROCEDURES, NULL, "nmas.subverb", gui_callback, gui_data, NULL);
|
||||
init_srt_table("NMAS Verbs", "NMAS", srt_array, NCP_NUM_PROCEDURES, NULL, "nmas.subverb", NULL);
|
||||
|
||||
/* NCP Subfunctions */
|
||||
init_srt_table("Subfunctions for NCP 17", "17", srt_array, NCP_NUM_PROCEDURES, NULL, "ncp.func==17 && ncp.subfunc", gui_callback, gui_data, NULL);
|
||||
init_srt_table("Subfunctions for NCP 21", "21", srt_array, NCP_NUM_PROCEDURES, NULL, "ncp.func==21 && ncp.subfunc", gui_callback, gui_data, NULL);
|
||||
init_srt_table("Subfunctions for NCP 22", "22", srt_array, NCP_NUM_PROCEDURES, NULL, "ncp.func==22 && ncp.subfunc", gui_callback, gui_data, NULL);
|
||||
init_srt_table("Subfunctions for NCP 23", "23", srt_array, NCP_NUM_PROCEDURES, NULL, "ncp.func==23 && ncp.subfunc", gui_callback, gui_data, NULL);
|
||||
init_srt_table("Subfunctions for NCP 32", "32", srt_array, NCP_NUM_PROCEDURES, NULL, "ncp.func==32 && ncp.subfunc", gui_callback, gui_data, NULL);
|
||||
init_srt_table("Subfunctions for NCP 34", "34", srt_array, NCP_NUM_PROCEDURES, NULL, "ncp.func==34 && ncp.subfunc", gui_callback, gui_data, NULL);
|
||||
init_srt_table("Subfunctions for NCP 35", "35", srt_array, NCP_NUM_PROCEDURES, NULL, "ncp.func==35 && ncp.subfunc", gui_callback, gui_data, NULL);
|
||||
init_srt_table("Subfunctions for NCP 36", "36", srt_array, NCP_NUM_PROCEDURES, NULL, "ncp.func==36 && ncp.subfunc", gui_callback, gui_data, NULL);
|
||||
init_srt_table("Subfunctions for NCP 86", "86", srt_array, NCP_NUM_PROCEDURES, NULL, "ncp.func==86 && ncp.subfunc", gui_callback, gui_data, NULL);
|
||||
init_srt_table("Subfunctions for NCP 87", "87", srt_array, NCP_NUM_PROCEDURES, NULL, "ncp.func==87 && ncp.subfunc", gui_callback, gui_data, NULL);
|
||||
init_srt_table("Subfunctions for NCP 89 (Extended NCP's with UTF8 Support)", "89", srt_array, NCP_NUM_PROCEDURES, NULL, "ncp.func==89 && ncp.subfunc", gui_callback, gui_data, NULL);
|
||||
init_srt_table("Subfunctions for NCP 90", "90", srt_array, NCP_NUM_PROCEDURES, NULL, "ncp.func==90 && ncp.subfunc", gui_callback, gui_data, NULL);
|
||||
init_srt_table("Subfunctions for NCP 92 (Secret Store Services)", "92", srt_array, NCP_NUM_PROCEDURES, NULL, "ncp.func==92 && ncp.subfunc", gui_callback, gui_data, NULL);
|
||||
init_srt_table("Subfunctions for NCP 94 (Novell Modular Authentication Services)", "94", srt_array, NCP_NUM_PROCEDURES, NULL, "ncp.func==94 && ncp.subfunc", gui_callback, gui_data, NULL);
|
||||
init_srt_table("Subfunctions for NCP 104", "104", srt_array, NCP_NUM_PROCEDURES, NULL, "ncp.func==104 && ncp.subfunc", gui_callback, gui_data, NULL);
|
||||
init_srt_table("Subfunctions for NCP 111", "111", srt_array, NCP_NUM_PROCEDURES, NULL, "ncp.func==111 && ncp.subfunc", gui_callback, gui_data, NULL);
|
||||
init_srt_table("Subfunctions for NCP 114", "114", srt_array, NCP_NUM_PROCEDURES, NULL, "ncp.func==114 && ncp.subfunc", gui_callback, gui_data, NULL);
|
||||
init_srt_table("Subfunctions for NCP 123", "123", srt_array, NCP_NUM_PROCEDURES, NULL, "ncp.func==123 && ncp.subfunc", gui_callback, gui_data, NULL);
|
||||
init_srt_table("Subfunctions for NCP 131", "131", srt_array, NCP_NUM_PROCEDURES, NULL, "ncp.func==131 && ncp.subfunc", gui_callback, gui_data, NULL);
|
||||
init_srt_table("Subfunctions for NCP 17", "17", srt_array, NCP_NUM_PROCEDURES, NULL, "ncp.func==17 && ncp.subfunc", NULL);
|
||||
init_srt_table("Subfunctions for NCP 21", "21", srt_array, NCP_NUM_PROCEDURES, NULL, "ncp.func==21 && ncp.subfunc", NULL);
|
||||
init_srt_table("Subfunctions for NCP 22", "22", srt_array, NCP_NUM_PROCEDURES, NULL, "ncp.func==22 && ncp.subfunc", NULL);
|
||||
init_srt_table("Subfunctions for NCP 23", "23", srt_array, NCP_NUM_PROCEDURES, NULL, "ncp.func==23 && ncp.subfunc", NULL);
|
||||
init_srt_table("Subfunctions for NCP 32", "32", srt_array, NCP_NUM_PROCEDURES, NULL, "ncp.func==32 && ncp.subfunc", NULL);
|
||||
init_srt_table("Subfunctions for NCP 34", "34", srt_array, NCP_NUM_PROCEDURES, NULL, "ncp.func==34 && ncp.subfunc", NULL);
|
||||
init_srt_table("Subfunctions for NCP 35", "35", srt_array, NCP_NUM_PROCEDURES, NULL, "ncp.func==35 && ncp.subfunc", NULL);
|
||||
init_srt_table("Subfunctions for NCP 36", "36", srt_array, NCP_NUM_PROCEDURES, NULL, "ncp.func==36 && ncp.subfunc", NULL);
|
||||
init_srt_table("Subfunctions for NCP 86", "86", srt_array, NCP_NUM_PROCEDURES, NULL, "ncp.func==86 && ncp.subfunc", NULL);
|
||||
init_srt_table("Subfunctions for NCP 87", "87", srt_array, NCP_NUM_PROCEDURES, NULL, "ncp.func==87 && ncp.subfunc", NULL);
|
||||
init_srt_table("Subfunctions for NCP 89 (Extended NCP's with UTF8 Support)", "89", srt_array, NCP_NUM_PROCEDURES, NULL, "ncp.func==89 && ncp.subfunc", NULL);
|
||||
init_srt_table("Subfunctions for NCP 90", "90", srt_array, NCP_NUM_PROCEDURES, NULL, "ncp.func==90 && ncp.subfunc", NULL);
|
||||
init_srt_table("Subfunctions for NCP 92 (Secret Store Services)", "92", srt_array, NCP_NUM_PROCEDURES, NULL, "ncp.func==92 && ncp.subfunc", NULL);
|
||||
init_srt_table("Subfunctions for NCP 94 (Novell Modular Authentication Services)", "94", srt_array, NCP_NUM_PROCEDURES, NULL, "ncp.func==94 && ncp.subfunc", NULL);
|
||||
init_srt_table("Subfunctions for NCP 104", "104", srt_array, NCP_NUM_PROCEDURES, NULL, "ncp.func==104 && ncp.subfunc", NULL);
|
||||
init_srt_table("Subfunctions for NCP 111", "111", srt_array, NCP_NUM_PROCEDURES, NULL, "ncp.func==111 && ncp.subfunc", NULL);
|
||||
init_srt_table("Subfunctions for NCP 114", "114", srt_array, NCP_NUM_PROCEDURES, NULL, "ncp.func==114 && ncp.subfunc", NULL);
|
||||
init_srt_table("Subfunctions for NCP 123", "123", srt_array, NCP_NUM_PROCEDURES, NULL, "ncp.func==123 && ncp.subfunc", NULL);
|
||||
init_srt_table("Subfunctions for NCP 131", "131", srt_array, NCP_NUM_PROCEDURES, NULL, "ncp.func==131 && ncp.subfunc", NULL);
|
||||
}
|
||||
|
||||
static int
|
||||
|
|
|
@ -340,7 +340,7 @@ rpcstat_find_procs(const gchar *table_name _U_, ftenum_t selector_type _U_, gpoi
|
|||
}
|
||||
|
||||
static void
|
||||
rpcstat_init(struct register_srt* srt, GArray* srt_array, srt_gui_init_cb gui_callback, void* gui_data)
|
||||
rpcstat_init(struct register_srt* srt, GArray* srt_array)
|
||||
{
|
||||
rpcstat_tap_data_t* tap_data = (rpcstat_tap_data_t*)get_srt_table_param_data(srt);
|
||||
srt_stat_table *rpc_srt_table;
|
||||
|
@ -354,7 +354,7 @@ rpcstat_init(struct register_srt* srt, GArray* srt_array, srt_gui_init_cb gui_ca
|
|||
hfi=proto_registrar_get_nth(hf_index);
|
||||
|
||||
g_snprintf(table_name, sizeof(table_name), "%s Version %u", tap_data->prog, tap_data->version);
|
||||
rpc_srt_table = init_srt_table(table_name, NULL, srt_array, tap_data->num_procedures, NULL, hfi->abbrev, gui_callback, gui_data, tap_data);
|
||||
rpc_srt_table = init_srt_table(table_name, NULL, srt_array, tap_data->num_procedures, NULL, hfi->abbrev, tap_data);
|
||||
for (i = 0; i < rpc_srt_table->num_procs; i++)
|
||||
{
|
||||
char *proc_name = rpc_proc_name_internal(NULL, tap_data->program, tap_data->version, i);
|
||||
|
|
|
@ -949,7 +949,7 @@ typedef struct scsistat_tap_data
|
|||
} scsistat_tap_data_t;
|
||||
|
||||
static void
|
||||
scsistat_init(struct register_srt* srt, GArray* srt_array, srt_gui_init_cb gui_callback, void* gui_data)
|
||||
scsistat_init(struct register_srt* srt, GArray* srt_array)
|
||||
{
|
||||
scsistat_tap_data_t* tap_data = (scsistat_tap_data_t*)get_srt_table_param_data(srt);
|
||||
srt_stat_table *scsi_srt_table;
|
||||
|
@ -957,7 +957,7 @@ scsistat_init(struct register_srt* srt, GArray* srt_array, srt_gui_init_cb gui_c
|
|||
|
||||
DISSECTOR_ASSERT(tap_data);
|
||||
|
||||
scsi_srt_table = init_srt_table(tap_data->prog, NULL, srt_array, SCSI_NUM_PROCEDURES, NULL, tap_data->hf_name, gui_callback, gui_data, tap_data);
|
||||
scsi_srt_table = init_srt_table(tap_data->prog, NULL, srt_array, SCSI_NUM_PROCEDURES, NULL, tap_data->hf_name, tap_data);
|
||||
for (i = 0; i < SCSI_NUM_PROCEDURES; i++)
|
||||
{
|
||||
init_srt_table_row(scsi_srt_table, i, val_to_str_ext_const(i, tap_data->cdbnames_ext, "Unknown-0x%02x"));
|
||||
|
|
|
@ -905,16 +905,16 @@ static int dissect_smb_command(tvbuff_t *tvb, packet_info *pinfo, int offset, pr
|
|||
#define NT_SRT_TABLE_INDEX 2
|
||||
|
||||
static void
|
||||
smbstat_init(struct register_srt* srt _U_, GArray* srt_array, srt_gui_init_cb gui_callback, void* gui_data)
|
||||
smbstat_init(struct register_srt* srt _U_, GArray* srt_array)
|
||||
{
|
||||
srt_stat_table *smb_srt_table;
|
||||
srt_stat_table *trans2_srt_table;
|
||||
srt_stat_table *nt_srt_table;
|
||||
guint32 i;
|
||||
|
||||
smb_srt_table = init_srt_table("SMB Commands", NULL, srt_array, SMB_NUM_PROCEDURES, "Commands", "smb.cmd", gui_callback, gui_data, NULL);
|
||||
trans2_srt_table = init_srt_table("Transaction2 Sub-Commands", NULL, srt_array, SMB_NUM_PROCEDURES, "Transaction2 Commands", "smb.trans2.cmd", gui_callback, gui_data, NULL);
|
||||
nt_srt_table = init_srt_table("NT Transaction Sub-Commands", NULL, srt_array, SMB_NUM_PROCEDURES, "NT Transaction Sub-Commands", "smb.nt.function", gui_callback, gui_data, NULL);
|
||||
smb_srt_table = init_srt_table("SMB Commands", NULL, srt_array, SMB_NUM_PROCEDURES, "Commands", "smb.cmd", NULL);
|
||||
trans2_srt_table = init_srt_table("Transaction2 Sub-Commands", NULL, srt_array, SMB_NUM_PROCEDURES, "Transaction2 Commands", "smb.trans2.cmd", NULL);
|
||||
nt_srt_table = init_srt_table("NT Transaction Sub-Commands", NULL, srt_array, SMB_NUM_PROCEDURES, "NT Transaction Sub-Commands", "smb.nt.function", NULL);
|
||||
for (i = 0; i < SMB_NUM_PROCEDURES; i++)
|
||||
{
|
||||
init_srt_table_row(smb_srt_table, i, val_to_str_ext_const(i, &smb_cmd_vals_ext, "<unknown>"));
|
||||
|
|
|
@ -819,12 +819,12 @@ static const val64_string unique_unsolicited_response[] = {
|
|||
#define SMB2_NUM_PROCEDURES 256
|
||||
|
||||
static void
|
||||
smb2stat_init(struct register_srt* srt _U_, GArray* srt_array, srt_gui_init_cb gui_callback, void* gui_data)
|
||||
smb2stat_init(struct register_srt* srt _U_, GArray* srt_array)
|
||||
{
|
||||
srt_stat_table *smb2_srt_table;
|
||||
guint32 i;
|
||||
|
||||
smb2_srt_table = init_srt_table("SMB2", NULL, srt_array, SMB2_NUM_PROCEDURES, "Commands", "smb2.cmd", gui_callback, gui_data, NULL);
|
||||
smb2_srt_table = init_srt_table("SMB2", NULL, srt_array, SMB2_NUM_PROCEDURES, "Commands", "smb2.cmd", NULL);
|
||||
for (i = 0; i < SMB2_NUM_PROCEDURES; i++)
|
||||
{
|
||||
init_srt_table_row(smb2_srt_table, i, val_to_str_ext_const(i, &smb2_cmd_vals_ext, "<unknown>"));
|
||||
|
|
|
@ -75,7 +75,7 @@ free_srt_table_data(srt_stat_table *rst)
|
|||
rst->num_procs=0;
|
||||
}
|
||||
|
||||
void free_srt_table(register_srt_t *srt, GArray* srt_array, srt_gui_free_cb gui_callback, void *callback_data)
|
||||
void free_srt_table(register_srt_t *srt, GArray* srt_array)
|
||||
{
|
||||
guint i = 0;
|
||||
srt_stat_table *srt_table;
|
||||
|
@ -84,10 +84,6 @@ void free_srt_table(register_srt_t *srt, GArray* srt_array, srt_gui_free_cb gui_
|
|||
{
|
||||
srt_table = g_array_index(srt_array, srt_stat_table*, i);
|
||||
|
||||
/* Give GUI the first crack at it before we clean up */
|
||||
if (gui_callback)
|
||||
gui_callback(srt_table, callback_data);
|
||||
|
||||
free_srt_table_data(srt_table);
|
||||
g_free(srt_table);
|
||||
}
|
||||
|
@ -109,7 +105,7 @@ static void reset_srt_table_data(srt_stat_table *rst)
|
|||
}
|
||||
}
|
||||
|
||||
void reset_srt_table(GArray* srt_array, srt_gui_reset_cb gui_callback, void *callback_data)
|
||||
void reset_srt_table(GArray* srt_array)
|
||||
{
|
||||
guint i = 0;
|
||||
srt_stat_table *srt_table;
|
||||
|
@ -118,10 +114,6 @@ void reset_srt_table(GArray* srt_array, srt_gui_reset_cb gui_callback, void *cal
|
|||
{
|
||||
srt_table = g_array_index(srt_array, srt_stat_table*, i);
|
||||
|
||||
/* Give GUI the first crack at it before we clean up */
|
||||
if (gui_callback)
|
||||
gui_callback(srt_table, callback_data);
|
||||
|
||||
reset_srt_table_data(srt_table);
|
||||
}
|
||||
}
|
||||
|
@ -169,9 +161,9 @@ void srt_table_get_filter(register_srt_t* srt, const char *opt_arg, const char *
|
|||
g_free(cmd_str);
|
||||
}
|
||||
|
||||
void srt_table_dissector_init(register_srt_t* srt, GArray* srt_array, srt_gui_init_cb gui_callback, void *callback_data)
|
||||
void srt_table_dissector_init(register_srt_t* srt, GArray* srt_array)
|
||||
{
|
||||
srt->srt_init(srt, srt_array, gui_callback, callback_data);
|
||||
srt->srt_init(srt, srt_array);
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -207,7 +199,7 @@ void srt_table_iterate_tables(wmem_foreach_func func, gpointer user_data)
|
|||
|
||||
srt_stat_table*
|
||||
init_srt_table(const char *name, const char *short_name, GArray *srt_array, int num_procs, const char* proc_column_name,
|
||||
const char *filter_string, srt_gui_init_cb gui_callback, void* gui_data, void* table_specific_data)
|
||||
const char *filter_string, void* table_specific_data)
|
||||
{
|
||||
int i;
|
||||
srt_stat_table *table = g_new(srt_stat_table, 1);
|
||||
|
@ -229,9 +221,6 @@ init_srt_table(const char *name, const char *short_name, GArray *srt_array, int
|
|||
|
||||
table->table_specific_data = table_specific_data;
|
||||
|
||||
if (gui_callback)
|
||||
gui_callback(table, gui_data);
|
||||
|
||||
return table;
|
||||
}
|
||||
|
||||
|
|
|
@ -40,11 +40,8 @@ typedef struct _srt_stat_table {
|
|||
|
||||
struct register_srt;
|
||||
struct _srt_data_t;
|
||||
typedef void (*srt_gui_init_cb)(srt_stat_table* rst, void* gui_data); /* GTK+ only? */
|
||||
typedef void (*srt_gui_reset_cb)(srt_stat_table* rst, void* gui_data); /* GTK+ only? */
|
||||
typedef void (*srt_gui_free_cb)(srt_stat_table* rst, void* gui_data); /* GTK+ only? */
|
||||
typedef void (*srt_proc_table_cb)(srt_stat_table* rst, int indx, struct _srt_data_t* gui_data);
|
||||
typedef void (*srt_init_cb)(struct register_srt* srt, GArray* srt_array, srt_gui_init_cb gui_callback, void* gui_data);
|
||||
typedef void (*srt_init_cb)(struct register_srt* srt, GArray* srt_array);
|
||||
typedef guint (*srt_param_handler_cb)(struct register_srt* srt, const char* opt_arg, char** err);
|
||||
|
||||
/** tap data
|
||||
|
@ -129,18 +126,14 @@ WS_DLL_PUBLIC void free_srt_table_data(srt_stat_table *rst);
|
|||
*
|
||||
* @param srt Registered SRT
|
||||
* @param srt_array SRT table array
|
||||
* @param gui_callback optional callback from GUI
|
||||
* @param callback_data callback data needed for GUI
|
||||
*/
|
||||
WS_DLL_PUBLIC void free_srt_table(register_srt_t *srt, GArray* srt_array, srt_gui_free_cb gui_callback, void *callback_data);
|
||||
WS_DLL_PUBLIC void free_srt_table(register_srt_t *srt, GArray* srt_array);
|
||||
|
||||
/** Reset ALL tables in the srt.
|
||||
*
|
||||
* @param srt_array SRT table array
|
||||
* @param gui_callback optional callback from GUI
|
||||
* @param callback_data callback data needed for GUI
|
||||
*/
|
||||
WS_DLL_PUBLIC void reset_srt_table(GArray* srt_array, srt_gui_reset_cb gui_callback, void *callback_data);
|
||||
WS_DLL_PUBLIC void reset_srt_table(GArray* srt_array);
|
||||
|
||||
/** Interator to walk srt tables and execute func
|
||||
* Used for initialization
|
||||
|
@ -163,10 +156,8 @@ WS_DLL_PUBLIC void srt_table_get_filter(register_srt_t* srt, const char *opt_arg
|
|||
*
|
||||
* @param srt Registered SRT
|
||||
* @param srt_array SRT table array
|
||||
* @param gui_callback optional callback from GUI
|
||||
* @param callback_data callback data needed for GUI
|
||||
*/
|
||||
WS_DLL_PUBLIC void srt_table_dissector_init(register_srt_t* srt, GArray* srt_array, srt_gui_init_cb gui_callback, void *callback_data);
|
||||
WS_DLL_PUBLIC void srt_table_dissector_init(register_srt_t* srt, GArray* srt_array);
|
||||
|
||||
/** Helper function to get tap string name
|
||||
* Caller is responsible for freeing returned string
|
||||
|
@ -184,13 +175,11 @@ WS_DLL_PUBLIC gchar* srt_table_get_tap_string(register_srt_t* srt);
|
|||
* @param num_procs number of procedures
|
||||
* @param proc_column_name procedure column name (if different from "Procedure")
|
||||
* @param filter_string table filter string or NULL
|
||||
* @param gui_callback optional GUI callback
|
||||
* @param gui_data GUI content data
|
||||
* @param table_specific_data Table specific data
|
||||
* @return newly created srt_stat_table
|
||||
*/
|
||||
WS_DLL_PUBLIC srt_stat_table* init_srt_table(const char *name, const char *short_name, GArray *srt_array, int num_procs, const char* proc_column_name,
|
||||
const char *filter_string, srt_gui_init_cb gui_callback, void* gui_data, void* table_specific_data);
|
||||
const char *filter_string, void* table_specific_data);
|
||||
|
||||
/** Init an srt table row data structure.
|
||||
*
|
||||
|
|
|
@ -1963,7 +1963,7 @@ sharkd_session_free_tap_srt_cb(void *arg)
|
|||
srt_data_t *srt_data = (srt_data_t *) arg;
|
||||
register_srt_t *srt = (register_srt_t *) srt_data->user_data;
|
||||
|
||||
free_srt_table(srt, srt_data->srt_array, NULL, NULL);
|
||||
free_srt_table(srt, srt_data->srt_array);
|
||||
g_array_free(srt_data->srt_array, TRUE);
|
||||
g_free(srt_data);
|
||||
}
|
||||
|
@ -2380,7 +2380,7 @@ sharkd_session_process_tap(char *buf, const jsmntok_t *tokens, int count)
|
|||
srt_data = g_new0(srt_data_t, 1);
|
||||
srt_data->srt_array = g_array_new(FALSE, TRUE, sizeof(srt_stat_table *));
|
||||
srt_data->user_data = srt;
|
||||
srt_table_dissector_init(srt, srt_data->srt_array, NULL, NULL);
|
||||
srt_table_dissector_init(srt, srt_data->srt_array);
|
||||
|
||||
tap_error = register_tap_listener(get_srt_tap_listener_name(srt), srt_data, tap_filter, 0, NULL, get_srt_packet_func(srt), sharkd_session_process_tap_srt_cb);
|
||||
|
||||
|
|
|
@ -116,7 +116,7 @@ init_srt_tables(register_srt_t* srt, const char *filter)
|
|||
|
||||
error_string = register_tap_listener(get_srt_tap_listener_name(srt), &ui->data, filter, 0, NULL, get_srt_packet_func(srt), srt_draw);
|
||||
if (error_string) {
|
||||
free_srt_table(srt, global_srt_array, NULL, NULL);
|
||||
free_srt_table(srt, global_srt_array);
|
||||
g_free(ui);
|
||||
fprintf(stderr, "tshark: Couldn't register srt tap: %s\n", error_string->str);
|
||||
g_string_free(error_string, TRUE);
|
||||
|
@ -144,7 +144,7 @@ dissector_srt_init(const char *opt_arg, void* userdata)
|
|||
/* Need to create the SRT array now */
|
||||
global_srt_array = g_array_new(FALSE, TRUE, sizeof(srt_stat_table*));
|
||||
|
||||
srt_table_dissector_init(srt, global_srt_array, NULL, NULL);
|
||||
srt_table_dissector_init(srt, global_srt_array);
|
||||
init_srt_tables(srt, filter);
|
||||
}
|
||||
|
||||
|
|
|
@ -204,7 +204,7 @@ ServiceResponseTimeDialog::ServiceResponseTimeDialog(QWidget &parent, CaptureFil
|
|||
ServiceResponseTimeDialog::~ServiceResponseTimeDialog()
|
||||
{
|
||||
if (srt_data_.srt_array) {
|
||||
free_srt_table(srt_, srt_data_.srt_array, NULL, NULL);
|
||||
free_srt_table(srt_, srt_data_.srt_array);
|
||||
g_array_free(srt_data_.srt_array, TRUE);
|
||||
}
|
||||
}
|
||||
|
@ -232,7 +232,7 @@ void ServiceResponseTimeDialog::tapReset(void *srtd_ptr)
|
|||
ServiceResponseTimeDialog *srt_dlg = static_cast<ServiceResponseTimeDialog *>(srtd->user_data);
|
||||
if (!srt_dlg) return;
|
||||
|
||||
reset_srt_table(srtd->srt_array, NULL, NULL);
|
||||
reset_srt_table(srtd->srt_array);
|
||||
|
||||
srt_dlg->statsTreeWidget()->clear();
|
||||
}
|
||||
|
@ -269,7 +269,7 @@ void ServiceResponseTimeDialog::endRetapPackets()
|
|||
void ServiceResponseTimeDialog::fillTree()
|
||||
{
|
||||
if (srt_data_.srt_array) {
|
||||
free_srt_table(srt_, srt_data_.srt_array, NULL, NULL);
|
||||
free_srt_table(srt_, srt_data_.srt_array);
|
||||
g_array_free(srt_data_.srt_array, TRUE);
|
||||
}
|
||||
srt_data_.srt_array = g_array_new(FALSE, TRUE, sizeof(srt_stat_table*));
|
||||
|
@ -277,7 +277,7 @@ void ServiceResponseTimeDialog::fillTree()
|
|||
|
||||
provideParameterData();
|
||||
|
||||
srt_table_dissector_init(srt_, srt_data_.srt_array, NULL, NULL);
|
||||
srt_table_dissector_init(srt_, srt_data_.srt_array);
|
||||
|
||||
QString display_filter = displayFilter();
|
||||
if (!registerTapListener(get_srt_tap_listener_name(srt_),
|
||||
|
|
Loading…
Reference in New Issue