/* init the range struct */ void packet_range_init(packet_range_t *range, capture_file *cf) { memset(range, 0, sizeof(packet_range_t)); range->process = range_process_all; range->user_range = range_empty(); range->cf = cf; /* calculate all packet range counters */ packet_range_calc(range); packet_range_calc_user(range); }
/* init the range struct */ void packet_range_init(packet_range_t *range) { range->process = range_process_all; range->process_filtered = FALSE; range->remove_ignored = FALSE; range->user_range = range_empty(); /* calculate all packet range counters */ packet_range_calc(range); packet_range_calc_user(range); }
void proto_register_tcap(void) { /* Setup list of header fields See Section 1.6.1 for details*/ static hf_register_info hf[] = { { &hf_tcap_tag, { "Tag", "tcap.msgtype", FT_UINT8, BASE_HEX, NULL, 0, NULL, HFILL } }, { &hf_tcap_length, { "Length", "tcap.len", FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL } }, { &hf_tcap_data, { "Data", "tcap.data", FT_BYTES, BASE_NONE, NULL, 0, NULL, HFILL } }, { &hf_tcap_tid, { "Transaction Id", "tcap.tid", FT_BYTES, BASE_NONE, NULL, 0, NULL, HFILL } }, /* Tcap Service Response Time */ { &hf_tcapsrt_SessionId, { "Session Id", "tcap.srt.session_id", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL } }, { &hf_tcapsrt_BeginSession, { "Begin Session", "tcap.srt.begin", FT_FRAMENUM, BASE_NONE, NULL, 0x0, "SRT Begin of Session", HFILL } }, { &hf_tcapsrt_EndSession, { "End Session", "tcap.srt.end", FT_FRAMENUM, BASE_NONE, NULL, 0x0, "SRT End of Session", HFILL } }, { &hf_tcapsrt_SessionTime, { "Session duration", "tcap.srt.sessiontime", FT_RELATIVE_TIME, BASE_NONE, NULL, 0x0, "Duration of the TCAP session", HFILL } }, { &hf_tcapsrt_Duplicate, { "Session Duplicate", "tcap.srt.duplicate", FT_FRAMENUM, BASE_NONE, NULL, 0x0, "SRT Duplicated with Session", HFILL } }, #include "packet-tcap-hfarr.c" }; /* Setup protocol subtree array */ static gint *ett[] = { &ett_tcap, &ett_param, &ett_otid, &ett_dtid, &ett_tcap_stat, #include "packet-tcap-ettarr.c" }; /*static enum_val_t tcap_options[] = { { "itu", "ITU", ITU_TCAP_STANDARD }, { "ansi", "ANSI", ANSI_TCAP_STANDARD }, { NULL, NULL, 0 } };*/ module_t *tcap_module; /* Register the protocol name and description */ proto_tcap = proto_register_protocol(PNAME, PSNAME, PFNAME); /* Required function calls to register the header fields and subtrees used */ proto_register_field_array(proto_tcap, hf, array_length(hf)); proto_register_subtree_array(ett, array_length(ett)); tcap_module = prefs_register_protocol(proto_tcap, NULL); #if 0 prefs_register_enum_preference(tcap_module, "standard", "ITU TCAP standard", "The SS7 standard used in ITU TCAP packets", &tcap_standard, tcap_options, FALSE); #else prefs_register_obsolete_preference(tcap_module, "standard"); #endif #if 0 prefs_register_bool_preference(tcap_module, "lock_info_col", "Lock Info column", "Always show TCAP in Info column", &lock_info_col); #else prefs_register_obsolete_preference(tcap_module, "lock_info_col"); #endif /* Set default SSNs */ range_convert_str(&global_ssn_range, "", MAX_SSN); ssn_range = range_empty(); prefs_register_range_preference(tcap_module, "ssn", "SCCP SSNs", "SCCP (and SUA) SSNs to decode as TCAP", &global_ssn_range, MAX_SSN); prefs_register_bool_preference(tcap_module, "srt", "Service Response Time Analyse", "Activate the analyse for Response Time", >cap_HandleSRT); prefs_register_bool_preference(tcap_module, "persistentsrt", "Persistent stats for SRT", "Statistics for Response Time", >cap_PersistentSRT); prefs_register_uint_preference(tcap_module, "repetitiontimeout", "Repetition timeout", "Maximal delay for message repetion", 10, >cap_RepetitionTimeout); prefs_register_uint_preference(tcap_module, "losttimeout", "lost timeout", "Maximal delay for message lost", 10, >cap_LostTimeout); ansi_sub_dissectors = g_hash_table_new(g_direct_hash,g_direct_equal); itu_sub_dissectors = g_hash_table_new(g_direct_hash,g_direct_equal); /* 'globally' register dissector */ register_dissector("tcap", dissect_tcap, proto_tcap); tcap_handle = create_dissector_handle(dissect_tcap, proto_tcap); register_init_routine(&init_tcap); }
void proto_register_nasdaq_soup(void) { /* Setup list of header fields See Section 1.6.1 for details*/ static hf_register_info hf[] = { { &hf_nasdaq_soup_packet_type, { "Packet Type", "nasdaq-soup.packet_type", FT_UINT8, BASE_DEC, VALS(message_types_val), 0x0, NULL, HFILL } }, { &hf_nasdaq_soup_reject_code, { "Login Reject Code", "nasdaq-soup.reject_code", FT_UINT8, BASE_DEC, VALS(reject_code_val), 0x0, NULL, HFILL } }, { &hf_nasdaq_soup_message, { "Message", "nasdaq-soup.message", FT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL } }, { &hf_nasdaq_soup_text, { "Debug Text", "nasdaq-soup.text", FT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL } }, { &hf_nasdaq_soup_username, { "User Name", "nasdaq-soup.username", FT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL } }, { &hf_nasdaq_soup_password, { "Password", "nasdaq-soup.password", FT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL } }, { &hf_nasdaq_soup_session, { "Session", "nasdaq-soup.session", FT_STRING, BASE_NONE, NULL, 0x0, "Session ID", HFILL } }, { &hf_nasdaq_soup_seq_number, { "Sequence number", "nasdaq-soup.seq_number", FT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL } }, { &hf_nasdaq_soup_packet_eol, { "End Of Packet", "nasdaq-soup.packet_eol", FT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL } } }; /* Setup protocol subtree array */ static gint *ett[] = { &ett_nasdaq_soup }; module_t *nasdaq_soup_module; /* Register the protocol name and description */ proto_nasdaq_soup = proto_register_protocol("Nasdaq-SoupTCP version 2.0","NASDAQ-SOUP", "nasdaq_soup"); /* Required function calls to register the header fields and subtrees used */ proto_register_field_array(proto_nasdaq_soup, hf, array_length(hf)); proto_register_subtree_array(ett, array_length(ett)); nasdaq_soup_module = prefs_register_protocol(proto_nasdaq_soup, nasdaq_soup_prefs); prefs_register_bool_preference(nasdaq_soup_module, "desegment", "Reassemble Nasdaq-SoupTCP messages spanning multiple TCP segments", "Whether the Nasdaq-SoupTCP dissector should reassemble messages spanning multiple TCP segments.", &nasdaq_soup_desegment); prefs_register_range_preference(nasdaq_soup_module, "tcp.port", "TCP Ports", "TCP Ports range", &global_nasdaq_soup_tcp_range, 65535); nasdaq_soup_tcp_range = range_empty(); }
void proto_register_gopher(void) { static hf_register_info hf[] = { { &hf_gopher_request, { "Gopher client request", "gopher.request", FT_STRING, BASE_NONE, NULL, 0, NULL, HFILL } }, { &hf_gopher_dir_item, { "Directory item", "gopher.directory", FT_STRING, BASE_NONE, NULL, 0, NULL, HFILL } }, { &hf_gopher_di_type, { "Type", "gopher.directory.type", FT_UINT8, BASE_HEX, VALS(item_types), 0, NULL, HFILL } }, { &hf_gopher_di_name, { "Name", "gopher.directory.name", FT_STRING, BASE_NONE, NULL, 0, NULL, HFILL } }, { &hf_gopher_di_selector, { "Selector", "gopher.directory.selector", FT_STRING, BASE_NONE, NULL, 0, NULL, HFILL } }, { &hf_gopher_di_host, { "Host", "gopher.directory.host", FT_STRING, BASE_NONE, NULL, 0, NULL, HFILL } }, { &hf_gopher_di_port, { "Port", "gopher.directory.port", FT_STRING, BASE_NONE, NULL, 0, NULL, HFILL } }, { &hf_gopher_unknown, { "Unknown Gopher transaction data", "gopher.unknown", FT_STRING, BASE_NONE, NULL, 0, NULL, HFILL } } }; module_t *gopher_module; /* Setup protocol subtree array */ static gint *ett[] = { &ett_gopher, &ett_dir_item }; /* Register the protocol name and description */ proto_gopher = proto_register_protocol("Gopher", "Gopher", "gopher"); /* Required function calls to register the header fields and subtrees used */ proto_register_field_array(proto_gopher, hf, array_length(hf)); proto_register_subtree_array(ett, array_length(ett)); /* Initialize dissector preferences */ gopher_module = prefs_register_protocol(proto_gopher, gopher_prefs_apply); range_convert_str(&global_gopher_tcp_range, TCP_DEFAULT_RANGE, 65535); gopher_tcp_range = range_empty(); prefs_register_range_preference(gopher_module, "tcp.port", "TCP Ports", "TCP Ports range", &global_gopher_tcp_range, 65535); }