forked from osmocom/wireshark
Add a "failed" return for tap packet routines.
This allows taps that can fail to report an error and fail; a failed tap's packet routine won't be called again, so they don't have to keep track of whether they've failed themselves. We make the return value from the packet routine an enum. Don't have a separate type for the per-packet routine for "follow" taps; they're expected to act like tap packet routines, so just use the type for tap packet routines. One tap packet routine returned -1; that's not a valid return value, and wasn't one before this change (the return value was a boolean), so presume the intent was "don't redraw". Another tap routine's early return, without doing any work, returned TRUE; this is presumably an error (no work done, no need to redraw), so presumably it should be "don't redraw". Clean up some white space while we're at it. Change-Id: Ia7d2b717b2cace4b13c2b886e699aa4d79cc82c8 Reviewed-on: https://code.wireshark.org/review/31283 Reviewed-by: Guy Harris <guy@alum.mit.edu>
This commit is contained in:
parent
ba589a4e44
commit
2d41b15495
|
@ -65,7 +65,7 @@ The two functions to start or stop tapping are
|
|||
register_tap_listener(const char *tapname, void *tapdata, const char *fstring,
|
||||
guint flags,
|
||||
void (*reset)(void *tapdata),
|
||||
gboolean (*packet)(void *tapdata, packet_info *pinfo, epan_dissect_t *edt, const void *data),
|
||||
tap_packet_status (*packet)(void *tapdata, packet_info *pinfo, epan_dissect_t *edt, const void *data),
|
||||
void (*draw)(void *tapdata),
|
||||
void (*finish)(void *tapdata));
|
||||
|
||||
|
@ -135,14 +135,17 @@ listener that it is about to start [re]reading a capture file or a new capture
|
|||
from an interface and that your application should reset any state it has
|
||||
in the *tapdata instance.
|
||||
|
||||
gboolean (*packet)(void *tapdata, packet_info *pinfo, epan_dissect_t *edt, const void *data)
|
||||
tap_packet_status (*packet)(void *tapdata, packet_info *pinfo, epan_dissect_t *edt, const void *data)
|
||||
This callback is used whenever a new packet has arrived at the tap and that
|
||||
it has passed the filter (if there were a filter).
|
||||
The *data structure type is specific to each tap.
|
||||
This function returns an gboolean and it should return
|
||||
TRUE, if the data in the packet caused state to be updated
|
||||
This function returns a tap_packet_status enum and it should return
|
||||
TAP_PACKET_REDRAW, if the data in the packet caused state to be updated
|
||||
(and thus a redraw of the window would later be required)
|
||||
FALSE, if we don't need to redraw the window.
|
||||
TAP_PACKET_DONT_REDRAW, if we don't need to redraw the window
|
||||
TAP_PACKET_FAILED, if the tap failed and shouldn't be called again
|
||||
in this pass (for example, if it's writing to a file and gets
|
||||
an I/O error)
|
||||
NOTE: that (*packet) should be as fast and efficient as possible. Use this
|
||||
function ONLY to store data for later and do the CPU-intensive processing
|
||||
or GUI updates down in (*draw) instead.
|
||||
|
@ -219,10 +222,10 @@ You can hand register_tap_listener() NULL for (*draw), (*reset) and (*finish)
|
|||
Perhaps you want an extension that will execute a certain command
|
||||
every time it sees a certain packet?
|
||||
Well, try this :
|
||||
gboolean packet(void *tapdata,...) {
|
||||
tap_packet_status packet(void *tapdata,...) {
|
||||
...
|
||||
system("mail ...");
|
||||
return FALSE;
|
||||
return TAP_PACKET_DONT_REDRAW;
|
||||
}
|
||||
|
||||
register_tap_listener("tcp", struct, "tcp.port==57", NULL, packet, NULL, NULL);
|
||||
|
|
|
@ -4474,7 +4474,7 @@ static void ansi_map_stat_init(stat_tap_table_ui* new_stat)
|
|||
}
|
||||
|
||||
|
||||
static gboolean
|
||||
static tap_packet_status
|
||||
ansi_map_stat_packet(void *tapdata, packet_info *pinfo _U_, epan_dissect_t *edt _U_, const void *data)
|
||||
{
|
||||
stat_data_t* stat_data = (stat_data_t*)tapdata;
|
||||
|
@ -4485,7 +4485,7 @@ ansi_map_stat_packet(void *tapdata, packet_info *pinfo _U_, epan_dissect_t *edt
|
|||
|
||||
/* Only tracking field values we know */
|
||||
if (try_val_to_str(data_p->message_type, ansi_map_opr_code_strings) == NULL)
|
||||
return FALSE;
|
||||
return TAP_PACKET_DONT_REDRAW;
|
||||
|
||||
table = g_array_index(stat_data->stat_tap_data->tables, stat_tap_table*, i);
|
||||
|
||||
|
@ -4503,7 +4503,7 @@ ansi_map_stat_packet(void *tapdata, packet_info *pinfo _U_, epan_dissect_t *edt
|
|||
item_data->value.float_value = (float)total_bytes/(float)count;
|
||||
stat_tap_set_field_data(table, data_p->message_type, AVG_BYTES_COLUMN, item_data);
|
||||
|
||||
return TRUE;
|
||||
return TAP_PACKET_REDRAW;
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
|
@ -345,7 +345,7 @@ camelstat_init(struct register_srt* srt _U_, GArray* srt_array)
|
|||
}
|
||||
}
|
||||
|
||||
static gboolean
|
||||
static tap_packet_status
|
||||
camelstat_packet(void *pcamel, packet_info *pinfo, epan_dissect_t *edt _U_, const void *psi)
|
||||
{
|
||||
guint idx = 0;
|
||||
|
@ -364,7 +364,7 @@ camelstat_packet(void *pcamel, packet_info *pinfo, epan_dissect_t *edt _U_, cons
|
|||
add_srt_table_data(camel_srt_table, i, &pi->msginfo[i].req_time, pinfo);
|
||||
}
|
||||
} /* category */
|
||||
return TRUE;
|
||||
return TAP_PACKET_REDRAW;
|
||||
}
|
||||
|
||||
|
||||
|
@ -1239,7 +1239,7 @@ static void camel_stat_init(stat_tap_table_ui* new_stat)
|
|||
}
|
||||
}
|
||||
|
||||
static gboolean
|
||||
static tap_packet_status
|
||||
camel_stat_packet(void *tapdata, packet_info *pinfo _U_, epan_dissect_t *edt _U_, const void *csi_ptr)
|
||||
{
|
||||
stat_data_t* stat_data = (stat_data_t*)tapdata;
|
||||
|
@ -1250,12 +1250,12 @@ camel_stat_packet(void *tapdata, packet_info *pinfo _U_, epan_dissect_t *edt _U_
|
|||
|
||||
table = g_array_index(stat_data->stat_tap_data->tables, stat_tap_table*, i);
|
||||
if (csi->opcode >= table->num_elements)
|
||||
return FALSE;
|
||||
return TAP_PACKET_DONT_REDRAW;
|
||||
msg_data = stat_tap_get_field_data(table, csi->opcode, COUNT_COLUMN);
|
||||
msg_data->value.uint_value++;
|
||||
stat_tap_set_field_data(table, csi->opcode, COUNT_COLUMN, msg_data);
|
||||
|
||||
return TRUE;
|
||||
return TAP_PACKET_REDRAW;
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
|
@ -2805,7 +2805,7 @@ static void gsm_map_stat_init(stat_tap_table_ui* new_stat)
|
|||
}
|
||||
}
|
||||
|
||||
static gboolean
|
||||
static tap_packet_status
|
||||
gsm_map_stat_packet(void *tapdata, packet_info *pinfo _U_, epan_dissect_t *edt _U_, const void *gmtr_ptr)
|
||||
{
|
||||
stat_data_t* stat_data = (stat_data_t*)tapdata;
|
||||
|
@ -2860,7 +2860,7 @@ gsm_map_stat_packet(void *tapdata, packet_info *pinfo _U_, epan_dissect_t *edt _
|
|||
avg_data = stat_tap_get_field_data(table, gmtr->opcode, AVG_BYTES_COLUMN);
|
||||
avg_data->value.float_value += (float) (fwd_bytes + rev_bytes) / (invokes + results);
|
||||
stat_tap_set_field_data(table, gmtr->opcode, AVG_BYTES_COLUMN, avg_data);
|
||||
return TRUE;
|
||||
return TAP_PACKET_REDRAW;
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
|
@ -174,7 +174,7 @@ typedef enum _ras_category {
|
|||
|
||||
#define NUM_RAS_STATS 7
|
||||
|
||||
static gboolean
|
||||
static tap_packet_status
|
||||
h225rassrt_packet(void *phs, packet_info *pinfo _U_, epan_dissect_t *edt _U_, const void *phi)
|
||||
{
|
||||
rtd_data_t* rtd_data = (rtd_data_t*)phs;
|
||||
|
@ -186,7 +186,7 @@ h225rassrt_packet(void *phs, packet_info *pinfo _U_, epan_dissect_t *edt _U_, co
|
|||
|
||||
if (pi->msg_type != H225_RAS || pi->msg_tag == -1) {
|
||||
/* No RAS Message or uninitialized msg_tag -> return */
|
||||
return FALSE;
|
||||
return TAP_PACKET_DONT_REDRAW;
|
||||
}
|
||||
|
||||
if (pi->msg_tag < 21) {
|
||||
|
@ -196,7 +196,7 @@ h225rassrt_packet(void *phs, packet_info *pinfo _U_, epan_dissect_t *edt _U_, co
|
|||
}
|
||||
else {
|
||||
/* No SRT yet (ToDo) */
|
||||
return FALSE;
|
||||
return TAP_PACKET_DONT_REDRAW;
|
||||
}
|
||||
|
||||
switch(rasmsg_type) {
|
||||
|
@ -228,9 +228,9 @@ h225rassrt_packet(void *phs, packet_info *pinfo _U_, epan_dissect_t *edt _U_, co
|
|||
break;
|
||||
|
||||
default:
|
||||
return FALSE;
|
||||
return TAP_PACKET_DONT_REDRAW;
|
||||
}
|
||||
return TRUE;
|
||||
return TAP_PACKET_REDRAW;
|
||||
}
|
||||
|
||||
#include "packet-h225-fn.c"
|
||||
|
@ -659,7 +659,7 @@ static void h225_stat_init(stat_tap_table_ui* new_stat)
|
|||
other_idx = row_idx;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
static tap_packet_status
|
||||
h225_stat_packet(void *tapdata, packet_info *pinfo _U_, epan_dissect_t *edt _U_, const void *hpi_ptr)
|
||||
{
|
||||
stat_data_t* stat_data = (stat_data_t*)tapdata;
|
||||
|
@ -668,7 +668,7 @@ h225_stat_packet(void *tapdata, packet_info *pinfo _U_, epan_dissect_t *edt _U_,
|
|||
int reason_idx = -1;
|
||||
|
||||
if(hpi->msg_tag < 0) { /* uninitialized */
|
||||
return FALSE;
|
||||
return TAP_PACKET_DONT_REDRAW;
|
||||
}
|
||||
|
||||
switch (hpi->msg_type) {
|
||||
|
@ -760,9 +760,9 @@ h225_stat_packet(void *tapdata, packet_info *pinfo _U_, epan_dissect_t *edt _U_,
|
|||
stat_tap_set_field_data(table, reason_idx, COUNT_COLUMN, msg_data);
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
return TAP_PACKET_REDRAW;
|
||||
}
|
||||
return FALSE;
|
||||
return TAP_PACKET_DONT_REDRAW;
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
|
@ -302,7 +302,7 @@ ldapstat_init(struct register_srt* srt _U_, GArray* srt_array)
|
|||
}
|
||||
}
|
||||
|
||||
static int
|
||||
static tap_packet_status
|
||||
ldapstat_packet(void *pldap, packet_info *pinfo, epan_dissect_t *edt _U_, const void *psi)
|
||||
{
|
||||
guint i = 0;
|
||||
|
@ -312,11 +312,11 @@ ldapstat_packet(void *pldap, packet_info *pinfo, epan_dissect_t *edt _U_, const
|
|||
|
||||
/* we are only interested in reply packets */
|
||||
if(ldap->is_request){
|
||||
return 0;
|
||||
return TAP_PACKET_DONT_REDRAW;
|
||||
}
|
||||
/* if we havnt seen the request, just ignore it */
|
||||
if(!ldap->req_frame){
|
||||
return 0;
|
||||
return TAP_PACKET_DONT_REDRAW;
|
||||
}
|
||||
|
||||
/* only use the commands we know how to handle */
|
||||
|
@ -331,13 +331,13 @@ ldapstat_packet(void *pldap, packet_info *pinfo, epan_dissect_t *edt _U_, const
|
|||
case LDAP_REQ_EXTENDED:
|
||||
break;
|
||||
default:
|
||||
return 0;
|
||||
return TAP_PACKET_DONT_REDRAW;
|
||||
}
|
||||
|
||||
ldap_srt_table = g_array_index(data->srt_array, srt_stat_table*, i);
|
||||
|
||||
add_srt_table_data(ldap_srt_table, ldap->protocolOpTag, &ldap->req_time, pinfo);
|
||||
return 1;
|
||||
return TAP_PACKET_REDRAW;
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
@ -1099,7 +1099,7 @@ afpstat_init(struct register_srt* srt _U_, GArray* srt_array)
|
|||
}
|
||||
}
|
||||
|
||||
static int
|
||||
static tap_packet_status
|
||||
afpstat_packet(void *pss, packet_info *pinfo, epan_dissect_t *edt _U_, const void *prv)
|
||||
{
|
||||
guint i = 0;
|
||||
|
@ -1109,14 +1109,14 @@ afpstat_packet(void *pss, packet_info *pinfo, epan_dissect_t *edt _U_, const voi
|
|||
|
||||
/* if we haven't seen the request, just ignore it */
|
||||
if (!request_val) {
|
||||
return 0;
|
||||
return TAP_PACKET_DONT_REDRAW;
|
||||
}
|
||||
|
||||
afp_srt_table = g_array_index(data->srt_array, srt_stat_table*, i);
|
||||
|
||||
add_srt_table_data(afp_srt_table, request_val->command, &request_val->req_time, pinfo);
|
||||
|
||||
return 1;
|
||||
return TAP_PACKET_REDRAW;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -597,7 +597,7 @@ ancp_stats_tree_init(stats_tree *st)
|
|||
st_node_packets, STAT_DT_INT, TRUE);
|
||||
}
|
||||
|
||||
static int
|
||||
static tap_packet_status
|
||||
ancp_stats_tree_packet(stats_tree* st, packet_info* pinfo _U_,
|
||||
epan_dissect_t* edt _U_ , const void* p)
|
||||
{
|
||||
|
@ -611,7 +611,7 @@ ancp_stats_tree_packet(stats_tree* st, packet_info* pinfo _U_,
|
|||
stats_tree_tick_pivot(st, st_node_adj_pack_types,
|
||||
val_to_str(pi->ancp_adjcode, adj_code_names,
|
||||
"Unknown Adjacency packet (%d)"));
|
||||
return 1;
|
||||
return TAP_PACKET_REDRAW;
|
||||
}
|
||||
|
||||
static int
|
||||
|
|
|
@ -10597,7 +10597,7 @@ static void ansi_a_dtap_stat_init(stat_tap_table_ui* new_stat)
|
|||
}
|
||||
}
|
||||
|
||||
static gboolean
|
||||
static tap_packet_status
|
||||
ansi_a_dtap_stat_packet(void *tapdata, packet_info *pinfo _U_, epan_dissect_t *edt _U_, const void *data)
|
||||
{
|
||||
stat_data_t* stat_data = (stat_data_t*)tapdata;
|
||||
|
@ -10609,7 +10609,7 @@ ansi_a_dtap_stat_packet(void *tapdata, packet_info *pinfo _U_, epan_dissect_t *e
|
|||
if (data_p->pdu_type == BSSAP_PDU_TYPE_DTAP)
|
||||
{
|
||||
if (my_try_val_to_str_idx(data_p->message_type, ansi_a_dtap_strings, &idx) == NULL)
|
||||
return FALSE;
|
||||
return TAP_PACKET_DONT_REDRAW;
|
||||
|
||||
table = g_array_index(stat_data->stat_tap_data->tables, stat_tap_table*, i);
|
||||
|
||||
|
@ -10617,10 +10617,10 @@ ansi_a_dtap_stat_packet(void *tapdata, packet_info *pinfo _U_, epan_dissect_t *e
|
|||
dtap_data->value.uint_value++;
|
||||
stat_tap_set_field_data(table, data_p->message_type, COUNT_COLUMN, dtap_data);
|
||||
|
||||
return TRUE;
|
||||
return TAP_PACKET_REDRAW;
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
return TAP_PACKET_DONT_REDRAW;
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -10665,7 +10665,7 @@ static void ansi_a_bsmap_stat_init(stat_tap_table_ui* new_stat)
|
|||
}
|
||||
}
|
||||
|
||||
static gboolean
|
||||
static tap_packet_status
|
||||
ansi_a_bsmap_stat_packet(void *tapdata, packet_info *pinfo _U_, epan_dissect_t *edt _U_, const void *data)
|
||||
{
|
||||
stat_data_t* stat_data = (stat_data_t*)tapdata;
|
||||
|
@ -10677,7 +10677,7 @@ ansi_a_bsmap_stat_packet(void *tapdata, packet_info *pinfo _U_, epan_dissect_t *
|
|||
if (data_p->pdu_type == BSSAP_PDU_TYPE_BSMAP)
|
||||
{
|
||||
if (my_try_val_to_str_idx(data_p->message_type, ansi_a_bsmap_strings, &idx) == NULL)
|
||||
return FALSE;
|
||||
return TAP_PACKET_DONT_REDRAW;
|
||||
|
||||
table = g_array_index(stat_data->stat_tap_data->tables, stat_tap_table*, i);
|
||||
|
||||
|
@ -10685,10 +10685,10 @@ ansi_a_bsmap_stat_packet(void *tapdata, packet_info *pinfo _U_, epan_dissect_t *
|
|||
dtap_data->value.uint_value++;
|
||||
stat_tap_set_field_data(table, data_p->message_type, COUNT_COLUMN, dtap_data);
|
||||
|
||||
return TRUE;
|
||||
return TAP_PACKET_REDRAW;
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
return TAP_PACKET_DONT_REDRAW;
|
||||
}
|
||||
|
||||
/* Register the protocol with Wireshark */
|
||||
|
|
|
@ -16123,7 +16123,7 @@ static void ansi_map_stat_init(stat_tap_table_ui* new_stat)
|
|||
}
|
||||
|
||||
|
||||
static gboolean
|
||||
static tap_packet_status
|
||||
ansi_map_stat_packet(void *tapdata, packet_info *pinfo _U_, epan_dissect_t *edt _U_, const void *data)
|
||||
{
|
||||
stat_data_t* stat_data = (stat_data_t*)tapdata;
|
||||
|
@ -16134,7 +16134,7 @@ ansi_map_stat_packet(void *tapdata, packet_info *pinfo _U_, epan_dissect_t *edt
|
|||
|
||||
/* Only tracking field values we know */
|
||||
if (try_val_to_str(data_p->message_type, ansi_map_opr_code_strings) == NULL)
|
||||
return FALSE;
|
||||
return TAP_PACKET_DONT_REDRAW;
|
||||
|
||||
table = g_array_index(stat_data->stat_tap_data->tables, stat_tap_table*, i);
|
||||
|
||||
|
@ -16152,7 +16152,7 @@ ansi_map_stat_packet(void *tapdata, packet_info *pinfo _U_, epan_dissect_t *edt
|
|||
item_data->value.float_value = (float)total_bytes/(float)count;
|
||||
stat_tap_set_field_data(table, data_p->message_type, AVG_BYTES_COLUMN, item_data);
|
||||
|
||||
return TRUE;
|
||||
return TAP_PACKET_REDRAW;
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
|
@ -6189,7 +6189,7 @@ bacapp_get_address_label(const char *tag, address *addr)
|
|||
return label_str;
|
||||
}
|
||||
|
||||
static int
|
||||
static tap_packet_status
|
||||
bacapp_stats_tree_packet(stats_tree* st, packet_info* pinfo, epan_dissect_t* edt _U_, const void* p)
|
||||
{
|
||||
int packets_for_this_dst;
|
||||
|
@ -6230,7 +6230,7 @@ bacapp_stats_tree_packet(stats_tree* st, packet_info* pinfo, epan_dissect_t* edt
|
|||
wmem_free(NULL, srcstr);
|
||||
wmem_free(NULL, dststr);
|
||||
|
||||
return 1;
|
||||
return TAP_PACKET_REDRAW;
|
||||
}
|
||||
|
||||
/* Stat: BACnet Packets sorted by Service */
|
||||
|
@ -6243,7 +6243,7 @@ bacapp_service_stats_tree_init(stats_tree* st)
|
|||
st_node_packets_by_service = stats_tree_create_pivot(st, st_str_packets_by_service, 0);
|
||||
}
|
||||
|
||||
static int
|
||||
static tap_packet_status
|
||||
bacapp_stats_tree_service(stats_tree* st, packet_info* pinfo, epan_dissect_t* edt _U_, const void* p)
|
||||
{
|
||||
int servicetype;
|
||||
|
@ -6272,7 +6272,7 @@ bacapp_stats_tree_service(stats_tree* st, packet_info* pinfo, epan_dissect_t* ed
|
|||
wmem_free(NULL, srcstr);
|
||||
wmem_free(NULL, dststr);
|
||||
|
||||
return 1;
|
||||
return TAP_PACKET_REDRAW;
|
||||
}
|
||||
|
||||
/* Stat: BACnet Packets sorted by Object Type */
|
||||
|
@ -6285,7 +6285,7 @@ bacapp_objectid_stats_tree_init(stats_tree* st)
|
|||
st_node_packets_by_objectid = stats_tree_create_pivot(st, st_str_packets_by_objectid, 0);
|
||||
}
|
||||
|
||||
static int
|
||||
static tap_packet_status
|
||||
bacapp_stats_tree_objectid(stats_tree* st, packet_info* pinfo, epan_dissect_t* edt _U_, const void* p)
|
||||
{
|
||||
int servicetype;
|
||||
|
@ -6313,7 +6313,7 @@ bacapp_stats_tree_objectid(stats_tree* st, packet_info* pinfo, epan_dissect_t* e
|
|||
wmem_free(NULL, srcstr);
|
||||
wmem_free(NULL, dststr);
|
||||
|
||||
return 1;
|
||||
return TAP_PACKET_REDRAW;
|
||||
}
|
||||
|
||||
/* Stat: BACnet Packets sorted by Instance No */
|
||||
|
@ -6326,7 +6326,7 @@ bacapp_instanceid_stats_tree_init(stats_tree* st)
|
|||
st_node_packets_by_instanceid = stats_tree_create_pivot(st, st_str_packets_by_instanceid, 0);
|
||||
}
|
||||
|
||||
static int
|
||||
static tap_packet_status
|
||||
bacapp_stats_tree_instanceid(stats_tree* st, packet_info* pinfo, epan_dissect_t* edt _U_, const void* p)
|
||||
{
|
||||
int servicetype;
|
||||
|
@ -6354,7 +6354,7 @@ bacapp_stats_tree_instanceid(stats_tree* st, packet_info* pinfo, epan_dissect_t*
|
|||
wmem_free(NULL, srcstr);
|
||||
wmem_free(NULL, dststr);
|
||||
|
||||
return 1;
|
||||
return TAP_PACKET_REDRAW;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -2818,7 +2818,7 @@ static const char* bluetooth_get_filter_type(hostlist_talker_t* host, conv_filte
|
|||
static hostlist_dissector_info_t bluetooth_dissector_info = {&bluetooth_get_filter_type};
|
||||
|
||||
|
||||
static int
|
||||
static tap_packet_status
|
||||
bluetooth_conversation_packet(void *pct, packet_info *pinfo,
|
||||
epan_dissect_t *edt _U_, const void *vip _U_)
|
||||
{
|
||||
|
@ -2827,11 +2827,11 @@ bluetooth_conversation_packet(void *pct, packet_info *pinfo,
|
|||
pinfo->fd->pkt_len, &pinfo->rel_ts, &pinfo->abs_ts,
|
||||
&bluetooth_ct_dissector_info, ENDPOINT_NONE);
|
||||
|
||||
return 1;
|
||||
return TAP_PACKET_REDRAW;
|
||||
}
|
||||
|
||||
|
||||
static int
|
||||
static tap_packet_status
|
||||
bluetooth_hostlist_packet(void *pit, packet_info *pinfo,
|
||||
epan_dissect_t *edt _U_, const void *vip _U_)
|
||||
{
|
||||
|
@ -2840,7 +2840,7 @@ bluetooth_hostlist_packet(void *pit, packet_info *pinfo,
|
|||
add_hostlist_table_data(hash, &pinfo->dl_src, 0, TRUE, 1, pinfo->fd->pkt_len, &bluetooth_dissector_info, ENDPOINT_NONE);
|
||||
add_hostlist_table_data(hash, &pinfo->dl_dst, 0, FALSE, 1, pinfo->fd->pkt_len, &bluetooth_dissector_info, ENDPOINT_NONE);
|
||||
|
||||
return 1;
|
||||
return TAP_PACKET_REDRAW;
|
||||
}
|
||||
|
||||
static conversation_t *
|
||||
|
|
|
@ -1318,7 +1318,7 @@ camelstat_init(struct register_srt* srt _U_, GArray* srt_array)
|
|||
}
|
||||
}
|
||||
|
||||
static gboolean
|
||||
static tap_packet_status
|
||||
camelstat_packet(void *pcamel, packet_info *pinfo, epan_dissect_t *edt _U_, const void *psi)
|
||||
{
|
||||
guint idx = 0;
|
||||
|
@ -1337,7 +1337,7 @@ camelstat_packet(void *pcamel, packet_info *pinfo, epan_dissect_t *edt _U_, cons
|
|||
add_srt_table_data(camel_srt_table, i, &pi->msginfo[i].req_time, pinfo);
|
||||
}
|
||||
} /* category */
|
||||
return TRUE;
|
||||
return TAP_PACKET_REDRAW;
|
||||
}
|
||||
|
||||
|
||||
|
@ -8255,7 +8255,7 @@ static void camel_stat_init(stat_tap_table_ui* new_stat)
|
|||
}
|
||||
}
|
||||
|
||||
static gboolean
|
||||
static tap_packet_status
|
||||
camel_stat_packet(void *tapdata, packet_info *pinfo _U_, epan_dissect_t *edt _U_, const void *csi_ptr)
|
||||
{
|
||||
stat_data_t* stat_data = (stat_data_t*)tapdata;
|
||||
|
@ -8266,12 +8266,12 @@ camel_stat_packet(void *tapdata, packet_info *pinfo _U_, epan_dissect_t *edt _U_
|
|||
|
||||
table = g_array_index(stat_data->stat_tap_data->tables, stat_tap_table*, i);
|
||||
if (csi->opcode >= table->num_elements)
|
||||
return FALSE;
|
||||
return TAP_PACKET_DONT_REDRAW;
|
||||
msg_data = stat_tap_get_field_data(table, csi->opcode, COUNT_COLUMN);
|
||||
msg_data->value.uint_value++;
|
||||
stat_tap_set_field_data(table, csi->opcode, COUNT_COLUMN, msg_data);
|
||||
|
||||
return TRUE;
|
||||
return TAP_PACKET_REDRAW;
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
|
@ -211,7 +211,7 @@ collectd_stats_tree_init (stats_tree *st)
|
|||
st_collectd_values);
|
||||
} /* void collectd_stats_tree_init */
|
||||
|
||||
static int
|
||||
static tap_packet_status
|
||||
collectd_stats_tree_packet (stats_tree *st, packet_info *pinfo _U_,
|
||||
epan_dissect_t *edt _U_, const void *user_data)
|
||||
{
|
||||
|
@ -220,7 +220,7 @@ collectd_stats_tree_packet (stats_tree *st, packet_info *pinfo _U_,
|
|||
|
||||
td = (const tap_data_t *)user_data;
|
||||
if (td == NULL)
|
||||
return (-1);
|
||||
return (TAP_PACKET_DONT_REDRAW);
|
||||
|
||||
tick_stat_node (st, "Packets", 0, FALSE);
|
||||
increase_stat_node (st, "Values", 0, TRUE, td->values_num);
|
||||
|
@ -249,7 +249,7 @@ collectd_stats_tree_packet (stats_tree *st, packet_info *pinfo _U_,
|
|||
sc->string);
|
||||
}
|
||||
|
||||
return (1);
|
||||
return (TAP_PACKET_REDRAW);
|
||||
} /* int collectd_stats_tree_packet */
|
||||
|
||||
static void
|
||||
|
|
|
@ -1940,7 +1940,7 @@ dcerpcstat_init(struct register_srt* srt, GArray* srt_array)
|
|||
}
|
||||
}
|
||||
|
||||
static int
|
||||
static tap_packet_status
|
||||
dcerpcstat_packet(void *pss, packet_info *pinfo, epan_dissect_t *edt _U_, const void *prv)
|
||||
{
|
||||
guint i = 0;
|
||||
|
@ -1953,31 +1953,31 @@ dcerpcstat_packet(void *pss, packet_info *pinfo, epan_dissect_t *edt _U_, const
|
|||
tap_data = (dcerpcstat_tap_data_t*)dcerpc_srt_table->table_specific_data;
|
||||
|
||||
if(!ri->call_data){
|
||||
return 0;
|
||||
return TAP_PACKET_DONT_REDRAW;
|
||||
}
|
||||
if(!ri->call_data->req_frame){
|
||||
/* we have not seen the request so we don't know the delta*/
|
||||
return 0;
|
||||
return TAP_PACKET_DONT_REDRAW;
|
||||
}
|
||||
if(ri->call_data->opnum >= tap_data->num_procedures){
|
||||
/* don't handle this since it's outside of known table */
|
||||
return 0;
|
||||
return TAP_PACKET_DONT_REDRAW;
|
||||
}
|
||||
|
||||
/* we are only interested in reply packets */
|
||||
if(ri->ptype != PDU_RESP){
|
||||
return 0;
|
||||
return TAP_PACKET_DONT_REDRAW;
|
||||
}
|
||||
|
||||
/* we are only interested in certain program/versions */
|
||||
if( (!uuid_equal( (&ri->call_data->uuid), (&tap_data->uuid)))
|
||||
||(ri->call_data->ver != tap_data->ver)){
|
||||
return 0;
|
||||
return TAP_PACKET_DONT_REDRAW;
|
||||
}
|
||||
|
||||
add_srt_table_data(dcerpc_srt_table, ri->call_data->opnum, &ri->call_data->req_time, pinfo);
|
||||
|
||||
return 1;
|
||||
return TAP_PACKET_REDRAW;
|
||||
}
|
||||
|
||||
static guint
|
||||
|
|
|
@ -417,7 +417,7 @@ typedef struct _dicom_eo_t {
|
|||
guint8 *payload_data;
|
||||
} dicom_eo_t;
|
||||
|
||||
static gboolean
|
||||
static tap_packet_status
|
||||
dcm_eo_packet(void *tapdata, packet_info *pinfo, epan_dissect_t *edt _U_,
|
||||
const void *data)
|
||||
{
|
||||
|
@ -442,9 +442,9 @@ dcm_eo_packet(void *tapdata, packet_info *pinfo, epan_dissect_t *edt _U_,
|
|||
|
||||
object_list->add_entry(object_list->gui_data, entry);
|
||||
|
||||
return TRUE; /* State changed - window should be redrawn */
|
||||
return TAP_PACKET_REDRAW; /* State changed - window should be redrawn */
|
||||
} else {
|
||||
return FALSE; /* State unchanged - no window updates needed */
|
||||
return TAP_PACKET_DONT_REDRAW; /* State unchanged - no window updates needed */
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -6679,7 +6679,7 @@ static void dhcp_stat_init(stat_tap_table_ui* new_stat)
|
|||
}
|
||||
}
|
||||
|
||||
static gboolean
|
||||
static tap_packet_status
|
||||
dhcp_stat_packet(void *tapdata, packet_info *pinfo _U_, epan_dissect_t *edt _U_, const void *data)
|
||||
{
|
||||
stat_data_t* stat_data = (stat_data_t*)tapdata;
|
||||
|
@ -6691,14 +6691,14 @@ dhcp_stat_packet(void *tapdata, packet_info *pinfo _U_, epan_dissect_t *edt _U_,
|
|||
|
||||
idx = str_to_val_idx(value, opt53_text);
|
||||
if (idx < 0)
|
||||
return FALSE;
|
||||
return TAP_PACKET_DONT_REDRAW;
|
||||
|
||||
table = g_array_index(stat_data->stat_tap_data->tables, stat_tap_table*, i);
|
||||
msg_data = stat_tap_get_field_data(table, idx, PACKET_COLUMN);
|
||||
msg_data->value.uint_value++;
|
||||
stat_tap_set_field_data(table, idx, PACKET_COLUMN, msg_data);
|
||||
|
||||
return TRUE;
|
||||
return TAP_PACKET_REDRAW;
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
|
@ -385,7 +385,7 @@ diameterstat_init(struct register_srt* srt _U_, GArray* srt_array)
|
|||
init_srt_table_row(diameter_srt_table, 0, "Unknown");
|
||||
}
|
||||
|
||||
static int
|
||||
static tap_packet_status
|
||||
diameterstat_packet(void *pss, packet_info *pinfo, epan_dissect_t *edt _U_, const void *prv)
|
||||
{
|
||||
guint i = 0;
|
||||
|
@ -398,7 +398,7 @@ diameterstat_packet(void *pss, packet_info *pinfo, epan_dissect_t *edt _U_, cons
|
|||
* Unpaired diameter messages are currently not supported by statistics.
|
||||
* Return 0, since redraw is not needed. */
|
||||
if(!diameter || diameter->processing_request || !diameter->req_frame)
|
||||
return 0;
|
||||
return TAP_PACKET_DONT_REDRAW;
|
||||
|
||||
diameter_srt_table = g_array_index(data->srt_array, srt_stat_table*, i);
|
||||
|
||||
|
@ -412,7 +412,7 @@ diameterstat_packet(void *pss, packet_info *pinfo, epan_dissect_t *edt _U_, cons
|
|||
|
||||
add_srt_table_data(diameter_srt_table, *idx, &diameter->req_time, pinfo);
|
||||
|
||||
return 1;
|
||||
return TAP_PACKET_REDRAW;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -4181,7 +4181,7 @@ static void dns_stats_tree_init(stats_tree* st)
|
|||
st_node_service_rrt = stats_tree_create_node(st, st_str_service_rrt, st_node_service_stats, STAT_DT_FLOAT, FALSE);
|
||||
}
|
||||
|
||||
static int dns_stats_tree_packet(stats_tree* st, packet_info* pinfo _U_, epan_dissect_t* edt _U_, const void* p)
|
||||
static tap_packet_status dns_stats_tree_packet(stats_tree* st, packet_info* pinfo _U_, epan_dissect_t* edt _U_, const void* p)
|
||||
{
|
||||
const struct DnsTap *pi = (const struct DnsTap *)p;
|
||||
tick_stat_node(st, st_str_packets, 0, FALSE);
|
||||
|
@ -4237,7 +4237,7 @@ static int dns_stats_tree_packet(stats_tree* st, packet_info* pinfo _U_, epan_di
|
|||
}
|
||||
}
|
||||
}
|
||||
return 1;
|
||||
return TAP_PACKET_REDRAW;
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
@ -122,7 +122,7 @@ static const char* eth_conv_get_filter_type(conv_item_t* conv, conv_filter_type_
|
|||
|
||||
static ct_dissector_info_t eth_ct_dissector_info = {ð_conv_get_filter_type};
|
||||
|
||||
static int
|
||||
static tap_packet_status
|
||||
eth_conversation_packet(void *pct, packet_info *pinfo, epan_dissect_t *edt _U_, const void *vip)
|
||||
{
|
||||
conv_hash_t *hash = (conv_hash_t*) pct;
|
||||
|
@ -130,7 +130,7 @@ eth_conversation_packet(void *pct, packet_info *pinfo, epan_dissect_t *edt _U_,
|
|||
|
||||
add_conversation_table_data(hash, &ehdr->src, &ehdr->dst, 0, 0, 1, pinfo->fd->pkt_len, &pinfo->rel_ts, &pinfo->abs_ts, ð_ct_dissector_info, ENDPOINT_NONE);
|
||||
|
||||
return 1;
|
||||
return TAP_PACKET_REDRAW;
|
||||
}
|
||||
|
||||
static const char* eth_host_get_filter_type(hostlist_talker_t* host, conv_filter_type_e filter)
|
||||
|
@ -143,7 +143,7 @@ static const char* eth_host_get_filter_type(hostlist_talker_t* host, conv_filter
|
|||
|
||||
static hostlist_dissector_info_t eth_host_dissector_info = {ð_host_get_filter_type};
|
||||
|
||||
static int
|
||||
static tap_packet_status
|
||||
eth_hostlist_packet(void *pit, packet_info *pinfo, epan_dissect_t *edt _U_, const void *vip)
|
||||
{
|
||||
conv_hash_t *hash = (conv_hash_t*) pit;
|
||||
|
@ -155,7 +155,7 @@ eth_hostlist_packet(void *pit, packet_info *pinfo, epan_dissect_t *edt _U_, cons
|
|||
add_hostlist_table_data(hash, &ehdr->src, 0, TRUE, 1, pinfo->fd->pkt_len, ð_host_dissector_info, ENDPOINT_NONE);
|
||||
add_hostlist_table_data(hash, &ehdr->dst, 0, FALSE, 1, pinfo->fd->pkt_len, ð_host_dissector_info, ENDPOINT_NONE);
|
||||
|
||||
return 1;
|
||||
return TAP_PACKET_REDRAW;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
|
|
|
@ -649,10 +649,11 @@ static void f5eth_tmmdist_stats_tree_init(
|
|||
* @param pinfo A pointer to the packet info.
|
||||
* @param edt Unused
|
||||
* @param data A pointer to the data provided by the tap
|
||||
* @return 1 if the data was actually used to alter the statistics, 0 otherwise.
|
||||
* @return TAP_PACKET_REDRAW if the data was actually used to alter
|
||||
* the statistics, TAP_PACKET_DONT_REDRAW otherwise.
|
||||
*
|
||||
*/
|
||||
static int f5eth_tmmdist_stats_tree_packet(
|
||||
static tap_packet_status f5eth_tmmdist_stats_tree_packet(
|
||||
stats_tree *st,
|
||||
packet_info *pinfo,
|
||||
epan_dissect_t *edt _U_,
|
||||
|
@ -667,12 +668,12 @@ static int f5eth_tmmdist_stats_tree_packet(
|
|||
char tmm_stat_name_buffer[PER_TMM_STAT_NAME_BUF_LEN];
|
||||
|
||||
if(tdata == NULL)
|
||||
return 0;
|
||||
return TAP_PACKET_DONT_REDRAW;
|
||||
|
||||
/* Unnecessary since this tap packet function and the F5 Ethernet trailer dissector are both in
|
||||
* the same source file. If you are using this function as an example in a separate tap source
|
||||
* file, you should uncomment this.
|
||||
if(check_f5eth_tap_magic(tdata) == 0) return 0;
|
||||
if(check_f5eth_tap_magic(tdata) == 0) return TAP_PACKET_DONT_REDRAW;
|
||||
*/
|
||||
|
||||
g_snprintf(tmm_stat_name_buffer, PER_TMM_STAT_NAME_BUF_LEN, "slot %3d,tmm %3d",
|
||||
|
@ -734,7 +735,7 @@ static int f5eth_tmmdist_stats_tree_packet(
|
|||
increase_stat_node(st, st_str_tmm_flow_none, st_node_tmm_bytes, FALSE, 0);
|
||||
}
|
||||
|
||||
return 1;
|
||||
return TAP_PACKET_REDRAW;
|
||||
} /* f5eth_tmmdist_stats_tree_packet() */
|
||||
|
||||
/*-----------------------------------------------------------------------------------------------*/
|
||||
|
@ -757,7 +758,7 @@ static void f5eth_virtdist_stats_tree_init(
|
|||
} /* f5eth_virtdist_stats_tree_init() */
|
||||
|
||||
/*-----------------------------------------------------------------------------------------------*/
|
||||
static int f5eth_virtdist_stats_tree_packet(
|
||||
static tap_packet_status f5eth_virtdist_stats_tree_packet(
|
||||
stats_tree *st,
|
||||
packet_info *pinfo,
|
||||
epan_dissect_t *edt _U_,
|
||||
|
@ -767,11 +768,11 @@ static int f5eth_virtdist_stats_tree_packet(
|
|||
guint32 pkt_len;
|
||||
|
||||
if (tdata == NULL)
|
||||
return 0;
|
||||
return TAP_PACKET_DONT_REDRAW;
|
||||
/* Unnecessary since this tap packet function and the F5 Ethernet trailer dissector are both in
|
||||
* the same source file. If you are using this function as an example in a separate tap source
|
||||
* file, you should uncomment this.
|
||||
if(check_f5eth_tap_magic(tdata) == 0) return 0;
|
||||
if(check_f5eth_tap_magic(tdata) == 0) return TAP_PACKET_DONT_REDRAW;
|
||||
*/
|
||||
|
||||
pkt_len = pinfo->fd->pkt_len - tdata->trailer_len;
|
||||
|
@ -797,7 +798,7 @@ static int f5eth_virtdist_stats_tree_packet(
|
|||
increase_stat_node(st, tdata->virtual_name, st_node_virtbytedist, TRUE, pkt_len);
|
||||
}
|
||||
|
||||
return 1;
|
||||
return TAP_PACKET_REDRAW;
|
||||
} /* f5eth_virtdist_stats_tree_packet() */
|
||||
|
||||
|
||||
|
@ -1373,7 +1374,7 @@ static void render_analysis(
|
|||
/*-----------------------------------------------------------------------------------------------*/
|
||||
/** \brief Tap call back to retrieve information about the IP headers.
|
||||
*/
|
||||
static gboolean ip_tap_pkt(
|
||||
static tap_packet_status ip_tap_pkt(
|
||||
void *tapdata _U_,
|
||||
packet_info *pinfo,
|
||||
epan_dissect_t *edt _U_,
|
||||
|
@ -1384,11 +1385,11 @@ static gboolean ip_tap_pkt(
|
|||
|
||||
ad = (struct f5eth_analysis_data_t*)p_get_proto_data(wmem_file_scope(), pinfo,
|
||||
proto_f5ethtrailer, 0);
|
||||
if(ad == NULL) return(FALSE); /* No F5 information */
|
||||
if(ad->ip_visited == 1) return(FALSE);
|
||||
if(ad == NULL) return(TAP_PACKET_DONT_REDRAW); /* No F5 information */
|
||||
if(ad->ip_visited == 1) return(TAP_PACKET_DONT_REDRAW);
|
||||
ad->ip_visited = 1;
|
||||
|
||||
if(data == NULL) return(FALSE);
|
||||
if(data == NULL) return(TAP_PACKET_DONT_REDRAW);
|
||||
iph = (const ws_ip4 *)data;
|
||||
|
||||
/* Only care about TCP at this time */
|
||||
|
@ -1398,19 +1399,19 @@ static gboolean ip_tap_pkt(
|
|||
*/
|
||||
if(iph->ip_proto != IP_PROTO_TCP) {
|
||||
ad->ip_istcp = 0;
|
||||
return(FALSE);
|
||||
return(TAP_PACKET_DONT_REDRAW);
|
||||
}
|
||||
|
||||
ad->ip_istcp = 1;
|
||||
ad->ip_isfrag = ((iph->ip_off & IP_OFFSET_MASK) || (iph->ip_off & IP_MF)) ? 1 : 0;
|
||||
|
||||
return(TRUE);
|
||||
return(TAP_PACKET_REDRAW);
|
||||
} /* ip_tap_pkt() */
|
||||
|
||||
/*-----------------------------------------------------------------------------------------------*/
|
||||
/** \brief Tap call back to retrieve information about the IPv6 headers.
|
||||
*/
|
||||
static gboolean ipv6_tap_pkt(
|
||||
static tap_packet_status ipv6_tap_pkt(
|
||||
void *tapdata _U_,
|
||||
packet_info *pinfo,
|
||||
epan_dissect_t *edt _U_,
|
||||
|
@ -1421,11 +1422,11 @@ static gboolean ipv6_tap_pkt(
|
|||
|
||||
ad = (struct f5eth_analysis_data_t*)p_get_proto_data(wmem_file_scope(), pinfo,
|
||||
proto_f5ethtrailer, 0);
|
||||
if(ad == NULL) return(FALSE); /* No F5 information */
|
||||
if(ad->ip_visited == 1) return(FALSE);
|
||||
if(ad == NULL) return(TAP_PACKET_DONT_REDRAW); /* No F5 information */
|
||||
if(ad->ip_visited == 1) return(TAP_PACKET_DONT_REDRAW);
|
||||
ad->ip_visited = 1;
|
||||
|
||||
if(data == NULL) return(FALSE);
|
||||
if(data == NULL) return(TAP_PACKET_DONT_REDRAW);
|
||||
ipv6h = (const struct ws_ip6_hdr *)data;
|
||||
|
||||
/* Only care about TCP at this time */
|
||||
|
@ -1439,18 +1440,18 @@ static gboolean ipv6_tap_pkt(
|
|||
* fragment, we don't care anyways (too much effort). */
|
||||
if(ipv6h->ip6h_nxt != IP_PROTO_TCP) {
|
||||
ad->ip_istcp = 0;
|
||||
return(FALSE);
|
||||
return(TAP_PACKET_DONT_REDRAW);
|
||||
}
|
||||
|
||||
ad->ip_istcp = 1;
|
||||
|
||||
return(TRUE);
|
||||
return(TAP_PACKET_REDRAW);
|
||||
} /* ipv6_tap_pkt() */
|
||||
|
||||
/*-----------------------------------------------------------------------------------------------*/
|
||||
/** \brief Tap call back to retrieve information about the TCP headers.
|
||||
*/
|
||||
static gboolean tcp_tap_pkt(
|
||||
static tap_packet_status tcp_tap_pkt(
|
||||
void *tapdata _U_,
|
||||
packet_info *pinfo,
|
||||
epan_dissect_t *edt _U_,
|
||||
|
@ -1461,11 +1462,11 @@ static gboolean tcp_tap_pkt(
|
|||
|
||||
ad = (struct f5eth_analysis_data_t*)p_get_proto_data(wmem_file_scope(), pinfo,
|
||||
proto_f5ethtrailer, 0);
|
||||
if(ad == NULL) return(FALSE); /* No F5 information */
|
||||
if(ad->tcp_visited == 1) return(FALSE);
|
||||
if(ad == NULL) return(TAP_PACKET_DONT_REDRAW); /* No F5 information */
|
||||
if(ad->tcp_visited == 1) return(TAP_PACKET_DONT_REDRAW);
|
||||
ad->tcp_visited = 1;
|
||||
|
||||
if(data == NULL) return(FALSE);
|
||||
if(data == NULL) return(TAP_PACKET_DONT_REDRAW);
|
||||
tcph = (const tcp_info_t *)data;
|
||||
|
||||
ad->tcp_synset = (tcph->th_flags & TH_SYN) ? 1 : 0;
|
||||
|
@ -1491,7 +1492,7 @@ static gboolean tcp_tap_pkt(
|
|||
}
|
||||
}
|
||||
|
||||
return(TRUE);
|
||||
return(TAP_PACKET_REDRAW);
|
||||
} /* tcp_tap_pkt() */
|
||||
|
||||
/* End of analysis functions */
|
||||
|
|
|
@ -167,7 +167,7 @@ static void f5fileinfo_tap_reset(void *p)
|
|||
# endif
|
||||
} /* f5fileinfo_tap_reset() */
|
||||
|
||||
static gboolean f5fileinfo_tap_pkt(
|
||||
static tap_packet_status f5fileinfo_tap_pkt(
|
||||
void *tapdata,
|
||||
packet_info *pinfo _U_,
|
||||
epan_dissect_t *edt _U_,
|
||||
|
@ -181,7 +181,7 @@ static gboolean f5fileinfo_tap_pkt(
|
|||
if(fromtap->magic != F5FILEINFO_TAP_MAGIC) {
|
||||
/* Magic numbers do not match. f5ethtrailer plugin was compiled from
|
||||
* different source than this plugin. */
|
||||
return(FALSE);
|
||||
return(TAP_PACKET_DONT_REDRAW);
|
||||
}
|
||||
if (s->ver[0] == fromtap->ver[0] &&
|
||||
s->ver[1] == fromtap->ver[1] &&
|
||||
|
@ -190,7 +190,7 @@ static gboolean f5fileinfo_tap_pkt(
|
|||
s->ver[4] == fromtap->ver[4] &&
|
||||
s->ver[5] == fromtap->ver[5])
|
||||
{
|
||||
return(FALSE);
|
||||
return(TAP_PACKET_DONT_REDRAW);
|
||||
}
|
||||
s->ver[0] = fromtap->ver[0];
|
||||
s->ver[1] = fromtap->ver[1];
|
||||
|
@ -201,7 +201,7 @@ static gboolean f5fileinfo_tap_pkt(
|
|||
# ifdef F5FILEINFO_TAP_POST_FUNC
|
||||
F5FILEINFO_TAP_POST_FUNC(s);
|
||||
# endif
|
||||
return(TRUE);
|
||||
return(TAP_PACKET_REDRAW);
|
||||
} /* f5fileinfo_tap_pkt() */
|
||||
|
||||
|
||||
|
|
|
@ -195,7 +195,7 @@ static const char* fc_conv_get_filter_type(conv_item_t* conv, conv_filter_type_e
|
|||
|
||||
static ct_dissector_info_t fc_ct_dissector_info = {&fc_conv_get_filter_type};
|
||||
|
||||
static int
|
||||
static tap_packet_status
|
||||
fc_conversation_packet(void *pct, packet_info *pinfo, epan_dissect_t *edt _U_, const void *vip)
|
||||
{
|
||||
conv_hash_t *hash = (conv_hash_t*) pct;
|
||||
|
@ -203,7 +203,7 @@ fc_conversation_packet(void *pct, packet_info *pinfo, epan_dissect_t *edt _U_, c
|
|||
|
||||
add_conversation_table_data(hash, &fchdr->s_id, &fchdr->d_id, 0, 0, 1, pinfo->fd->pkt_len, &pinfo->rel_ts, &pinfo->abs_ts, &fc_ct_dissector_info, ENDPOINT_NONE);
|
||||
|
||||
return 1;
|
||||
return TAP_PACKET_REDRAW;
|
||||
}
|
||||
|
||||
static const char* fc_host_get_filter_type(hostlist_talker_t* host, conv_filter_type_e filter)
|
||||
|
@ -216,7 +216,7 @@ static const char* fc_host_get_filter_type(hostlist_talker_t* host, conv_filter_
|
|||
|
||||
static hostlist_dissector_info_t fc_host_dissector_info = {&fc_host_get_filter_type};
|
||||
|
||||
static int
|
||||
static tap_packet_status
|
||||
fc_hostlist_packet(void *pit, packet_info *pinfo, epan_dissect_t *edt _U_, const void *vip)
|
||||
{
|
||||
conv_hash_t *hash = (conv_hash_t*) pit;
|
||||
|
@ -228,7 +228,7 @@ fc_hostlist_packet(void *pit, packet_info *pinfo, epan_dissect_t *edt _U_, const
|
|||
add_hostlist_table_data(hash, &fchdr->s_id, 0, TRUE, 1, pinfo->fd->pkt_len, &fc_host_dissector_info, ENDPOINT_NONE);
|
||||
add_hostlist_table_data(hash, &fchdr->d_id, 0, FALSE, 1, pinfo->fd->pkt_len, &fc_host_dissector_info, ENDPOINT_NONE);
|
||||
|
||||
return 1;
|
||||
return TAP_PACKET_REDRAW;
|
||||
}
|
||||
|
||||
#define FC_NUM_PROCEDURES 256
|
||||
|
@ -248,7 +248,7 @@ fcstat_init(struct register_srt* srt _U_, GArray* srt_array)
|
|||
}
|
||||
}
|
||||
|
||||
static int
|
||||
static tap_packet_status
|
||||
fcstat_packet(void *pss, packet_info *pinfo, epan_dissect_t *edt _U_, const void *prv)
|
||||
{
|
||||
guint i = 0;
|
||||
|
@ -258,17 +258,17 @@ fcstat_packet(void *pss, packet_info *pinfo, epan_dissect_t *edt _U_, const void
|
|||
|
||||
/* we are only interested in reply packets */
|
||||
if(!(fc->fctl&FC_FCTL_EXCHANGE_RESPONDER)){
|
||||
return 0;
|
||||
return TAP_PACKET_DONT_REDRAW;
|
||||
}
|
||||
/* if we havnt seen the request, just ignore it */
|
||||
if ( (!fc->fc_ex) || (fc->fc_ex->first_exchange_frame==0) ){
|
||||
return 0;
|
||||
return TAP_PACKET_DONT_REDRAW;
|
||||
}
|
||||
|
||||
fc_srt_table = g_array_index(data->srt_array, srt_stat_table*, i);
|
||||
add_srt_table_data(fc_srt_table, fc->type, &fc->fc_ex->fc_time, pinfo);
|
||||
|
||||
return 1;
|
||||
return TAP_PACKET_REDRAW;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -154,7 +154,7 @@ static const char* fddi_conv_get_filter_type(conv_item_t* conv, conv_filter_type
|
|||
|
||||
static ct_dissector_info_t fddi_ct_dissector_info = {&fddi_conv_get_filter_type};
|
||||
|
||||
static int
|
||||
static tap_packet_status
|
||||
fddi_conversation_packet(void *pct, packet_info *pinfo, epan_dissect_t *edt _U_, const void *vip)
|
||||
{
|
||||
conv_hash_t *hash = (conv_hash_t*) pct;
|
||||
|
@ -162,7 +162,7 @@ fddi_conversation_packet(void *pct, packet_info *pinfo, epan_dissect_t *edt _U_,
|
|||
|
||||
add_conversation_table_data(hash, &ehdr->src, &ehdr->dst, 0, 0, 1, pinfo->fd->pkt_len, &pinfo->rel_ts, &pinfo->abs_ts, &fddi_ct_dissector_info, ENDPOINT_NONE);
|
||||
|
||||
return 1;
|
||||
return TAP_PACKET_REDRAW;
|
||||
}
|
||||
|
||||
static const char* fddi_host_get_filter_type(hostlist_talker_t* host, conv_filter_type_e filter)
|
||||
|
@ -175,7 +175,7 @@ static const char* fddi_host_get_filter_type(hostlist_talker_t* host, conv_filte
|
|||
|
||||
static hostlist_dissector_info_t fddi_host_dissector_info = {&fddi_host_get_filter_type};
|
||||
|
||||
static int
|
||||
static tap_packet_status
|
||||
fddi_hostlist_packet(void *pit, packet_info *pinfo, epan_dissect_t *edt _U_, const void *vip)
|
||||
{
|
||||
conv_hash_t *hash = (conv_hash_t*) pit;
|
||||
|
@ -187,7 +187,7 @@ fddi_hostlist_packet(void *pit, packet_info *pinfo, epan_dissect_t *edt _U_, con
|
|||
add_hostlist_table_data(hash, &ehdr->src, 0, TRUE, 1, pinfo->fd->pkt_len, &fddi_host_dissector_info, ENDPOINT_NONE);
|
||||
add_hostlist_table_data(hash, &ehdr->dst, 0, FALSE, 1, pinfo->fd->pkt_len, &fddi_host_dissector_info, ENDPOINT_NONE);
|
||||
|
||||
return 1;
|
||||
return TAP_PACKET_REDRAW;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
|
|
|
@ -152,14 +152,14 @@ static dissector_table_t wtap_fts_rec_dissector_table;
|
|||
/****************************************************************************/
|
||||
/* whenever a frame packet is seen by the tap listener */
|
||||
/* Add a new frame into the graph */
|
||||
static gboolean
|
||||
static tap_packet_status
|
||||
frame_seq_analysis_packet( void *ptr, packet_info *pinfo, epan_dissect_t *edt _U_, const void *dummy _U_)
|
||||
{
|
||||
seq_analysis_info_t *sainfo = (seq_analysis_info_t *) ptr;
|
||||
seq_analysis_item_t *sai = sequence_analysis_create_sai_with_addresses(pinfo, sainfo);
|
||||
|
||||
if (!sai)
|
||||
return FALSE;
|
||||
return TAP_PACKET_DONT_REDRAW;
|
||||
|
||||
sai->frame_number = pinfo->num;
|
||||
|
||||
|
@ -176,7 +176,7 @@ frame_seq_analysis_packet( void *ptr, packet_info *pinfo, epan_dissect_t *edt _U
|
|||
|
||||
g_queue_push_tail(sainfo->items, sai);
|
||||
|
||||
return TRUE;
|
||||
return TAP_PACKET_REDRAW;
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
@ -3653,7 +3653,7 @@ static void gsm_a_sacch_rr_stat_init(stat_tap_table_ui* new_stat)
|
|||
"GSM A-I/F SACCH Statistics", gsm_a_rr_short_pd_msg_strings);
|
||||
}
|
||||
|
||||
static gboolean
|
||||
static tap_packet_status
|
||||
gsm_a_stat_packet(void *tapdata, const void *gatr_ptr, guint8 pdu_type, int protocol_disc)
|
||||
{
|
||||
stat_data_t* stat_data = (stat_data_t*)tapdata;
|
||||
|
@ -3662,73 +3662,73 @@ gsm_a_stat_packet(void *tapdata, const void *gatr_ptr, guint8 pdu_type, int prot
|
|||
stat_tap_table_item_type* msg_data;
|
||||
guint i = 0;
|
||||
|
||||
if (gatr->pdu_type != pdu_type) return FALSE;
|
||||
if (pdu_type == BSSAP_PDU_TYPE_DTAP && (int)gatr->protocol_disc != protocol_disc) return FALSE;
|
||||
if (pdu_type == GSM_A_PDU_TYPE_SACCH && gatr->protocol_disc != 0) return FALSE;
|
||||
if (gatr->pdu_type != pdu_type) return TAP_PACKET_DONT_REDRAW;
|
||||
if (pdu_type == BSSAP_PDU_TYPE_DTAP && (int)gatr->protocol_disc != protocol_disc) return TAP_PACKET_DONT_REDRAW;
|
||||
if (pdu_type == GSM_A_PDU_TYPE_SACCH && gatr->protocol_disc != 0) return TAP_PACKET_DONT_REDRAW;
|
||||
|
||||
table = g_array_index(stat_data->stat_tap_data->tables, stat_tap_table*, i);
|
||||
msg_data = stat_tap_get_field_data(table, gatr->message_type, COUNT_COLUMN);
|
||||
msg_data->value.uint_value++;
|
||||
stat_tap_set_field_data(table, gatr->message_type, COUNT_COLUMN, msg_data);
|
||||
|
||||
return TRUE;
|
||||
return TAP_PACKET_REDRAW;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
static tap_packet_status
|
||||
gsm_a_bssmap_stat_packet(void *tapdata, packet_info *pinfo _U_, epan_dissect_t *edt _U_, const void *gatr_ptr)
|
||||
{
|
||||
return gsm_a_stat_packet(tapdata, gatr_ptr, BSSAP_PDU_TYPE_BSSMAP, 0);
|
||||
}
|
||||
|
||||
static gboolean
|
||||
static tap_packet_status
|
||||
gsm_a_dtap_mm_stat_packet(void *tapdata, packet_info *pinfo _U_, epan_dissect_t *edt _U_, const void *gatr_ptr)
|
||||
{
|
||||
return gsm_a_stat_packet(tapdata, gatr_ptr, BSSAP_PDU_TYPE_DTAP, PD_MM);
|
||||
}
|
||||
|
||||
static gboolean
|
||||
static tap_packet_status
|
||||
gsm_a_dtap_rr_stat_packet(void *tapdata, packet_info *pinfo _U_, epan_dissect_t *edt _U_, const void *gatr_ptr)
|
||||
{
|
||||
return gsm_a_stat_packet(tapdata, gatr_ptr, BSSAP_PDU_TYPE_DTAP, PD_RR);
|
||||
}
|
||||
|
||||
static gboolean
|
||||
static tap_packet_status
|
||||
gsm_a_dtap_cc_stat_packet(void *tapdata, packet_info *pinfo _U_, epan_dissect_t *edt _U_, const void *gatr_ptr)
|
||||
{
|
||||
return gsm_a_stat_packet(tapdata, gatr_ptr, BSSAP_PDU_TYPE_DTAP, PD_CC);
|
||||
}
|
||||
|
||||
static gboolean
|
||||
static tap_packet_status
|
||||
gsm_a_dtap_gmm_stat_packet(void *tapdata, packet_info *pinfo _U_, epan_dissect_t *edt _U_, const void *gatr_ptr)
|
||||
{
|
||||
return gsm_a_stat_packet(tapdata, gatr_ptr, BSSAP_PDU_TYPE_DTAP, PD_GMM);
|
||||
}
|
||||
|
||||
static gboolean
|
||||
static tap_packet_status
|
||||
gsm_a_dtap_sms_stat_packet(void *tapdata, packet_info *pinfo _U_, epan_dissect_t *edt _U_, const void *gatr_ptr)
|
||||
{
|
||||
return gsm_a_stat_packet(tapdata, gatr_ptr, BSSAP_PDU_TYPE_DTAP, PD_SMS);
|
||||
}
|
||||
|
||||
static gboolean
|
||||
static tap_packet_status
|
||||
gsm_a_dtap_sm_stat_packet(void *tapdata, packet_info *pinfo _U_, epan_dissect_t *edt _U_, const void *gatr_ptr)
|
||||
{
|
||||
return gsm_a_stat_packet(tapdata, gatr_ptr, BSSAP_PDU_TYPE_DTAP, PD_SM);
|
||||
}
|
||||
|
||||
static gboolean
|
||||
static tap_packet_status
|
||||
gsm_a_dtap_ss_stat_packet(void *tapdata, packet_info *pinfo _U_, epan_dissect_t *edt _U_, const void *gatr_ptr)
|
||||
{
|
||||
return gsm_a_stat_packet(tapdata, gatr_ptr, BSSAP_PDU_TYPE_DTAP, PD_SS);
|
||||
}
|
||||
|
||||
static gboolean
|
||||
static tap_packet_status
|
||||
gsm_a_dtap_tp_stat_packet(void *tapdata, packet_info *pinfo _U_, epan_dissect_t *edt _U_, const void *gatr_ptr)
|
||||
{
|
||||
return gsm_a_stat_packet(tapdata, gatr_ptr, BSSAP_PDU_TYPE_DTAP, PD_TP);
|
||||
}
|
||||
|
||||
static gboolean
|
||||
static tap_packet_status
|
||||
gsm_a_sacch_rr_stat_packet(void *tapdata, packet_info *pinfo _U_, epan_dissect_t *edt _U_, const void *gatr_ptr)
|
||||
{
|
||||
return gsm_a_stat_packet(tapdata, gatr_ptr, GSM_A_PDU_TYPE_SACCH, 0);
|
||||
|
|
|
@ -23700,7 +23700,7 @@ static void gsm_map_stat_init(stat_tap_table_ui* new_stat)
|
|||
}
|
||||
}
|
||||
|
||||
static gboolean
|
||||
static tap_packet_status
|
||||
gsm_map_stat_packet(void *tapdata, packet_info *pinfo _U_, epan_dissect_t *edt _U_, const void *gmtr_ptr)
|
||||
{
|
||||
stat_data_t* stat_data = (stat_data_t*)tapdata;
|
||||
|
@ -23755,7 +23755,7 @@ gsm_map_stat_packet(void *tapdata, packet_info *pinfo _U_, epan_dissect_t *edt _
|
|||
avg_data = stat_tap_get_field_data(table, gmtr->opcode, AVG_BYTES_COLUMN);
|
||||
avg_data->value.float_value += (float) (fwd_bytes + rev_bytes) / (invokes + results);
|
||||
stat_tap_set_field_data(table, gmtr->opcode, AVG_BYTES_COLUMN, avg_data);
|
||||
return TRUE;
|
||||
return TAP_PACKET_REDRAW;
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
|
@ -383,8 +383,8 @@ static void osmux_stats_tree_init(stats_tree *st)
|
|||
st_osmux_stats_conn = stats_tree_create_node(st, st_str_conn, st_osmux_stats, STAT_DT_INT, TRUE);
|
||||
}
|
||||
|
||||
static int osmux_stats_tree_packet(stats_tree *st, packet_info *pinfo,
|
||||
epan_dissect_t *edt _U_, const void *p _U_)
|
||||
static tap_packet_status osmux_stats_tree_packet(stats_tree *st,
|
||||
packet_info *pinfo, epan_dissect_t *edt _U_, const void *p _U_)
|
||||
{
|
||||
gchar* stream_name;
|
||||
gchar* ft_name;
|
||||
|
@ -463,7 +463,7 @@ static int osmux_stats_tree_packet(stats_tree *st, packet_info *pinfo,
|
|||
|
||||
}
|
||||
|
||||
return 1;
|
||||
return TAP_PACKET_REDRAW;
|
||||
}
|
||||
|
||||
void proto_register_osmux(void)
|
||||
|
|
|
@ -2088,7 +2088,7 @@ gtpstat_init(struct register_srt* srt _U_, GArray* srt_array)
|
|||
init_srt_table_row(gtp_srt_table, 3, "Delete PDP context");
|
||||
}
|
||||
|
||||
static int
|
||||
static tap_packet_status
|
||||
gtpstat_packet(void *pss, packet_info *pinfo, epan_dissect_t *edt _U_, const void *prv)
|
||||
{
|
||||
guint i = 0;
|
||||
|
@ -2099,11 +2099,11 @@ gtpstat_packet(void *pss, packet_info *pinfo, epan_dissect_t *edt _U_, const voi
|
|||
|
||||
/* we are only interested in reply packets */
|
||||
if(gtp->is_request){
|
||||
return 0;
|
||||
return TAP_PACKET_DONT_REDRAW;
|
||||
}
|
||||
/* if we have not seen the request, just ignore it */
|
||||
if(!gtp->req_frame){
|
||||
return 0;
|
||||
return TAP_PACKET_DONT_REDRAW;
|
||||
}
|
||||
|
||||
/* Only use the commands we know how to handle, this is not a comprehensive list */
|
||||
|
@ -2122,13 +2122,13 @@ gtpstat_packet(void *pss, packet_info *pinfo, epan_dissect_t *edt _U_, const voi
|
|||
case GTP_MSG_DELETE_PDP_REQ: idx=3;
|
||||
break;
|
||||
default:
|
||||
return 0;
|
||||
return TAP_PACKET_DONT_REDRAW;
|
||||
}
|
||||
|
||||
gtp_srt_table = g_array_index(data->srt_array, srt_stat_table*, i);
|
||||
add_srt_table_data(gtp_srt_table, idx, >p->req_time, pinfo);
|
||||
|
||||
return 1;
|
||||
return TAP_PACKET_REDRAW;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -1202,7 +1202,7 @@ typedef enum _ras_category {
|
|||
|
||||
#define NUM_RAS_STATS 7
|
||||
|
||||
static gboolean
|
||||
static tap_packet_status
|
||||
h225rassrt_packet(void *phs, packet_info *pinfo _U_, epan_dissect_t *edt _U_, const void *phi)
|
||||
{
|
||||
rtd_data_t* rtd_data = (rtd_data_t*)phs;
|
||||
|
@ -1214,7 +1214,7 @@ h225rassrt_packet(void *phs, packet_info *pinfo _U_, epan_dissect_t *edt _U_, co
|
|||
|
||||
if (pi->msg_type != H225_RAS || pi->msg_tag == -1) {
|
||||
/* No RAS Message or uninitialized msg_tag -> return */
|
||||
return FALSE;
|
||||
return TAP_PACKET_DONT_REDRAW;
|
||||
}
|
||||
|
||||
if (pi->msg_tag < 21) {
|
||||
|
@ -1224,7 +1224,7 @@ h225rassrt_packet(void *phs, packet_info *pinfo _U_, epan_dissect_t *edt _U_, co
|
|||
}
|
||||
else {
|
||||
/* No SRT yet (ToDo) */
|
||||
return FALSE;
|
||||
return TAP_PACKET_DONT_REDRAW;
|
||||
}
|
||||
|
||||
switch(rasmsg_type) {
|
||||
|
@ -1256,9 +1256,9 @@ h225rassrt_packet(void *phs, packet_info *pinfo _U_, epan_dissect_t *edt _U_, co
|
|||
break;
|
||||
|
||||
default:
|
||||
return FALSE;
|
||||
return TAP_PACKET_DONT_REDRAW;
|
||||
}
|
||||
return TRUE;
|
||||
return TAP_PACKET_REDRAW;
|
||||
}
|
||||
|
||||
|
||||
|
@ -8238,7 +8238,7 @@ static void h225_stat_init(stat_tap_table_ui* new_stat)
|
|||
other_idx = row_idx;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
static tap_packet_status
|
||||
h225_stat_packet(void *tapdata, packet_info *pinfo _U_, epan_dissect_t *edt _U_, const void *hpi_ptr)
|
||||
{
|
||||
stat_data_t* stat_data = (stat_data_t*)tapdata;
|
||||
|
@ -8247,7 +8247,7 @@ h225_stat_packet(void *tapdata, packet_info *pinfo _U_, epan_dissect_t *edt _U_,
|
|||
int reason_idx = -1;
|
||||
|
||||
if(hpi->msg_tag < 0) { /* uninitialized */
|
||||
return FALSE;
|
||||
return TAP_PACKET_DONT_REDRAW;
|
||||
}
|
||||
|
||||
switch (hpi->msg_type) {
|
||||
|
@ -8339,9 +8339,9 @@ h225_stat_packet(void *tapdata, packet_info *pinfo _U_, epan_dissect_t *edt _U_,
|
|||
stat_tap_set_field_data(table, reason_idx, COUNT_COLUMN, msg_data);
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
return TAP_PACKET_REDRAW;
|
||||
}
|
||||
return FALSE;
|
||||
return TAP_PACKET_DONT_REDRAW;
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
|
@ -329,7 +329,7 @@ hartip_stats_tree_init(stats_tree* st)
|
|||
st_node_errors = stats_tree_create_node(st, st_str_errors, st_node_packets, STAT_DT_INT, TRUE);
|
||||
}
|
||||
|
||||
static int
|
||||
static tap_packet_status
|
||||
hartip_stats_tree_packet(stats_tree* st, packet_info* pinfo _U_,
|
||||
epan_dissect_t* edt _U_, const void* p)
|
||||
{
|
||||
|
@ -356,7 +356,7 @@ hartip_stats_tree_packet(stats_tree* st, packet_info* pinfo _U_,
|
|||
message_type_node = st_node_errors;
|
||||
break;
|
||||
default:
|
||||
return 0; /* Don't want to track invalid messages for now. */
|
||||
return TAP_PACKET_DONT_REDRAW; /* Don't want to track invalid messages for now. */
|
||||
}
|
||||
|
||||
message_id_node_str = val_to_str(tapinfo->message_id,
|
||||
|
@ -367,7 +367,7 @@ hartip_stats_tree_packet(stats_tree* st, packet_info* pinfo _U_,
|
|||
tick_stat_node(st, message_type_node_str, st_node_packets, FALSE);
|
||||
tick_stat_node(st, message_id_node_str, message_type_node, FALSE);
|
||||
|
||||
return 1;
|
||||
return TAP_PACKET_REDRAW;
|
||||
}
|
||||
|
||||
static gint
|
||||
|
|
|
@ -212,7 +212,7 @@ static void hpfeeds_stats_tree_init(stats_tree* st)
|
|||
channels_list = wmem_list_new(wmem_epan_scope());
|
||||
}
|
||||
|
||||
static int hpfeeds_stats_tree_packet(stats_tree* st _U_, packet_info* pinfo _U_, epan_dissect_t* edt _U_, const void* p)
|
||||
static tap_packet_status hpfeeds_stats_tree_packet(stats_tree* st _U_, packet_info* pinfo _U_, epan_dissect_t* edt _U_, const void* p)
|
||||
{
|
||||
const struct HpfeedsTap *pi = (const struct HpfeedsTap *)p;
|
||||
wmem_list_frame_t* head = wmem_list_head(channels_list);
|
||||
|
@ -243,7 +243,7 @@ static int hpfeeds_stats_tree_packet(stats_tree* st _U_, packet_info* pinfo _U_,
|
|||
|
||||
stats_tree_tick_pivot(st, st_node_opcodes,
|
||||
val_to_str(pi->opcode, opcode_vals, "Unknown opcode (%d)"));
|
||||
return 1;
|
||||
return TAP_PACKET_REDRAW;
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
|
@ -338,7 +338,7 @@ typedef struct _http_eo_t {
|
|||
const guint8 *payload_data;
|
||||
} http_eo_t;
|
||||
|
||||
static gboolean
|
||||
static tap_packet_status
|
||||
http_eo_packet(void *tapdata, packet_info *pinfo, epan_dissect_t *edt _U_, const void *data)
|
||||
{
|
||||
export_object_list_t *object_list = (export_object_list_t *)tapdata;
|
||||
|
@ -359,9 +359,9 @@ http_eo_packet(void *tapdata, packet_info *pinfo, epan_dissect_t *edt _U_, const
|
|||
|
||||
object_list->add_entry(object_list->gui_data, entry);
|
||||
|
||||
return TRUE; /* State changed - window should be redrawn */
|
||||
return TAP_PACKET_REDRAW; /* State changed - window should be redrawn */
|
||||
} else {
|
||||
return FALSE; /* State unchanged - no window updates needed */
|
||||
return TAP_PACKET_DONT_REDRAW; /* State unchanged - no window updates needed */
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -463,7 +463,7 @@ http_reqs_stats_tree_init(stats_tree* st)
|
|||
}
|
||||
|
||||
/* HTTP/Load Distribution stats packet function */
|
||||
static int
|
||||
static tap_packet_status
|
||||
http_reqs_stats_tree_packet(stats_tree* st, packet_info* pinfo, epan_dissect_t* edt _U_, const void* p)
|
||||
{
|
||||
const http_info_value_t* v = (const http_info_value_t*)p;
|
||||
|
@ -491,7 +491,7 @@ http_reqs_stats_tree_packet(stats_tree* st, packet_info* pinfo, epan_dissect_t*
|
|||
|
||||
wmem_free(NULL, ip_str);
|
||||
|
||||
return 1;
|
||||
return TAP_PACKET_REDRAW;
|
||||
|
||||
} else if (i != 0) {
|
||||
ip_str = address_to_str(NULL, &pinfo->src);
|
||||
|
@ -507,10 +507,10 @@ http_reqs_stats_tree_packet(stats_tree* st, packet_info* pinfo, epan_dissect_t*
|
|||
|
||||
wmem_free(NULL, ip_str);
|
||||
|
||||
return 1;
|
||||
return TAP_PACKET_REDRAW;
|
||||
}
|
||||
|
||||
return 0;
|
||||
return TAP_PACKET_DONT_REDRAW;
|
||||
}
|
||||
|
||||
|
||||
|
@ -525,7 +525,7 @@ http_req_stats_tree_init(stats_tree* st)
|
|||
}
|
||||
|
||||
/* HTTP/Requests stats packet function */
|
||||
static int
|
||||
static tap_packet_status
|
||||
http_req_stats_tree_packet(stats_tree* st, packet_info* pinfo _U_, epan_dissect_t* edt _U_, const void* p)
|
||||
{
|
||||
const http_info_value_t* v = (const http_info_value_t*)p;
|
||||
|
@ -542,10 +542,10 @@ http_req_stats_tree_packet(stats_tree* st, packet_info* pinfo _U_, epan_dissect_
|
|||
}
|
||||
}
|
||||
|
||||
return 1;
|
||||
return TAP_PACKET_REDRAW;
|
||||
}
|
||||
|
||||
return 0;
|
||||
return TAP_PACKET_DONT_REDRAW;
|
||||
}
|
||||
|
||||
static const gchar *st_str_packets = "Total HTTP Packets";
|
||||
|
@ -588,7 +588,7 @@ http_stats_tree_init(stats_tree* st)
|
|||
}
|
||||
|
||||
/* HTTP/Packet Counter stats packet function */
|
||||
static int
|
||||
static tap_packet_status
|
||||
http_stats_tree_packet(stats_tree* st, packet_info* pinfo _U_, epan_dissect_t* edt _U_, const void* p)
|
||||
{
|
||||
const http_info_value_t* v = (const http_info_value_t*)p;
|
||||
|
@ -633,7 +633,7 @@ http_stats_tree_packet(stats_tree* st, packet_info* pinfo _U_, epan_dissect_t* e
|
|||
tick_stat_node(st, st_str_other, st_node_packets, FALSE);
|
||||
}
|
||||
|
||||
return 1;
|
||||
return TAP_PACKET_REDRAW;
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -859,7 +859,7 @@ determine_http_location_target(const gchar *base_url, const gchar * location_url
|
|||
}
|
||||
|
||||
/* HTTP/Request Sequences stats packet function */
|
||||
static int
|
||||
static tap_packet_status
|
||||
http_seq_stats_tree_packet(stats_tree* st, packet_info* pinfo _U_, epan_dissect_t* edt _U_, const void* p)
|
||||
{
|
||||
const http_info_value_t* v = (const http_info_value_t*)p;
|
||||
|
@ -915,7 +915,7 @@ http_seq_stats_tree_packet(stats_tree* st, packet_info* pinfo _U_, epan_dissect_
|
|||
current_node_id_p = parent_node_id_p;
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
return TAP_PACKET_DONT_REDRAW;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -3369,14 +3369,14 @@ static void http2_stats_tree_init(stats_tree* st)
|
|||
|
||||
}
|
||||
|
||||
static int http2_stats_tree_packet(stats_tree* st, packet_info* pinfo _U_, epan_dissect_t* edt _U_, const void* p)
|
||||
static tap_packet_status http2_stats_tree_packet(stats_tree* st, packet_info* pinfo _U_, epan_dissect_t* edt _U_, const void* p)
|
||||
{
|
||||
const struct HTTP2Tap *pi = (const struct HTTP2Tap *)p;
|
||||
tick_stat_node(st, st_str_http2, 0, FALSE);
|
||||
stats_tree_tick_pivot(st, st_node_http2_type,
|
||||
val_to_str(pi->type, http2_type_vals, "Unknown type (%d)"));
|
||||
|
||||
return 1;
|
||||
return TAP_PACKET_REDRAW;
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
@ -437,14 +437,14 @@ static const value_string interface_role_str[] = {
|
|||
|
||||
/* whenever a ICMP packet is seen by the tap listener */
|
||||
/* Add a new frame into the graph */
|
||||
static gboolean
|
||||
static tap_packet_status
|
||||
icmp_seq_analysis_packet( void *ptr, packet_info *pinfo, epan_dissect_t *edt _U_, const void *dummy _U_)
|
||||
{
|
||||
seq_analysis_info_t *sainfo = (seq_analysis_info_t *) ptr;
|
||||
seq_analysis_item_t *sai = sequence_analysis_create_sai_with_addresses(pinfo, sainfo);
|
||||
|
||||
if (!sai)
|
||||
return FALSE;
|
||||
return TAP_PACKET_DONT_REDRAW;
|
||||
|
||||
sai->frame_number = pinfo->num;
|
||||
|
||||
|
@ -470,7 +470,7 @@ icmp_seq_analysis_packet( void *ptr, packet_info *pinfo, epan_dissect_t *edt _U_
|
|||
|
||||
g_queue_push_tail(sainfo->items, sai);
|
||||
|
||||
return TRUE;
|
||||
return TAP_PACKET_REDRAW;
|
||||
}
|
||||
|
||||
static conversation_t *_find_or_create_conversation(packet_info * pinfo)
|
||||
|
|
|
@ -1339,14 +1339,14 @@ static const value_string ext_echo_reply_state_str[] = {
|
|||
|
||||
/* whenever a ICMPv6 packet is seen by the tap listener */
|
||||
/* Add a new frame into the graph */
|
||||
static gboolean
|
||||
static tap_packet_status
|
||||
icmpv6_seq_analysis_packet( void *ptr, packet_info *pinfo, epan_dissect_t *edt _U_, const void *dummy _U_)
|
||||
{
|
||||
seq_analysis_info_t *sainfo = (seq_analysis_info_t *) ptr;
|
||||
seq_analysis_item_t *sai = sequence_analysis_create_sai_with_addresses(pinfo, sainfo);
|
||||
|
||||
if (!sai)
|
||||
return FALSE;
|
||||
return TAP_PACKET_DONT_REDRAW;
|
||||
|
||||
sai->frame_number = pinfo->num;
|
||||
|
||||
|
@ -1372,7 +1372,7 @@ icmpv6_seq_analysis_packet( void *ptr, packet_info *pinfo, epan_dissect_t *edt _
|
|||
|
||||
g_queue_push_tail(sainfo->items, sai);
|
||||
|
||||
return TRUE;
|
||||
return TAP_PACKET_REDRAW;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -6288,7 +6288,7 @@ wlan_conv_get_filter_type(conv_item_t* conv, conv_filter_type_e filter)
|
|||
|
||||
static ct_dissector_info_t wlan_ct_dissector_info = {&wlan_conv_get_filter_type};
|
||||
|
||||
static int
|
||||
static tap_packet_status
|
||||
wlan_conversation_packet(void *pct, packet_info *pinfo, epan_dissect_t *edt _U_, const void *vip)
|
||||
{
|
||||
conv_hash_t *hash = (conv_hash_t*) pct;
|
||||
|
@ -6296,7 +6296,7 @@ wlan_conversation_packet(void *pct, packet_info *pinfo, epan_dissect_t *edt _U_,
|
|||
|
||||
add_conversation_table_data(hash, &whdr->src, &whdr->dst, 0, 0, 1, pinfo->fd->pkt_len, &pinfo->rel_ts, &pinfo->abs_ts, &wlan_ct_dissector_info, ENDPOINT_NONE);
|
||||
|
||||
return 1;
|
||||
return TAP_PACKET_REDRAW;
|
||||
}
|
||||
|
||||
static const char*
|
||||
|
@ -6310,7 +6310,7 @@ wlan_host_get_filter_type(hostlist_talker_t* host, conv_filter_type_e filter)
|
|||
|
||||
static hostlist_dissector_info_t wlan_host_dissector_info = {&wlan_host_get_filter_type};
|
||||
|
||||
static int
|
||||
static tap_packet_status
|
||||
wlan_hostlist_packet(void *pit, packet_info *pinfo, epan_dissect_t *edt _U_, const void *vip)
|
||||
{
|
||||
conv_hash_t *hash = (conv_hash_t*) pit;
|
||||
|
@ -6322,7 +6322,7 @@ wlan_hostlist_packet(void *pit, packet_info *pinfo, epan_dissect_t *edt _U_, con
|
|||
add_hostlist_table_data(hash, &whdr->src, 0, TRUE, 1, pinfo->fd->pkt_len, &wlan_host_dissector_info, ENDPOINT_NONE);
|
||||
add_hostlist_table_data(hash, &whdr->dst, 0, FALSE, 1, pinfo->fd->pkt_len, &wlan_host_dissector_info, ENDPOINT_NONE);
|
||||
|
||||
return 1;
|
||||
return TAP_PACKET_REDRAW;
|
||||
}
|
||||
|
||||
static const char*
|
||||
|
|
|
@ -152,7 +152,7 @@ typedef struct _imf_eo_t {
|
|||
gchar *payload_data;
|
||||
} imf_eo_t;
|
||||
|
||||
static gboolean
|
||||
static tap_packet_status
|
||||
imf_eo_packet(void *tapdata, packet_info *pinfo, epan_dissect_t *edt _U_, const void *data)
|
||||
{
|
||||
export_object_list_t *object_list = (export_object_list_t *)tapdata;
|
||||
|
@ -182,9 +182,9 @@ imf_eo_packet(void *tapdata, packet_info *pinfo, epan_dissect_t *edt _U_, const
|
|||
|
||||
object_list->add_entry(object_list->gui_data, entry);
|
||||
|
||||
return TRUE; /* State changed - window should be redrawn */
|
||||
return TAP_PACKET_REDRAW; /* State changed - window should be redrawn */
|
||||
} else {
|
||||
return FALSE; /* State unchanged - no window updates needed */
|
||||
return TAP_PACKET_DONT_REDRAW; /* State unchanged - no window updates needed */
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -506,7 +506,7 @@ static const char* ip_conv_get_filter_type(conv_item_t* conv, conv_filter_type_e
|
|||
|
||||
static ct_dissector_info_t ip_ct_dissector_info = {&ip_conv_get_filter_type};
|
||||
|
||||
static int
|
||||
static tap_packet_status
|
||||
ip_conversation_packet(void *pct, packet_info *pinfo, epan_dissect_t *edt _U_, const void *vip)
|
||||
{
|
||||
conv_hash_t *hash = (conv_hash_t*) pct;
|
||||
|
@ -514,7 +514,7 @@ ip_conversation_packet(void *pct, packet_info *pinfo, epan_dissect_t *edt _U_, c
|
|||
|
||||
add_conversation_table_data(hash, &iph->ip_src, &iph->ip_dst, 0, 0, 1, pinfo->fd->pkt_len, &pinfo->rel_ts, &pinfo->abs_ts, &ip_ct_dissector_info, ENDPOINT_NONE);
|
||||
|
||||
return 1;
|
||||
return TAP_PACKET_REDRAW;
|
||||
}
|
||||
|
||||
static const char* ip_host_get_filter_type(hostlist_talker_t* host, conv_filter_type_e filter)
|
||||
|
@ -527,7 +527,7 @@ static const char* ip_host_get_filter_type(hostlist_talker_t* host, conv_filter_
|
|||
|
||||
static hostlist_dissector_info_t ip_host_dissector_info = {&ip_host_get_filter_type};
|
||||
|
||||
static int
|
||||
static tap_packet_status
|
||||
ip_hostlist_packet(void *pit, packet_info *pinfo, epan_dissect_t *edt _U_, const void *vip)
|
||||
{
|
||||
conv_hash_t *hash = (conv_hash_t*) pit;
|
||||
|
@ -538,7 +538,7 @@ ip_hostlist_packet(void *pit, packet_info *pinfo, epan_dissect_t *edt _U_, const
|
|||
XXX - this could probably be done more efficiently inside hostlist_table */
|
||||
add_hostlist_table_data(hash, &iph->ip_src, 0, TRUE, 1, pinfo->fd->pkt_len, &ip_host_dissector_info, ENDPOINT_NONE);
|
||||
add_hostlist_table_data(hash, &iph->ip_dst, 0, FALSE, 1, pinfo->fd->pkt_len, &ip_host_dissector_info, ENDPOINT_NONE);
|
||||
return 1;
|
||||
return TAP_PACKET_REDRAW;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
|
|
|
@ -426,7 +426,7 @@ static const char* ipv6_conv_get_filter_type(conv_item_t* conv, conv_filter_type
|
|||
|
||||
static ct_dissector_info_t ipv6_ct_dissector_info = {&ipv6_conv_get_filter_type};
|
||||
|
||||
static int
|
||||
static tap_packet_status
|
||||
ipv6_conversation_packet(void *pct, packet_info *pinfo, epan_dissect_t *edt _U_, const void *vip)
|
||||
{
|
||||
conv_hash_t *hash = (conv_hash_t*) pct;
|
||||
|
@ -436,7 +436,7 @@ ipv6_conversation_packet(void *pct, packet_info *pinfo, epan_dissect_t *edt _U_,
|
|||
pinfo->fd->pkt_len, &pinfo->rel_ts, &pinfo->abs_ts,
|
||||
&ipv6_ct_dissector_info, ENDPOINT_NONE);
|
||||
|
||||
return 1;
|
||||
return TAP_PACKET_REDRAW;
|
||||
}
|
||||
|
||||
static const char* ipv6_host_get_filter_type(hostlist_talker_t* host, conv_filter_type_e filter)
|
||||
|
@ -449,7 +449,7 @@ static const char* ipv6_host_get_filter_type(hostlist_talker_t* host, conv_filte
|
|||
|
||||
static hostlist_dissector_info_t ipv6_host_dissector_info = {&ipv6_host_get_filter_type};
|
||||
|
||||
static int
|
||||
static tap_packet_status
|
||||
ipv6_hostlist_packet(void *pit, packet_info *pinfo, epan_dissect_t *edt _U_, const void *vip)
|
||||
{
|
||||
conv_hash_t *hash = (conv_hash_t*) pit;
|
||||
|
@ -460,7 +460,7 @@ ipv6_hostlist_packet(void *pit, packet_info *pinfo, epan_dissect_t *edt _U_, con
|
|||
add_hostlist_table_data(hash, &ip6->ip6_dst, 0, FALSE, 1,
|
||||
pinfo->fd->pkt_len, &ipv6_host_dissector_info, ENDPOINT_NONE);
|
||||
|
||||
return 1;
|
||||
return TAP_PACKET_REDRAW;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
|
|
|
@ -148,7 +148,7 @@ static const char* ipx_conv_get_filter_type(conv_item_t* conv, conv_filter_type_
|
|||
|
||||
static ct_dissector_info_t ipx_ct_dissector_info = {&ipx_conv_get_filter_type};
|
||||
|
||||
static int
|
||||
static tap_packet_status
|
||||
ipx_conversation_packet(void *pct, packet_info *pinfo, epan_dissect_t *edt _U_, const void *vip)
|
||||
{
|
||||
conv_hash_t *hash = (conv_hash_t*) pct;
|
||||
|
@ -156,7 +156,7 @@ ipx_conversation_packet(void *pct, packet_info *pinfo, epan_dissect_t *edt _U_,
|
|||
|
||||
add_conversation_table_data(hash, &ipxh->ipx_src, &ipxh->ipx_dst, 0, 0, 1, pinfo->fd->pkt_len, &pinfo->rel_ts, &pinfo->abs_ts, &ipx_ct_dissector_info, ENDPOINT_NONE);
|
||||
|
||||
return 1;
|
||||
return TAP_PACKET_REDRAW;
|
||||
}
|
||||
|
||||
static const char* ipx_host_get_filter_type(hostlist_talker_t* host, conv_filter_type_e filter)
|
||||
|
@ -169,7 +169,7 @@ static const char* ipx_host_get_filter_type(hostlist_talker_t* host, conv_filter
|
|||
|
||||
static hostlist_dissector_info_t ipx_host_dissector_info = {&ipx_host_get_filter_type};
|
||||
|
||||
static int
|
||||
static tap_packet_status
|
||||
ipx_hostlist_packet(void *pit, packet_info *pinfo, epan_dissect_t *edt _U_, const void *vip)
|
||||
{
|
||||
conv_hash_t *hash = (conv_hash_t*) pit;
|
||||
|
@ -181,7 +181,7 @@ ipx_hostlist_packet(void *pit, packet_info *pinfo, epan_dissect_t *edt _U_, cons
|
|||
add_hostlist_table_data(hash, &ipxh->ipx_src, 0, TRUE, 1, pinfo->fd->pkt_len, &ipx_host_dissector_info, ENDPOINT_NONE);
|
||||
add_hostlist_table_data(hash, &ipxh->ipx_dst, 0, FALSE, 1, pinfo->fd->pkt_len, &ipx_host_dissector_info, ENDPOINT_NONE);
|
||||
|
||||
return 1;
|
||||
return TAP_PACKET_REDRAW;
|
||||
}
|
||||
|
||||
/* ================================================================= */
|
||||
|
|
|
@ -10424,7 +10424,7 @@ msg_stats_tree_init(stats_tree *st)
|
|||
st_node_dir = stats_tree_create_node(st, "Messages by Direction", 0, STAT_DT_INT, TRUE);
|
||||
}
|
||||
|
||||
static int
|
||||
static tap_packet_status
|
||||
msg_stats_tree_packet(stats_tree *st, packet_info *pinfo, epan_dissect_t *edt _U_, const void *p)
|
||||
{
|
||||
const gchar *msg = try_val_to_str_ext(((const isup_tap_rec_t*)p)->message_type, &isup_message_type_value_acro_ext);
|
||||
|
@ -10446,7 +10446,7 @@ msg_stats_tree_packet(stats_tree *st, packet_info *pinfo, epan_dissect_t *edt _U
|
|||
|
||||
wmem_free(NULL, dir);
|
||||
|
||||
return 1;
|
||||
return TAP_PACKET_REDRAW;
|
||||
}
|
||||
|
||||
/*---------------------------------------------------------------------*/
|
||||
|
|
|
@ -183,7 +183,7 @@ static const char* jxta_conv_get_filter_type(conv_item_t* conv, conv_filter_type
|
|||
|
||||
static ct_dissector_info_t jxta_ct_dissector_info = {&jxta_conv_get_filter_type};
|
||||
|
||||
static int
|
||||
static tap_packet_status
|
||||
jxta_conversation_packet(void *pct, packet_info *pinfo _U_, epan_dissect_t *edt _U_, const void *vip)
|
||||
{
|
||||
conv_hash_t *hash = (conv_hash_t*) pct;
|
||||
|
@ -192,7 +192,7 @@ jxta_conversation_packet(void *pct, packet_info *pinfo _U_, epan_dissect_t *edt
|
|||
add_conversation_table_data(hash, &jxtahdr->src_address, &jxtahdr->dest_address,
|
||||
0, 0, 1, jxtahdr->size, NULL, NULL, &jxta_ct_dissector_info, ENDPOINT_NONE);
|
||||
|
||||
return 1;
|
||||
return TAP_PACKET_REDRAW;
|
||||
}
|
||||
|
||||
static const char* jxta_host_get_filter_type(hostlist_talker_t* host, conv_filter_type_e filter)
|
||||
|
@ -205,7 +205,7 @@ static const char* jxta_host_get_filter_type(hostlist_talker_t* host, conv_filte
|
|||
|
||||
static hostlist_dissector_info_t jxta_host_dissector_info = {&jxta_host_get_filter_type};
|
||||
|
||||
static int
|
||||
static tap_packet_status
|
||||
jxta_hostlist_packet(void *pit, packet_info *pinfo _U_, epan_dissect_t *edt _U_, const void *vip)
|
||||
{
|
||||
conv_hash_t *hash = (conv_hash_t*) pit;
|
||||
|
@ -216,7 +216,7 @@ jxta_hostlist_packet(void *pit, packet_info *pinfo _U_, epan_dissect_t *edt _U_,
|
|||
XXX - this could probably be done more efficiently inside hostlist_table */
|
||||
add_hostlist_table_data(hash, &jxtahdr->src_address, 0, TRUE, 1, jxtahdr->size, &jxta_host_dissector_info, ENDPOINT_NONE);
|
||||
add_hostlist_table_data(hash, &jxtahdr->dest_address, 0, FALSE, 1, jxtahdr->size, &jxta_host_dissector_info, ENDPOINT_NONE);
|
||||
return 1;
|
||||
return TAP_PACKET_REDRAW;
|
||||
}
|
||||
|
||||
static int uri_to_str(const address* addr, gchar *buf, int buf_len)
|
||||
|
|
|
@ -6062,7 +6062,7 @@ typedef struct
|
|||
const gchar * description;
|
||||
} lbm_uim_stream_info_t;
|
||||
|
||||
static gboolean
|
||||
static tap_packet_status
|
||||
lbm_uim_seq_analysis_packet(void *ptr, packet_info *pinfo, epan_dissect_t *edt _U_, const void *uim_info)
|
||||
{
|
||||
seq_analysis_info_t *sainfo = (seq_analysis_info_t *) ptr;
|
||||
|
@ -6078,7 +6078,7 @@ lbm_uim_seq_analysis_packet(void *ptr, packet_info *pinfo, epan_dissect_t *edt _
|
|||
|
||||
if (stream_info->endpoint_a.type != stream_info->endpoint_b.type)
|
||||
{
|
||||
return TRUE;
|
||||
return TAP_PACKET_DONT_REDRAW;
|
||||
}
|
||||
if (stream_info->endpoint_a.type == lbm_uim_instance_stream)
|
||||
{
|
||||
|
@ -6187,7 +6187,7 @@ lbm_uim_seq_analysis_packet(void *ptr, packet_info *pinfo, epan_dissect_t *edt _
|
|||
|
||||
g_queue_push_tail(sainfo->items, sai);
|
||||
|
||||
return TRUE;
|
||||
return TAP_PACKET_REDRAW;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -2015,14 +2015,14 @@ static void lbmr_tag_free_cb(void * record)
|
|||
}
|
||||
}
|
||||
|
||||
static gboolean lbmr_match_packet(packet_info * pinfo, const lbmr_tag_entry_t * entry)
|
||||
static tap_packet_status lbmr_match_packet(packet_info * pinfo, const lbmr_tag_entry_t * entry)
|
||||
{
|
||||
guint32 dest_addr_h;
|
||||
guint32 src_addr_h;
|
||||
|
||||
if ((pinfo->dst.type != AT_IPv4) || (pinfo->dst.len != 4) ||
|
||||
(pinfo->src.type != AT_IPv4) || (pinfo->src.len != 4))
|
||||
return (FALSE);
|
||||
return (TAP_PACKET_DONT_REDRAW);
|
||||
dest_addr_h = pntoh32(pinfo->dst.data);
|
||||
src_addr_h = pntoh32(pinfo->src.data);
|
||||
|
||||
|
@ -2032,21 +2032,21 @@ static gboolean lbmr_match_packet(packet_info * pinfo, const lbmr_tag_entry_t *
|
|||
if ((dest_addr_h != entry->mc_incoming_address_val_h) && (dest_addr_h != entry->mc_outgoing_address_val_h))
|
||||
{
|
||||
/* No match. */
|
||||
return (FALSE);
|
||||
return (TAP_PACKET_DONT_REDRAW);
|
||||
}
|
||||
/* Check for the correct port. */
|
||||
if ((dest_addr_h == entry->mc_incoming_address_val_h) && (pinfo->destport != entry->mc_incoming_udp_port))
|
||||
{
|
||||
/* Wrong incoming port. */
|
||||
return (FALSE);
|
||||
return (TAP_PACKET_DONT_REDRAW);
|
||||
}
|
||||
if ((dest_addr_h == entry->mc_outgoing_address_val_h) && (pinfo->destport != entry->mc_outgoing_udp_port))
|
||||
{
|
||||
/* Wrong outgoing port. */
|
||||
return (FALSE);
|
||||
return (TAP_PACKET_DONT_REDRAW);
|
||||
}
|
||||
/* Must be one of ours. */
|
||||
return (TRUE);
|
||||
return (TAP_PACKET_REDRAW);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -2059,11 +2059,11 @@ static gboolean lbmr_match_packet(packet_info * pinfo, const lbmr_tag_entry_t *
|
|||
|| ((pinfo->srcport <= entry->uc_port_high) && (pinfo->srcport >= entry->uc_port_low))))
|
||||
{
|
||||
/* One of ours, so handle it. */
|
||||
return (TRUE);
|
||||
return (TAP_PACKET_REDRAW);
|
||||
}
|
||||
}
|
||||
}
|
||||
return (FALSE);
|
||||
return (TAP_PACKET_DONT_REDRAW);
|
||||
}
|
||||
|
||||
static char * lbmr_tag_find(packet_info * pinfo)
|
||||
|
@ -2843,7 +2843,7 @@ static void lbmr_topic_ads_topic_stats_tree_init(stats_tree * tree)
|
|||
lbmr_stats_tree_handle_topic_ads_topic = stats_tree_create_node(tree, lbmr_stat_tree_name_topic_ads_topic, 0, STAT_DT_INT, TRUE);
|
||||
}
|
||||
|
||||
static int lbmr_topic_ads_topic_stats_tree_packet(stats_tree * tree, packet_info * pinfo, epan_dissect_t * edt _U_, const void * data)
|
||||
static tap_packet_status lbmr_topic_ads_topic_stats_tree_packet(stats_tree * tree, packet_info * pinfo, epan_dissect_t * edt _U_, const void * data)
|
||||
{
|
||||
const lbm_lbmr_topic_advertisement_tap_info_t * info = (const lbm_lbmr_topic_advertisement_tap_info_t *) data;
|
||||
int topic_node;
|
||||
|
@ -2855,7 +2855,7 @@ static int lbmr_topic_ads_topic_stats_tree_packet(stats_tree * tree, packet_info
|
|||
source_node = tick_stat_node(tree, address_to_str(wmem_packet_scope(), &pinfo->net_src), topic_node, TRUE);
|
||||
full_source_string = wmem_strdup_printf(wmem_packet_scope(), "%s[%" G_GUINT32_FORMAT "]", info->source, info->topic_index);
|
||||
tick_stat_node(tree, full_source_string, source_node, TRUE);
|
||||
return (1);
|
||||
return (TAP_PACKET_REDRAW);
|
||||
}
|
||||
|
||||
/*----------------------------------------------------------------------------*/
|
||||
|
@ -2870,7 +2870,7 @@ static void lbmr_topic_ads_source_stats_tree_init(stats_tree * tree)
|
|||
lbmr_stats_tree_handle_topic_ads_source = stats_tree_create_node(tree, lbmr_stat_tree_name_topic_ads_source, 0, STAT_DT_INT, TRUE);
|
||||
}
|
||||
|
||||
static int lbmr_topic_ads_source_stats_tree_packet(stats_tree * tree, packet_info * pinfo, epan_dissect_t * edt _U_, const void * data)
|
||||
static tap_packet_status lbmr_topic_ads_source_stats_tree_packet(stats_tree * tree, packet_info * pinfo, epan_dissect_t * edt _U_, const void * data)
|
||||
{
|
||||
const lbm_lbmr_topic_advertisement_tap_info_t * info = (const lbm_lbmr_topic_advertisement_tap_info_t *) data;
|
||||
int source_node;
|
||||
|
@ -2882,7 +2882,7 @@ static int lbmr_topic_ads_source_stats_tree_packet(stats_tree * tree, packet_inf
|
|||
topic_node = tick_stat_node(tree, info->topic, source_node, TRUE);
|
||||
full_source_string = wmem_strdup_printf(wmem_packet_scope(), "%s[%" G_GUINT32_FORMAT "]", info->source, info->topic_index);
|
||||
tick_stat_node(tree, full_source_string, topic_node, TRUE);
|
||||
return (1);
|
||||
return (TAP_PACKET_REDRAW);
|
||||
}
|
||||
|
||||
/*----------------------------------------------------------------------------*/
|
||||
|
@ -2896,7 +2896,7 @@ static void lbmr_topic_ads_transport_stats_tree_init(stats_tree * tree)
|
|||
lbmr_stats_tree_handle_topic_ads_transport = stats_tree_create_node(tree, lbmr_stat_tree_name_topic_ads_transport, 0, STAT_DT_INT, TRUE);
|
||||
}
|
||||
|
||||
static int lbmr_topic_ads_transport_stats_tree_packet(stats_tree * tree, packet_info * pinfo _U_, epan_dissect_t * edt _U_, const void * data)
|
||||
static tap_packet_status lbmr_topic_ads_transport_stats_tree_packet(stats_tree * tree, packet_info * pinfo _U_, epan_dissect_t * edt _U_, const void * data)
|
||||
{
|
||||
const lbm_lbmr_topic_advertisement_tap_info_t * info = (const lbm_lbmr_topic_advertisement_tap_info_t *) data;
|
||||
int transport_node;
|
||||
|
@ -2906,7 +2906,7 @@ static int lbmr_topic_ads_transport_stats_tree_packet(stats_tree * tree, packet_
|
|||
transport_node = tick_stat_node(tree, info->source, lbmr_stats_tree_handle_topic_ads_transport, TRUE);
|
||||
full_source_string = wmem_strdup_printf(wmem_packet_scope(), "%s [%" G_GUINT32_FORMAT "]", info->topic, info->topic_index);
|
||||
tick_stat_node(tree, full_source_string, transport_node, TRUE);
|
||||
return (1);
|
||||
return (TAP_PACKET_REDRAW);
|
||||
}
|
||||
|
||||
/*----------------------------------------------------------------------------*/
|
||||
|
@ -2920,7 +2920,7 @@ static void lbmr_topic_queries_topic_stats_tree_init(stats_tree * tree)
|
|||
lbmr_stats_tree_handle_topic_queries_topic = stats_tree_create_node(tree, lbmr_stat_tree_name_topic_queries_topic, 0, STAT_DT_INT, TRUE);
|
||||
}
|
||||
|
||||
static int lbmr_topic_queries_topic_stats_tree_packet(stats_tree * tree, packet_info * pinfo, epan_dissect_t * edt _U_, const void * data)
|
||||
static tap_packet_status lbmr_topic_queries_topic_stats_tree_packet(stats_tree * tree, packet_info * pinfo, epan_dissect_t * edt _U_, const void * data)
|
||||
{
|
||||
const lbm_lbmr_topic_query_tap_info_t * info = (const lbm_lbmr_topic_query_tap_info_t *) data;
|
||||
int topic_node;
|
||||
|
@ -2928,7 +2928,7 @@ static int lbmr_topic_queries_topic_stats_tree_packet(stats_tree * tree, packet_
|
|||
tick_stat_node(tree, lbmr_stat_tree_name_topic_queries_topic, 0, FALSE);
|
||||
topic_node = tick_stat_node(tree, info->topic, lbmr_stats_tree_handle_topic_queries_topic, TRUE);
|
||||
tick_stat_node(tree, address_to_str(wmem_packet_scope(), &pinfo->net_src), topic_node, TRUE);
|
||||
return (1);
|
||||
return (TAP_PACKET_REDRAW);
|
||||
}
|
||||
|
||||
/*----------------------------------------------------------------------------*/
|
||||
|
@ -2942,7 +2942,7 @@ static void lbmr_topic_queries_receiver_stats_tree_init(stats_tree * tree)
|
|||
lbmr_stats_tree_handle_topic_queries_receiver = stats_tree_create_node(tree, lbmr_stat_tree_name_topic_queries_receiver, 0, STAT_DT_INT, TRUE);
|
||||
}
|
||||
|
||||
static int lbmr_topic_queries_receiver_stats_tree_packet(stats_tree * tree, packet_info * pinfo, epan_dissect_t * edt _U_, const void * data)
|
||||
static tap_packet_status lbmr_topic_queries_receiver_stats_tree_packet(stats_tree * tree, packet_info * pinfo, epan_dissect_t * edt _U_, const void * data)
|
||||
{
|
||||
const lbm_lbmr_topic_query_tap_info_t * info = (const lbm_lbmr_topic_query_tap_info_t *) data;
|
||||
int receiver_node;
|
||||
|
@ -2950,7 +2950,7 @@ static int lbmr_topic_queries_receiver_stats_tree_packet(stats_tree * tree, pack
|
|||
tick_stat_node(tree, lbmr_stat_tree_name_topic_queries_receiver, 0, FALSE);
|
||||
receiver_node = tick_stat_node(tree, address_to_str(wmem_packet_scope(), &pinfo->net_src), lbmr_stats_tree_handle_topic_queries_receiver, TRUE);
|
||||
tick_stat_node(tree, info->topic, receiver_node, TRUE);
|
||||
return (1);
|
||||
return (TAP_PACKET_REDRAW);
|
||||
}
|
||||
|
||||
/*----------------------------------------------------------------------------*/
|
||||
|
@ -2964,7 +2964,7 @@ static void lbmr_topic_queries_pattern_stats_tree_init(stats_tree * tree)
|
|||
lbmr_stats_tree_handle_topic_queries_pattern = stats_tree_create_node(tree, lbmr_stat_tree_name_topic_queries_pattern, 0, STAT_DT_INT, TRUE);
|
||||
}
|
||||
|
||||
static int lbmr_topic_queries_pattern_stats_tree_packet(stats_tree * tree, packet_info * pinfo, epan_dissect_t * edt _U_, const void * data)
|
||||
static tap_packet_status lbmr_topic_queries_pattern_stats_tree_packet(stats_tree * tree, packet_info * pinfo, epan_dissect_t * edt _U_, const void * data)
|
||||
{
|
||||
const lbm_lbmr_pattern_query_tap_info_t * info = (const lbm_lbmr_pattern_query_tap_info_t *) data;
|
||||
int pattern_node;
|
||||
|
@ -2976,7 +2976,7 @@ static int lbmr_topic_queries_pattern_stats_tree_packet(stats_tree * tree, packe
|
|||
val_to_str(info->type, lbm_wildcard_pattern_type_short, "UNKN[0x%02x]"));
|
||||
pattern_node = tick_stat_node(tree, pattern_str, lbmr_stats_tree_handle_topic_queries_pattern, TRUE);
|
||||
tick_stat_node(tree, address_to_str(wmem_packet_scope(), &pinfo->net_src), pattern_node, TRUE);
|
||||
return (1);
|
||||
return (TAP_PACKET_REDRAW);
|
||||
}
|
||||
|
||||
/*----------------------------------------------------------------------------*/
|
||||
|
@ -2990,7 +2990,7 @@ static void lbmr_topic_queries_pattern_receiver_stats_tree_init(stats_tree * tre
|
|||
lbmr_stats_tree_handle_topic_queries_pattern_receiver = stats_tree_create_node(tree, lbmr_stat_tree_name_topic_queries_pattern_receiver, 0, STAT_DT_INT, TRUE);
|
||||
}
|
||||
|
||||
static int lbmr_topic_queries_pattern_receiver_stats_tree_packet(stats_tree * tree, packet_info * pinfo, epan_dissect_t * edt _U_, const void * data)
|
||||
static tap_packet_status lbmr_topic_queries_pattern_receiver_stats_tree_packet(stats_tree * tree, packet_info * pinfo, epan_dissect_t * edt _U_, const void * data)
|
||||
{
|
||||
const lbm_lbmr_pattern_query_tap_info_t * info = (const lbm_lbmr_pattern_query_tap_info_t *) data;
|
||||
int receiver_node;
|
||||
|
@ -3002,7 +3002,7 @@ static int lbmr_topic_queries_pattern_receiver_stats_tree_packet(stats_tree * tr
|
|||
info->pattern,
|
||||
val_to_str(info->type, lbm_wildcard_pattern_type_short, "UNKN[0x%02x]"));
|
||||
tick_stat_node(tree, pattern_str, receiver_node, TRUE);
|
||||
return (1);
|
||||
return (TAP_PACKET_REDRAW);
|
||||
}
|
||||
|
||||
/*----------------------------------------------------------------------------*/
|
||||
|
@ -3016,7 +3016,7 @@ static void lbmr_queue_ads_queue_stats_tree_init(stats_tree * tree)
|
|||
lbmr_stats_tree_handle_queue_ads_queue = stats_tree_create_node(tree, lbmr_stat_tree_name_queue_ads_queue, 0, STAT_DT_INT, TRUE);
|
||||
}
|
||||
|
||||
static int lbmr_queue_ads_queue_stats_tree_packet(stats_tree * tree, packet_info * pinfo, epan_dissect_t * edt _U_, const void * data)
|
||||
static tap_packet_status lbmr_queue_ads_queue_stats_tree_packet(stats_tree * tree, packet_info * pinfo, epan_dissect_t * edt _U_, const void * data)
|
||||
{
|
||||
const lbm_lbmr_queue_advertisement_tap_info_t * info = (const lbm_lbmr_queue_advertisement_tap_info_t *) data;
|
||||
int queue_node;
|
||||
|
@ -3026,7 +3026,7 @@ static int lbmr_queue_ads_queue_stats_tree_packet(stats_tree * tree, packet_info
|
|||
queue_node = tick_stat_node(tree, info->queue, lbmr_stats_tree_handle_queue_ads_queue, TRUE);
|
||||
str = wmem_strdup_printf(wmem_packet_scope(), "%s:%" G_GUINT16_FORMAT, address_to_str(wmem_packet_scope(), &pinfo->net_src), info->port);
|
||||
tick_stat_node(tree, str, queue_node, TRUE);
|
||||
return (1);
|
||||
return (TAP_PACKET_REDRAW);
|
||||
}
|
||||
|
||||
/*----------------------------------------------------------------------------*/
|
||||
|
@ -3040,7 +3040,7 @@ static void lbmr_queue_ads_source_stats_tree_init(stats_tree * tree)
|
|||
lbmr_stats_tree_handle_queue_ads_source = stats_tree_create_node(tree, lbmr_stat_tree_name_queue_ads_source, 0, STAT_DT_INT, TRUE);
|
||||
}
|
||||
|
||||
static int lbmr_queue_ads_source_stats_tree_packet(stats_tree * tree, packet_info * pinfo, epan_dissect_t * edt _U_, const void * data)
|
||||
static tap_packet_status lbmr_queue_ads_source_stats_tree_packet(stats_tree * tree, packet_info * pinfo, epan_dissect_t * edt _U_, const void * data)
|
||||
{
|
||||
const lbm_lbmr_queue_advertisement_tap_info_t * info = (const lbm_lbmr_queue_advertisement_tap_info_t *) data;
|
||||
int source_node;
|
||||
|
@ -3050,7 +3050,7 @@ static int lbmr_queue_ads_source_stats_tree_packet(stats_tree * tree, packet_inf
|
|||
source_node = tick_stat_node(tree, address_to_str(wmem_packet_scope(), &pinfo->net_src), lbmr_stats_tree_handle_queue_ads_source, TRUE);
|
||||
str = wmem_strdup_printf(wmem_packet_scope(), "%s:%" G_GUINT16_FORMAT, info->queue, info->port);
|
||||
tick_stat_node(tree, str, source_node, TRUE);
|
||||
return (1);
|
||||
return (TAP_PACKET_REDRAW);
|
||||
}
|
||||
|
||||
/*----------------------------------------------------------------------------*/
|
||||
|
@ -3064,7 +3064,7 @@ static void lbmr_queue_queries_queue_stats_tree_init(stats_tree * tree)
|
|||
lbmr_stats_tree_handle_queue_queries_queue = stats_tree_create_node(tree, lbmr_stat_tree_name_queue_queries_queue, 0, STAT_DT_INT, TRUE);
|
||||
}
|
||||
|
||||
static int lbmr_queue_queries_queue_stats_tree_packet(stats_tree * tree, packet_info * pinfo, epan_dissect_t * edt _U_, const void * data)
|
||||
static tap_packet_status lbmr_queue_queries_queue_stats_tree_packet(stats_tree * tree, packet_info * pinfo, epan_dissect_t * edt _U_, const void * data)
|
||||
{
|
||||
const lbm_lbmr_queue_query_tap_info_t * info = (const lbm_lbmr_queue_query_tap_info_t *) data;
|
||||
int queue_node = 0;
|
||||
|
@ -3072,7 +3072,7 @@ static int lbmr_queue_queries_queue_stats_tree_packet(stats_tree * tree, packet_
|
|||
tick_stat_node(tree, lbmr_stat_tree_name_queue_queries_queue, 0, FALSE);
|
||||
queue_node = tick_stat_node(tree, info->queue, lbmr_stats_tree_handle_queue_queries_queue, TRUE);
|
||||
tick_stat_node(tree, address_to_str(wmem_packet_scope(), &pinfo->net_src), queue_node, TRUE);
|
||||
return (1);
|
||||
return (TAP_PACKET_REDRAW);
|
||||
}
|
||||
|
||||
/*----------------------------------------------------------------------------*/
|
||||
|
@ -3086,7 +3086,7 @@ static void lbmr_queue_queries_receiver_stats_tree_init(stats_tree * tree)
|
|||
lbmr_stats_tree_handle_queue_queries_receiver = stats_tree_create_node(tree, lbmr_stat_tree_name_queue_queries_receiver, 0, STAT_DT_INT, TRUE);
|
||||
}
|
||||
|
||||
static int lbmr_queue_queries_receiver_stats_tree_packet(stats_tree * tree, packet_info * pinfo, epan_dissect_t * edt _U_, const void * data)
|
||||
static tap_packet_status lbmr_queue_queries_receiver_stats_tree_packet(stats_tree * tree, packet_info * pinfo, epan_dissect_t * edt _U_, const void * data)
|
||||
{
|
||||
const lbm_lbmr_queue_query_tap_info_t * info = (const lbm_lbmr_queue_query_tap_info_t *) data;
|
||||
int receiver_node;
|
||||
|
@ -3094,7 +3094,7 @@ static int lbmr_queue_queries_receiver_stats_tree_packet(stats_tree * tree, pack
|
|||
tick_stat_node(tree, lbmr_stat_tree_name_queue_queries_receiver, 0, FALSE);
|
||||
receiver_node = tick_stat_node(tree, address_to_str(wmem_packet_scope(), &pinfo->net_src), lbmr_stats_tree_handle_queue_queries_receiver, TRUE);
|
||||
tick_stat_node(tree, info->queue, receiver_node, TRUE);
|
||||
return (1);
|
||||
return (TAP_PACKET_REDRAW);
|
||||
}
|
||||
|
||||
/*----------------------------------------------------------------------------*/
|
||||
|
|
|
@ -516,7 +516,7 @@ ldapstat_init(struct register_srt* srt _U_, GArray* srt_array)
|
|||
}
|
||||
}
|
||||
|
||||
static int
|
||||
static tap_packet_status
|
||||
ldapstat_packet(void *pldap, packet_info *pinfo, epan_dissect_t *edt _U_, const void *psi)
|
||||
{
|
||||
guint i = 0;
|
||||
|
@ -526,11 +526,11 @@ ldapstat_packet(void *pldap, packet_info *pinfo, epan_dissect_t *edt _U_, const
|
|||
|
||||
/* we are only interested in reply packets */
|
||||
if(ldap->is_request){
|
||||
return 0;
|
||||
return TAP_PACKET_DONT_REDRAW;
|
||||
}
|
||||
/* if we havnt seen the request, just ignore it */
|
||||
if(!ldap->req_frame){
|
||||
return 0;
|
||||
return TAP_PACKET_DONT_REDRAW;
|
||||
}
|
||||
|
||||
/* only use the commands we know how to handle */
|
||||
|
@ -545,13 +545,13 @@ ldapstat_packet(void *pldap, packet_info *pinfo, epan_dissect_t *edt _U_, const
|
|||
case LDAP_REQ_EXTENDED:
|
||||
break;
|
||||
default:
|
||||
return 0;
|
||||
return TAP_PACKET_DONT_REDRAW;
|
||||
}
|
||||
|
||||
ldap_srt_table = g_array_index(data->srt_array, srt_stat_table*, i);
|
||||
|
||||
add_srt_table_data(ldap_srt_table, ldap->protocolOpTag, &ldap->req_time, pinfo);
|
||||
return 1;
|
||||
return TAP_PACKET_REDRAW;
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
@ -329,14 +329,14 @@ megacostat_filtercheck(const char *opt_arg _U_, const char **filter _U_, char**
|
|||
}
|
||||
}
|
||||
|
||||
static int
|
||||
static tap_packet_status
|
||||
megacostat_packet(void *pms, packet_info *pinfo, epan_dissect_t *edt _U_, const void *pmi)
|
||||
{
|
||||
rtd_data_t* rtd_data = (rtd_data_t*)pms;
|
||||
rtd_stat_table* ms = &rtd_data->stat_table;
|
||||
const gcp_cmd_t *mi=(const gcp_cmd_t*)pmi;
|
||||
nstime_t delta;
|
||||
int ret = 0;
|
||||
tap_packet_status ret = TAP_PACKET_DONT_REDRAW;
|
||||
|
||||
switch (mi->type) {
|
||||
|
||||
|
@ -344,7 +344,7 @@ megacostat_packet(void *pms, packet_info *pinfo, epan_dissect_t *edt _U_, const
|
|||
if(!mi->trx->initial) {
|
||||
/* Track Context is probably disabled, we cannot
|
||||
* measure service response time */
|
||||
return 0;
|
||||
return TAP_PACKET_DONT_REDRAW;
|
||||
}
|
||||
|
||||
else if(mi->trx->initial->framenum != mi->msg->framenum){
|
||||
|
@ -407,7 +407,7 @@ megacostat_packet(void *pms, packet_info *pinfo, epan_dissect_t *edt _U_, const
|
|||
}
|
||||
|
||||
time_stat_update(&(ms->time_stats[0].rtd[10]),&delta, pinfo);
|
||||
ret = 1;
|
||||
ret = TAP_PACKET_REDRAW;
|
||||
}
|
||||
break;
|
||||
|
||||
|
|
|
@ -321,14 +321,14 @@ static const value_string mgcp_mesage_type[] = {
|
|||
{ 0, NULL}
|
||||
};
|
||||
|
||||
static int
|
||||
static tap_packet_status
|
||||
mgcpstat_packet(void *pms, packet_info *pinfo, epan_dissect_t *edt _U_, const void *pmi)
|
||||
{
|
||||
rtd_data_t* rtd_data = (rtd_data_t*)pms;
|
||||
rtd_stat_table* ms = &rtd_data->stat_table;
|
||||
const mgcp_info_t *mi = (const mgcp_info_t *)pmi;
|
||||
nstime_t delta;
|
||||
int ret = 0;
|
||||
tap_packet_status ret = TAP_PACKET_DONT_REDRAW;
|
||||
|
||||
switch (mi->mgcp_type) {
|
||||
|
||||
|
@ -389,7 +389,7 @@ mgcpstat_packet(void *pms, packet_info *pinfo, epan_dissect_t *edt _U_, const vo
|
|||
time_stat_update(&(ms->time_stats[0].rtd[10]), &delta, pinfo);
|
||||
}
|
||||
|
||||
ret = 1;
|
||||
ret = TAP_PACKET_REDRAW;
|
||||
}
|
||||
break;
|
||||
|
||||
|
|
|
@ -833,7 +833,7 @@ static void mtp3_stat_init(stat_tap_table_ui* new_stat)
|
|||
stat_tap_add_table(new_stat, table);
|
||||
}
|
||||
|
||||
static gboolean
|
||||
static tap_packet_status
|
||||
mtp3_stat_packet(void *tapdata, packet_info *pinfo _U_, epan_dissect_t *edt _U_, const void *m3tr_ptr)
|
||||
{
|
||||
stat_data_t* stat_data = (stat_data_t*)tapdata;
|
||||
|
@ -852,7 +852,7 @@ mtp3_stat_packet(void *tapdata, packet_info *pinfo _U_, epan_dissect_t *edt _U_,
|
|||
* we thought this si_code was not used ?
|
||||
* is MTP3_NUM_SI_CODE out of date ?
|
||||
*/
|
||||
return(FALSE);
|
||||
return TAP_PACKET_DONT_REDRAW;
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -941,7 +941,7 @@ mtp3_stat_packet(void *tapdata, packet_info *pinfo _U_, epan_dissect_t *edt _U_,
|
|||
item_data->value.float_value = avg_bytes;
|
||||
stat_tap_set_field_data(table, element, AVG_BYTES_COLUMN, item_data);
|
||||
|
||||
return TRUE;
|
||||
return TAP_PACKET_REDRAW;
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
|
@ -439,7 +439,7 @@ ncpstat_init(struct register_srt* srt _U_, GArray* srt_array)
|
|||
init_srt_table("Subfunctions for NCP 131", "131", srt_array, NCP_NUM_PROCEDURES, NULL, "ncp.func==131 && ncp.subfunc", NULL);
|
||||
}
|
||||
|
||||
static int
|
||||
static tap_packet_status
|
||||
ncpstat_packet(void *pss, packet_info *pinfo, epan_dissect_t *edt _U_, const void *prv)
|
||||
{
|
||||
guint i = 0;
|
||||
|
@ -450,7 +450,7 @@ ncpstat_packet(void *pss, packet_info *pinfo, epan_dissect_t *edt _U_, const voi
|
|||
|
||||
/* if we haven't seen the request, just ignore it */
|
||||
if(!request_val || request_val->ncp_rec==0){
|
||||
return 0;
|
||||
return TAP_PACKET_DONT_REDRAW;
|
||||
}
|
||||
|
||||
/* By Group */
|
||||
|
@ -609,7 +609,7 @@ ncpstat_packet(void *pss, packet_info *pinfo, epan_dissect_t *edt _U_, const voi
|
|||
add_srt_table_data(ncp_srt_table, (request_val->req_nds_flags), &request_val->req_frame_time, pinfo);
|
||||
wmem_free(NULL, tmp_str);
|
||||
}
|
||||
return 1;
|
||||
return TAP_PACKET_REDRAW;
|
||||
}
|
||||
|
||||
|
||||
|
@ -717,7 +717,7 @@ static const char* ncp_conv_get_filter_type(conv_item_t* conv _U_, conv_filter_t
|
|||
|
||||
static ct_dissector_info_t ncp_ct_dissector_info = {&ncp_conv_get_filter_type};
|
||||
|
||||
static int
|
||||
static tap_packet_status
|
||||
ncp_conversation_packet(void *pct, packet_info *pinfo, epan_dissect_t *edt _U_, const void *vip)
|
||||
{
|
||||
conv_hash_t *hash = (conv_hash_t*) pct;
|
||||
|
@ -729,7 +729,7 @@ ncp_conversation_packet(void *pct, packet_info *pinfo, epan_dissect_t *edt _U_,
|
|||
add_conversation_table_data(hash, &pinfo->src, &pinfo->dst, connection, connection, 1, pinfo->fd->pkt_len, &pinfo->rel_ts, &pinfo->abs_ts, &ncp_ct_dissector_info, ENDPOINT_NCP);
|
||||
}
|
||||
|
||||
return 1;
|
||||
return TAP_PACKET_REDRAW;
|
||||
}
|
||||
|
||||
static const char* ncp_host_get_filter_type(hostlist_talker_t* host _U_, conv_filter_type_e filter)
|
||||
|
@ -739,7 +739,7 @@ static const char* ncp_host_get_filter_type(hostlist_talker_t* host _U_, conv_fi
|
|||
|
||||
static hostlist_dissector_info_t ncp_host_dissector_info = {&ncp_host_get_filter_type};
|
||||
|
||||
static int
|
||||
static tap_packet_status
|
||||
ncp_hostlist_packet(void *pit, packet_info *pinfo, epan_dissect_t *edt _U_, const void *vip _U_)
|
||||
{
|
||||
conv_hash_t *hash = (conv_hash_t*) pit;
|
||||
|
@ -751,7 +751,7 @@ ncp_hostlist_packet(void *pit, packet_info *pinfo, epan_dissect_t *edt _U_, cons
|
|||
add_hostlist_table_data(hash, &pinfo->src, 0, TRUE, 1, pinfo->fd->pkt_len, &ncp_host_dissector_info, ENDPOINT_NCP);
|
||||
add_hostlist_table_data(hash, &pinfo->dst, 0, FALSE, 1, pinfo->fd->pkt_len, &ncp_host_dissector_info, ENDPOINT_NCP);
|
||||
|
||||
return 1;
|
||||
return TAP_PACKET_REDRAW;
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
@ -305,7 +305,7 @@ static const value_string radius_message_code[] = {
|
|||
{ 0, NULL}
|
||||
};
|
||||
|
||||
static int
|
||||
static tap_packet_status
|
||||
radiusstat_packet(void *prs, packet_info *pinfo, epan_dissect_t *edt _U_, const void *pri)
|
||||
{
|
||||
rtd_data_t *rtd_data = (rtd_data_t *)prs;
|
||||
|
@ -313,7 +313,7 @@ radiusstat_packet(void *prs, packet_info *pinfo, epan_dissect_t *edt _U_, const
|
|||
const radius_info_t *ri = (const radius_info_t *)pri;
|
||||
nstime_t delta;
|
||||
radius_category radius_cat = RADIUS_CAT_OTHERS;
|
||||
int ret = 0;
|
||||
tap_packet_status ret = TAP_PACKET_DONT_REDRAW;
|
||||
|
||||
switch (ri->code) {
|
||||
case RADIUS_PKT_TYPE_ACCESS_REQUEST:
|
||||
|
@ -403,7 +403,7 @@ radiusstat_packet(void *prs, packet_info *pinfo, epan_dissect_t *edt _U_, const
|
|||
time_stat_update(&(rs->time_stats[RADIUS_CAT_OVERALL].rtd[0]),&delta, pinfo);
|
||||
time_stat_update(&(rs->time_stats[radius_cat].rtd[0]),&delta, pinfo);
|
||||
|
||||
ret = 1;
|
||||
ret = TAP_PACKET_REDRAW;
|
||||
}
|
||||
break;
|
||||
|
||||
|
|
|
@ -365,7 +365,7 @@ rpcstat_init(struct register_srt* srt, GArray* srt_array)
|
|||
}
|
||||
}
|
||||
|
||||
static int
|
||||
static tap_packet_status
|
||||
rpcstat_packet(void *pss, packet_info *pinfo, epan_dissect_t *edt _U_, const void *prv)
|
||||
{
|
||||
guint i = 0;
|
||||
|
@ -379,19 +379,19 @@ rpcstat_packet(void *pss, packet_info *pinfo, epan_dissect_t *edt _U_, const voi
|
|||
|
||||
if ((int)ri->proc >= rpc_srt_table->num_procs) {
|
||||
/* don't handle this since its outside of known table */
|
||||
return 0;
|
||||
return TAP_PACKET_DONT_REDRAW;
|
||||
}
|
||||
/* we are only interested in reply packets */
|
||||
if (ri->request) {
|
||||
return 0;
|
||||
return TAP_PACKET_DONT_REDRAW;
|
||||
}
|
||||
/* we are only interested in certain program/versions */
|
||||
if ( (ri->prog != tap_data->program) || (ri->vers != tap_data->version) ) {
|
||||
return 0;
|
||||
return TAP_PACKET_DONT_REDRAW;
|
||||
}
|
||||
|
||||
add_srt_table_data(rpc_srt_table, ri->proc, &ri->req_time, pinfo);
|
||||
return 1;
|
||||
return TAP_PACKET_REDRAW;
|
||||
|
||||
}
|
||||
|
||||
|
@ -3922,7 +3922,7 @@ static void rpc_prog_stat_init(stat_tap_table_ui* new_stat)
|
|||
|
||||
}
|
||||
|
||||
static gboolean
|
||||
static tap_packet_status
|
||||
rpc_prog_stat_packet(void *tapdata, packet_info *pinfo _U_, epan_dissect_t *edt _U_, const void *rciv_ptr)
|
||||
{
|
||||
stat_data_t* stat_data = (stat_data_t*)tapdata;
|
||||
|
@ -3971,7 +3971,7 @@ rpc_prog_stat_packet(void *tapdata, packet_info *pinfo _U_, epan_dissect_t *edt
|
|||
|
||||
/* we are only interested in reply packets */
|
||||
if (ri->request) {
|
||||
return FALSE;
|
||||
return TAP_PACKET_DONT_REDRAW;
|
||||
}
|
||||
|
||||
item_data = stat_tap_get_field_data(table, element, CALLS_COLUMN);
|
||||
|
@ -4000,7 +4000,7 @@ rpc_prog_stat_packet(void *tapdata, packet_info *pinfo _U_, epan_dissect_t *edt
|
|||
item_data->value.float_value = item_data->user_data.float_value / call_count;
|
||||
stat_tap_set_field_data(table, element, AVG_SRT_COLUMN, item_data);
|
||||
|
||||
return TRUE;
|
||||
return TAP_PACKET_REDRAW;
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
|
@ -2111,7 +2111,7 @@ static const char* rsvp_conv_get_filter_type(conv_item_t* conv, conv_filter_type
|
|||
|
||||
static ct_dissector_info_t rsvp_ct_dissector_info = {&rsvp_conv_get_filter_type};
|
||||
|
||||
static int
|
||||
static tap_packet_status
|
||||
rsvp_conversation_packet(void *pct, packet_info *pinfo, epan_dissect_t *edt _U_, const void *vip)
|
||||
{
|
||||
conv_hash_t *hash = (conv_hash_t*) pct;
|
||||
|
@ -2120,7 +2120,7 @@ rsvp_conversation_packet(void *pct, packet_info *pinfo, epan_dissect_t *edt _U_,
|
|||
add_conversation_table_data(hash, &rsvph->source, &rsvph->destination,
|
||||
0, 0, 1, pinfo->fd->pkt_len, &pinfo->rel_ts, &pinfo->abs_ts, &rsvp_ct_dissector_info, ENDPOINT_NONE);
|
||||
|
||||
return 1;
|
||||
return TAP_PACKET_REDRAW;
|
||||
}
|
||||
|
||||
static const char* rsvp_host_get_filter_type(hostlist_talker_t* host, conv_filter_type_e filter)
|
||||
|
@ -2133,7 +2133,7 @@ static const char* rsvp_host_get_filter_type(hostlist_talker_t* host, conv_filte
|
|||
|
||||
static hostlist_dissector_info_t rsvp_host_dissector_info = {&rsvp_host_get_filter_type};
|
||||
|
||||
static int
|
||||
static tap_packet_status
|
||||
rsvp_hostlist_packet(void *pit, packet_info *pinfo, epan_dissect_t *edt _U_, const void *vip)
|
||||
{
|
||||
conv_hash_t *hash = (conv_hash_t*) pit;
|
||||
|
@ -2146,7 +2146,7 @@ rsvp_hostlist_packet(void *pit, packet_info *pinfo, epan_dissect_t *edt _U_, con
|
|||
*/
|
||||
add_hostlist_table_data(hash, &rsvph->source, 0, TRUE, 1, pinfo->fd->pkt_len, &rsvp_host_dissector_info, ENDPOINT_NONE);
|
||||
add_hostlist_table_data(hash, &rsvph->destination, 0, FALSE, 1, pinfo->fd->pkt_len, &rsvp_host_dissector_info, ENDPOINT_NONE);
|
||||
return 1;
|
||||
return TAP_PACKET_REDRAW;
|
||||
}
|
||||
|
||||
static inline int
|
||||
|
|
|
@ -181,7 +181,7 @@ rtsp_stats_tree_init(stats_tree* st)
|
|||
}
|
||||
|
||||
/* RTSP/Packet Counter stats packet function */
|
||||
static int
|
||||
static tap_packet_status
|
||||
rtsp_stats_tree_packet(stats_tree* st, packet_info* pinfo _U_, epan_dissect_t* edt _U_, const void* p)
|
||||
{
|
||||
const rtsp_info_value_t *v = (const rtsp_info_value_t *)p;
|
||||
|
@ -225,7 +225,7 @@ rtsp_stats_tree_packet(stats_tree* st, packet_info* pinfo _U_, epan_dissect_t* e
|
|||
tick_stat_node(st, st_str_other, st_node_packets, FALSE);
|
||||
}
|
||||
|
||||
return 1;
|
||||
return TAP_PACKET_REDRAW;
|
||||
}
|
||||
void proto_reg_handoff_rtsp(void);
|
||||
|
||||
|
|
|
@ -615,7 +615,7 @@ dissect_sametime_content(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, vo
|
|||
/*
|
||||
tick statistics
|
||||
*/
|
||||
static int
|
||||
static tap_packet_status
|
||||
sametime_stats_tree_packet(stats_tree* st, packet_info* pinfo _U_, epan_dissect_t* edt _U_, const void* p)
|
||||
{
|
||||
const struct SametimeTap *pi = (const struct SametimeTap *)p;
|
||||
|
@ -630,7 +630,7 @@ sametime_stats_tree_packet(stats_tree* st, packet_info* pinfo _U_, epan_dissect_
|
|||
if (pi->user_status != -1)
|
||||
stats_tree_tick_pivot(st, st_node_user_status, val_to_str(pi->user_status, userstatusnames, "Unknown (0x%04x)"));
|
||||
|
||||
return 1;
|
||||
return TAP_PACKET_REDRAW;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -964,7 +964,7 @@ scsistat_init(struct register_srt* srt, GArray* srt_array)
|
|||
}
|
||||
}
|
||||
|
||||
static int
|
||||
static tap_packet_status
|
||||
scsistat_packet(void *pss, packet_info *pinfo, epan_dissect_t *edt _U_, const void *prv)
|
||||
{
|
||||
guint i = 0;
|
||||
|
@ -978,19 +978,19 @@ scsistat_packet(void *pss, packet_info *pinfo, epan_dissect_t *edt _U_, const vo
|
|||
|
||||
/* we are only interested in response packets */
|
||||
if (ri->type != SCSI_PDU_TYPE_RSP) {
|
||||
return 0;
|
||||
return TAP_PACKET_DONT_REDRAW;
|
||||
}
|
||||
/* we are only interested in a specific commandset */
|
||||
if ( (!ri->itl) || ((ri->itl->cmdset&SCSI_CMDSET_MASK) != tap_data->cmdset) ) {
|
||||
return 0;
|
||||
return TAP_PACKET_DONT_REDRAW;
|
||||
}
|
||||
/* check that the opcode looks sane */
|
||||
if ( (!ri->itlq) || (ri->itlq->scsi_opcode > 255) ) {
|
||||
return 0;
|
||||
return TAP_PACKET_DONT_REDRAW;
|
||||
}
|
||||
|
||||
add_srt_table_data(scsi_srt_table, ri->itlq->scsi_opcode, &ri->itlq->fc_time, pinfo);
|
||||
return 1;
|
||||
return TAP_PACKET_REDRAW;
|
||||
}
|
||||
|
||||
guint
|
||||
|
|
|
@ -843,7 +843,7 @@ static const char* sctp_conv_get_filter_type(conv_item_t* conv, conv_filter_type
|
|||
|
||||
static ct_dissector_info_t sctp_ct_dissector_info = {&sctp_conv_get_filter_type};
|
||||
|
||||
static int
|
||||
static tap_packet_status
|
||||
sctp_conversation_packet(void *pct, packet_info *pinfo, epan_dissect_t *edt _U_, const void *vip)
|
||||
{
|
||||
conv_hash_t *hash = (conv_hash_t*) pct;
|
||||
|
@ -853,7 +853,7 @@ sctp_conversation_packet(void *pct, packet_info *pinfo, epan_dissect_t *edt _U_,
|
|||
sctphdr->sport, sctphdr->dport, 1, pinfo->fd->pkt_len, &pinfo->rel_ts, &pinfo->abs_ts, &sctp_ct_dissector_info, ENDPOINT_SCTP);
|
||||
|
||||
|
||||
return 1;
|
||||
return TAP_PACKET_REDRAW;
|
||||
}
|
||||
|
||||
static const char* sctp_host_get_filter_type(hostlist_talker_t* host, conv_filter_type_e filter)
|
||||
|
@ -897,7 +897,7 @@ static const char* sctp_host_get_filter_type(hostlist_talker_t* host, conv_filte
|
|||
|
||||
static hostlist_dissector_info_t sctp_host_dissector_info = {&sctp_host_get_filter_type};
|
||||
|
||||
static int
|
||||
static tap_packet_status
|
||||
sctp_hostlist_packet(void *pit, packet_info *pinfo, epan_dissect_t *edt _U_, const void *vip)
|
||||
{
|
||||
conv_hash_t *hash = (conv_hash_t*) pit;
|
||||
|
@ -909,7 +909,7 @@ sctp_hostlist_packet(void *pit, packet_info *pinfo, epan_dissect_t *edt _U_, con
|
|||
add_hostlist_table_data(hash, &sctphdr->ip_src, sctphdr->sport, TRUE, 1, pinfo->fd->pkt_len, &sctp_host_dissector_info, ENDPOINT_SCTP);
|
||||
add_hostlist_table_data(hash, &sctphdr->ip_dst, sctphdr->dport, FALSE, 1, pinfo->fd->pkt_len, &sctp_host_dissector_info, ENDPOINT_SCTP);
|
||||
|
||||
return 1;
|
||||
return TAP_PACKET_REDRAW;
|
||||
}
|
||||
|
||||
static unsigned int
|
||||
|
|
|
@ -5774,7 +5774,7 @@ static void sip_stat_init(stat_tap_table_ui* new_stat)
|
|||
}
|
||||
}
|
||||
|
||||
static gboolean
|
||||
static tap_packet_status
|
||||
sip_stat_packet(void *tapdata, packet_info *pinfo _U_, epan_dissect_t *edt _U_, const void *siv_ptr)
|
||||
{
|
||||
stat_data_t* stat_data = (stat_data_t*) tapdata;
|
||||
|
@ -5820,7 +5820,7 @@ sip_stat_packet(void *tapdata, packet_info *pinfo _U_, epan_dissect_t *edt _U_,
|
|||
}
|
||||
|
||||
} else {
|
||||
return FALSE;
|
||||
return TAP_PACKET_DONT_REDRAW;
|
||||
}
|
||||
|
||||
if (cur_table) {
|
||||
|
@ -5867,7 +5867,7 @@ sip_stat_packet(void *tapdata, packet_info *pinfo _U_, epan_dissect_t *edt _U_,
|
|||
}
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
return TAP_PACKET_REDRAW;
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
|
@ -175,7 +175,7 @@ static const char* sll_conv_get_filter_type(conv_item_t* conv, conv_filter_type_
|
|||
static ct_dissector_info_t sll_ct_dissector_info = {&sll_conv_get_filter_type};
|
||||
static address no_dst = {AT_NONE, 0, NULL, NULL};
|
||||
|
||||
static int
|
||||
static tap_packet_status
|
||||
sll_conversation_packet(void *pct, packet_info *pinfo, epan_dissect_t *edt _U_, const void *vip)
|
||||
{
|
||||
conv_hash_t *hash = (conv_hash_t*) pct;
|
||||
|
@ -183,7 +183,7 @@ sll_conversation_packet(void *pct, packet_info *pinfo, epan_dissect_t *edt _U_,
|
|||
|
||||
add_conversation_table_data(hash, &tap_data->src_address, &no_dst, 0, 0, 1, pinfo->fd->pkt_len, &pinfo->rel_ts, &pinfo->abs_ts, &sll_ct_dissector_info, ENDPOINT_NONE);
|
||||
|
||||
return 1;
|
||||
return TAP_PACKET_REDRAW;
|
||||
}
|
||||
|
||||
static const char* sll_host_get_filter_type(hostlist_talker_t* host, conv_filter_type_e filter)
|
||||
|
@ -205,7 +205,7 @@ static const char* sll_host_get_filter_type(hostlist_talker_t* host, conv_filter
|
|||
|
||||
static hostlist_dissector_info_t sll_host_dissector_info = {&sll_host_get_filter_type};
|
||||
|
||||
static int
|
||||
static tap_packet_status
|
||||
sll_hostlist_packet(void *pit, packet_info *pinfo, epan_dissect_t *edt _U_, const void *vip)
|
||||
{
|
||||
conv_hash_t *hash = (conv_hash_t*) pit;
|
||||
|
@ -213,7 +213,7 @@ sll_hostlist_packet(void *pit, packet_info *pinfo, epan_dissect_t *edt _U_, cons
|
|||
|
||||
add_hostlist_table_data(hash, &tap_data->src_address, 0, TRUE, 1, pinfo->fd->pkt_len, &sll_host_dissector_info, ENDPOINT_NONE);
|
||||
|
||||
return 1;
|
||||
return TAP_PACKET_REDRAW;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
|
|
|
@ -67,7 +67,7 @@ add_sid_name_mapping(const char *sid, const char *name)
|
|||
* QueryDispInfo :
|
||||
* level 1 : user displayinfo 1
|
||||
*/
|
||||
static int
|
||||
static tap_packet_status
|
||||
samr_query_dispinfo(void *dummy _U_, packet_info *pinfo, epan_dissect_t *edt, const void *pri)
|
||||
{
|
||||
const dcerpc_info *ri=(const dcerpc_info *)pri;
|
||||
|
@ -88,25 +88,25 @@ samr_query_dispinfo(void *dummy _U_, packet_info *pinfo, epan_dissect_t *edt, co
|
|||
|
||||
gp=proto_get_finfo_ptr_array(edt->tree, hf_samr_level);
|
||||
if(!gp || gp->len!=1){
|
||||
return 0;
|
||||
return TAP_PACKET_DONT_REDRAW;
|
||||
}
|
||||
fi=(field_info *)gp->pdata[0];
|
||||
info_level=fi->value.value.sinteger;
|
||||
|
||||
if(info_level!=1){
|
||||
return 0;
|
||||
return TAP_PACKET_DONT_REDRAW;
|
||||
}
|
||||
|
||||
if(!ri){
|
||||
return 0;
|
||||
return TAP_PACKET_DONT_REDRAW;
|
||||
}
|
||||
if(!ri->call_data){
|
||||
return 0;
|
||||
return TAP_PACKET_DONT_REDRAW;
|
||||
}
|
||||
if(ri->ptype == PDU_REQ){
|
||||
gp=proto_get_finfo_ptr_array(edt->tree, hf_samr_hnd);
|
||||
if(!gp || gp->len!=1){
|
||||
return 0;
|
||||
return TAP_PACKET_DONT_REDRAW;
|
||||
}
|
||||
fi=(field_info *)gp->pdata[0];
|
||||
|
||||
|
@ -119,28 +119,28 @@ samr_query_dispinfo(void *dummy _U_, packet_info *pinfo, epan_dissect_t *edt, co
|
|||
}
|
||||
g_hash_table_insert(ctx_handle_table, GINT_TO_POINTER(pinfo->num), old_ctx);
|
||||
|
||||
return 0;
|
||||
return TAP_PACKET_DONT_REDRAW;
|
||||
}
|
||||
|
||||
if(!ri->call_data->req_frame){
|
||||
return 0;
|
||||
return TAP_PACKET_DONT_REDRAW;
|
||||
}
|
||||
|
||||
old_ctx=g_hash_table_lookup(ctx_handle_table, GINT_TO_POINTER(ri->call_data->req_frame));
|
||||
if(!old_ctx){
|
||||
return 0;
|
||||
return TAP_PACKET_DONT_REDRAW;
|
||||
}
|
||||
|
||||
if (!dcerpc_fetch_polhnd_data((e_ctx_hnd *)old_ctx, &pol_name, NULL, NULL, NULL, ri->call_data->req_frame)) {
|
||||
return 0;
|
||||
return TAP_PACKET_DONT_REDRAW;
|
||||
}
|
||||
|
||||
if (!pol_name)
|
||||
return 0;
|
||||
return TAP_PACKET_DONT_REDRAW;
|
||||
|
||||
sid=strstr(pol_name,"S-1-5");
|
||||
if(!sid){
|
||||
return 0;
|
||||
return TAP_PACKET_DONT_REDRAW;
|
||||
}
|
||||
|
||||
for(sid_len=4;1;sid_len++){
|
||||
|
@ -155,12 +155,12 @@ samr_query_dispinfo(void *dummy _U_, packet_info *pinfo, epan_dissect_t *edt, co
|
|||
|
||||
gp_rids=proto_get_finfo_ptr_array(edt->tree, hf_samr_rid);
|
||||
if(!gp_rids || gp_rids->len<1){
|
||||
return 0;
|
||||
return TAP_PACKET_DONT_REDRAW;
|
||||
}
|
||||
num_rids=gp_rids->len;
|
||||
gp_names=proto_get_finfo_ptr_array(edt->tree, hf_samr_acct_name);
|
||||
if(!gp_names || gp_names->len<1){
|
||||
return 0;
|
||||
return TAP_PACKET_DONT_REDRAW;
|
||||
}
|
||||
num_names=gp_names->len;
|
||||
|
||||
|
@ -180,7 +180,7 @@ samr_query_dispinfo(void *dummy _U_, packet_info *pinfo, epan_dissect_t *edt, co
|
|||
g_snprintf(sid_name_str+len, 256-len, "%d",fi_rid->value.value.sinteger);
|
||||
add_sid_name_mapping(sid_name_str, fi_name->value.value.string);
|
||||
}
|
||||
return 1;
|
||||
return TAP_PACKET_REDRAW;
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -189,7 +189,7 @@ samr_query_dispinfo(void *dummy _U_, packet_info *pinfo, epan_dissect_t *edt, co
|
|||
* level 5 : ACCOUNT_DOMAIN_INFO lsa.domain_sid -> lsa.domain
|
||||
* level 12 : DNS_DOMAIN_INFO lsa.domain_sid -> lsa.domain
|
||||
*/
|
||||
static int
|
||||
static tap_packet_status
|
||||
lsa_policy_information(void *dummy _U_, packet_info *pinfo _U_, epan_dissect_t *edt, const void *pri _U_)
|
||||
{
|
||||
GPtrArray *gp;
|
||||
|
@ -200,7 +200,7 @@ lsa_policy_information(void *dummy _U_, packet_info *pinfo _U_, epan_dissect_t *
|
|||
|
||||
gp=proto_get_finfo_ptr_array(edt->tree, hf_lsa_info_level);
|
||||
if(!gp || gp->len!=1){
|
||||
return 0;
|
||||
return TAP_PACKET_DONT_REDRAW;
|
||||
}
|
||||
fi=(field_info *)gp->pdata[0];
|
||||
info_level=fi->value.value.sinteger;
|
||||
|
@ -211,14 +211,14 @@ lsa_policy_information(void *dummy _U_, packet_info *pinfo _U_, epan_dissect_t *
|
|||
case 12:
|
||||
gp=proto_get_finfo_ptr_array(edt->tree, hf_lsa_domain);
|
||||
if(!gp || gp->len!=1){
|
||||
return 0;
|
||||
return TAP_PACKET_DONT_REDRAW;
|
||||
}
|
||||
fi=(field_info *)gp->pdata[0];
|
||||
domain=fi->value.value.string;
|
||||
|
||||
gp=proto_get_finfo_ptr_array(edt->tree, hf_nt_domain_sid);
|
||||
if(!gp || gp->len!=1){
|
||||
return 0;
|
||||
return TAP_PACKET_DONT_REDRAW;
|
||||
}
|
||||
fi=(field_info *)gp->pdata[0];
|
||||
sid=fi->value.value.string;
|
||||
|
@ -226,7 +226,7 @@ lsa_policy_information(void *dummy _U_, packet_info *pinfo _U_, epan_dissect_t *
|
|||
add_sid_name_mapping(sid, domain);
|
||||
break;
|
||||
}
|
||||
return 0;
|
||||
return TAP_PACKET_DONT_REDRAW;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -923,7 +923,7 @@ smbstat_init(struct register_srt* srt _U_, GArray* srt_array)
|
|||
}
|
||||
}
|
||||
|
||||
static int
|
||||
static tap_packet_status
|
||||
smbstat_packet(void *pss, packet_info *pinfo, epan_dissect_t *edt _U_, const void *prv)
|
||||
{
|
||||
guint i = 0;
|
||||
|
@ -933,11 +933,11 @@ smbstat_packet(void *pss, packet_info *pinfo, epan_dissect_t *edt _U_, const voi
|
|||
|
||||
/* we are only interested in reply packets */
|
||||
if (si->request) {
|
||||
return 0;
|
||||
return TAP_PACKET_DONT_REDRAW;
|
||||
}
|
||||
/* if we havnt seen the request, just ignore it */
|
||||
if (!si->sip) {
|
||||
return 0;
|
||||
return TAP_PACKET_DONT_REDRAW;
|
||||
}
|
||||
|
||||
if (si->cmd == 0xA0 && si->sip->extra_info_type == SMB_EI_NTI) {
|
||||
|
@ -964,7 +964,7 @@ smbstat_packet(void *pss, packet_info *pinfo, epan_dissect_t *edt _U_, const voi
|
|||
add_srt_table_data(smb_srt_table, si->cmd, &si->sip->req_time, pinfo);
|
||||
}
|
||||
|
||||
return 1;
|
||||
return TAP_PACKET_REDRAW;
|
||||
|
||||
}
|
||||
|
||||
|
@ -1216,7 +1216,7 @@ find_incoming_file(GSList *GSL_active_files_p, active_file *incoming_file)
|
|||
return row;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
static tap_packet_status
|
||||
smb_eo_packet(void *tapdata, packet_info *pinfo, epan_dissect_t *edt _U_, const void *data)
|
||||
{
|
||||
export_object_list_t *object_list = (export_object_list_t *)tapdata;
|
||||
|
@ -1357,7 +1357,7 @@ smb_eo_packet(void *tapdata, packet_info *pinfo, epan_dissect_t *edt _U_, const
|
|||
}
|
||||
}
|
||||
|
||||
return TRUE; /* State changed - window should be redrawn */
|
||||
return TAP_PACKET_REDRAW; /* State changed - window should be redrawn */
|
||||
}
|
||||
|
||||
/* This is the eo_reset_cb function that is used in the export_object module
|
||||
|
|
|
@ -831,7 +831,7 @@ smb2stat_init(struct register_srt* srt _U_, GArray* srt_array)
|
|||
}
|
||||
}
|
||||
|
||||
static int
|
||||
static tap_packet_status
|
||||
smb2stat_packet(void *pss, packet_info *pinfo, epan_dissect_t *edt _U_, const void *prv)
|
||||
{
|
||||
guint i = 0;
|
||||
|
@ -841,16 +841,16 @@ smb2stat_packet(void *pss, packet_info *pinfo, epan_dissect_t *edt _U_, const vo
|
|||
|
||||
/* we are only interested in response packets */
|
||||
if(!(si->flags&SMB2_FLAGS_RESPONSE)){
|
||||
return 0;
|
||||
return TAP_PACKET_DONT_REDRAW;
|
||||
}
|
||||
/* We should not include cancel and oplock break requests either */
|
||||
if (si->opcode == SMB2_COM_CANCEL || si->opcode == SMB2_COM_BREAK) {
|
||||
return 0;
|
||||
return TAP_PACKET_DONT_REDRAW;
|
||||
}
|
||||
|
||||
/* if we haven't seen the request, just ignore it */
|
||||
if(!si->saved){
|
||||
return 0;
|
||||
return TAP_PACKET_DONT_REDRAW;
|
||||
}
|
||||
|
||||
/* SMB2 SRT can be very inaccurate in the presence of retransmissions. Retransmitted responses
|
||||
|
@ -860,11 +860,11 @@ smb2stat_packet(void *pss, packet_info *pinfo, epan_dissect_t *edt _U_, const vo
|
|||
* for the last received response accomplishes this goal without requiring the TCP pref
|
||||
* "Do not call subdissectors for error packets" to be set. */
|
||||
if ((si->saved->frame_req == 0) || (si->saved->frame_res != pinfo->num))
|
||||
return 0;
|
||||
return TAP_PACKET_DONT_REDRAW;
|
||||
|
||||
smb2_srt_table = g_array_index(data->srt_array, srt_stat_table*, i);
|
||||
add_srt_table_data(smb2_srt_table, si->opcode, &si->saved->req_time, pinfo);
|
||||
return 1;
|
||||
return TAP_PACKET_REDRAW;
|
||||
}
|
||||
|
||||
/* Structure for SessionID <=> SessionKey mapping for decryption. */
|
||||
|
|
|
@ -1120,7 +1120,7 @@ smpp_stats_tree_init(stats_tree* st)
|
|||
|
||||
}
|
||||
|
||||
static int
|
||||
static tap_packet_status
|
||||
smpp_stats_tree_per_packet(stats_tree *st, /* st as it was passed to us */
|
||||
packet_info *pinfo _U_,
|
||||
epan_dissect_t *edt _U_,
|
||||
|
@ -1145,7 +1145,7 @@ smpp_stats_tree_per_packet(stats_tree *st, /* st as it was passed to us */
|
|||
tick_stat_node(st, val_to_str(tap_rec->command_id, vals_command_id, "Unknown 0x%08x"), st_smpp_req, FALSE);
|
||||
}
|
||||
|
||||
return 1;
|
||||
return TAP_PACKET_REDRAW;
|
||||
}
|
||||
|
||||
/*!
|
||||
|
|
|
@ -745,7 +745,7 @@ static const char* tcp_conv_get_filter_type(conv_item_t* conv, conv_filter_type_
|
|||
|
||||
static ct_dissector_info_t tcp_ct_dissector_info = {&tcp_conv_get_filter_type};
|
||||
|
||||
static int
|
||||
static tap_packet_status
|
||||
tcpip_conversation_packet(void *pct, packet_info *pinfo, epan_dissect_t *edt _U_, const void *vip)
|
||||
{
|
||||
conv_hash_t *hash = (conv_hash_t*) pct;
|
||||
|
@ -754,10 +754,10 @@ tcpip_conversation_packet(void *pct, packet_info *pinfo, epan_dissect_t *edt _U_
|
|||
add_conversation_table_data_with_conv_id(hash, &tcphdr->ip_src, &tcphdr->ip_dst, tcphdr->th_sport, tcphdr->th_dport, (conv_id_t) tcphdr->th_stream, 1, pinfo->fd->pkt_len,
|
||||
&pinfo->rel_ts, &pinfo->abs_ts, &tcp_ct_dissector_info, ENDPOINT_TCP);
|
||||
|
||||
return 1;
|
||||
return TAP_PACKET_REDRAW;
|
||||
}
|
||||
|
||||
static int
|
||||
static tap_packet_status
|
||||
mptcpip_conversation_packet(void *pct, packet_info *pinfo, epan_dissect_t *edt _U_, const void *vip)
|
||||
{
|
||||
conv_hash_t *hash = (conv_hash_t*) pct;
|
||||
|
@ -768,7 +768,7 @@ mptcpip_conversation_packet(void *pct, packet_info *pinfo, epan_dissect_t *edt _
|
|||
meta->sport, meta->dport, (conv_id_t) tcpd->mptcp_analysis->stream, 1, pinfo->fd->pkt_len,
|
||||
&pinfo->rel_ts, &pinfo->abs_ts, &tcp_ct_dissector_info, ENDPOINT_TCP);
|
||||
|
||||
return 1;
|
||||
return TAP_PACKET_REDRAW;
|
||||
}
|
||||
|
||||
static const char* tcp_host_get_filter_type(hostlist_talker_t* host, conv_filter_type_e filter)
|
||||
|
@ -812,7 +812,7 @@ static const char* tcp_host_get_filter_type(hostlist_talker_t* host, conv_filter
|
|||
|
||||
static hostlist_dissector_info_t tcp_host_dissector_info = {&tcp_host_get_filter_type};
|
||||
|
||||
static int
|
||||
static tap_packet_status
|
||||
tcpip_hostlist_packet(void *pit, packet_info *pinfo, epan_dissect_t *edt _U_, const void *vip)
|
||||
{
|
||||
conv_hash_t *hash = (conv_hash_t*) pit;
|
||||
|
@ -824,7 +824,7 @@ tcpip_hostlist_packet(void *pit, packet_info *pinfo, epan_dissect_t *edt _U_, co
|
|||
add_hostlist_table_data(hash, &tcphdr->ip_src, tcphdr->th_sport, TRUE, 1, pinfo->fd->pkt_len, &tcp_host_dissector_info, ENDPOINT_TCP);
|
||||
add_hostlist_table_data(hash, &tcphdr->ip_dst, tcphdr->th_dport, FALSE, 1, pinfo->fd->pkt_len, &tcp_host_dissector_info, ENDPOINT_TCP);
|
||||
|
||||
return 1;
|
||||
return TAP_PACKET_REDRAW;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
|
@ -858,7 +858,7 @@ tcp_build_filter(packet_info *pinfo)
|
|||
/****************************************************************************/
|
||||
/* whenever a TCP packet is seen by the tap listener */
|
||||
/* Add a new tcp frame into the graph */
|
||||
static gboolean
|
||||
static tap_packet_status
|
||||
tcp_seq_analysis_packet( void *ptr, packet_info *pinfo, epan_dissect_t *edt _U_, const void *tcp_info)
|
||||
{
|
||||
seq_analysis_info_t *sainfo = (seq_analysis_info_t *) ptr;
|
||||
|
@ -867,7 +867,7 @@ tcp_seq_analysis_packet( void *ptr, packet_info *pinfo, epan_dissect_t *edt _U_,
|
|||
seq_analysis_item_t *sai = sequence_analysis_create_sai_with_addresses(pinfo, sainfo);
|
||||
|
||||
if (!sai)
|
||||
return FALSE;
|
||||
return TAP_PACKET_DONT_REDRAW;
|
||||
|
||||
sai->frame_number = pinfo->num;
|
||||
|
||||
|
@ -896,7 +896,7 @@ tcp_seq_analysis_packet( void *ptr, packet_info *pinfo, epan_dissect_t *edt _U_,
|
|||
|
||||
g_queue_push_tail(sainfo->items, sai);
|
||||
|
||||
return TRUE;
|
||||
return TAP_PACKET_REDRAW;
|
||||
}
|
||||
|
||||
|
||||
|
@ -1071,7 +1071,7 @@ check_follow_fragments(follow_info_t *follow_info, gboolean is_server, guint32 a
|
|||
return FALSE;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
static tap_packet_status
|
||||
follow_tcp_tap_listener(void *tapdata, packet_info *pinfo,
|
||||
epan_dissect_t *edt _U_, const void *data)
|
||||
{
|
||||
|
@ -1138,7 +1138,7 @@ follow_tcp_tap_listener(void *tapdata, packet_info *pinfo,
|
|||
* because it was fully overlapping with previously received data).
|
||||
*/
|
||||
if (data_length == 0 || LT_SEQ(sequence, follow_info->seq[is_server])) {
|
||||
return FALSE;
|
||||
return TAP_PACKET_DONT_REDRAW;
|
||||
}
|
||||
|
||||
follow_record = g_new0(follow_record_t, 1);
|
||||
|
@ -1161,7 +1161,7 @@ follow_tcp_tap_listener(void *tapdata, packet_info *pinfo,
|
|||
/* Out of order packet (more preceding segments are expected). */
|
||||
follow_info->fragments[is_server] = g_list_append(follow_info->fragments[is_server], follow_record);
|
||||
}
|
||||
return FALSE;
|
||||
return TAP_PACKET_DONT_REDRAW;
|
||||
}
|
||||
|
||||
#define EXP_PDU_TCP_INFO_DATA_LEN 19
|
||||
|
|
|
@ -157,7 +157,7 @@ typedef struct _tftp_eo_t {
|
|||
} tftp_eo_t;
|
||||
|
||||
/* Tap function */
|
||||
static gboolean
|
||||
static tap_packet_status
|
||||
tftp_eo_packet(void *tapdata, packet_info *pinfo, epan_dissect_t *edt _U_, const void *data)
|
||||
{
|
||||
export_object_list_t *object_list = (export_object_list_t *)tapdata;
|
||||
|
@ -202,7 +202,7 @@ tftp_eo_packet(void *tapdata, packet_info *pinfo, epan_dissect_t *edt _U_, const
|
|||
/* Pass out entry to the GUI */
|
||||
object_list->add_entry(object_list->gui_data, entry);
|
||||
|
||||
return TRUE; /* State changed - window should be redrawn */
|
||||
return TAP_PACKET_REDRAW; /* State changed - window should be redrawn */
|
||||
}
|
||||
|
||||
/* Clean up the stored parts of a single tapped entry */
|
||||
|
|
|
@ -393,7 +393,7 @@ ssl_parse_old_keys(void)
|
|||
#endif /* HAVE_LIBGNUTLS */
|
||||
|
||||
|
||||
static gboolean
|
||||
static tap_packet_status
|
||||
ssl_follow_tap_listener(void *tapdata, packet_info *pinfo, epan_dissect_t *edt _U_, const void *ssl)
|
||||
{
|
||||
follow_info_t * follow_info = (follow_info_t*) tapdata;
|
||||
|
@ -403,7 +403,7 @@ ssl_follow_tap_listener(void *tapdata, packet_info *pinfo, epan_dissect_t *edt _
|
|||
show_stream_t from = FROM_CLIENT;
|
||||
|
||||
/* Skip packets without decrypted payload data. */
|
||||
if (!pi || !pi->records) return FALSE;
|
||||
if (!pi || !pi->records) return TAP_PACKET_DONT_REDRAW;
|
||||
|
||||
/* Compute the packet's sender. */
|
||||
if (follow_info->client_port == 0) {
|
||||
|
@ -455,7 +455,7 @@ ssl_follow_tap_listener(void *tapdata, packet_info *pinfo, epan_dissect_t *edt _
|
|||
follow_info->bytes_written[from] += appl_data->data_len;
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
return TAP_PACKET_DONT_REDRAW;
|
||||
}
|
||||
|
||||
/*********************************************************************
|
||||
|
|
|
@ -136,7 +136,7 @@ static const char* tr_conv_get_filter_type(conv_item_t* conv, conv_filter_type_e
|
|||
|
||||
static ct_dissector_info_t tr_ct_dissector_info = {&tr_conv_get_filter_type};
|
||||
|
||||
static int
|
||||
static tap_packet_status
|
||||
tr_conversation_packet(void *pct, packet_info *pinfo, epan_dissect_t *edt _U_, const void *vip)
|
||||
{
|
||||
conv_hash_t *hash = (conv_hash_t*) pct;
|
||||
|
@ -144,7 +144,7 @@ tr_conversation_packet(void *pct, packet_info *pinfo, epan_dissect_t *edt _U_, c
|
|||
|
||||
add_conversation_table_data(hash, &trhdr->src, &trhdr->dst, 0, 0, 1, pinfo->fd->pkt_len, &pinfo->rel_ts, &pinfo->abs_ts, &tr_ct_dissector_info, ENDPOINT_NONE);
|
||||
|
||||
return 1;
|
||||
return TAP_PACKET_REDRAW;
|
||||
}
|
||||
|
||||
static const char* tr_host_get_filter_type(hostlist_talker_t* host, conv_filter_type_e filter)
|
||||
|
@ -157,7 +157,7 @@ static const char* tr_host_get_filter_type(hostlist_talker_t* host, conv_filter_
|
|||
|
||||
static hostlist_dissector_info_t tr_host_dissector_info = {&tr_host_get_filter_type};
|
||||
|
||||
static int
|
||||
static tap_packet_status
|
||||
tr_hostlist_packet(void *pit, packet_info *pinfo, epan_dissect_t *edt _U_, const void *vip)
|
||||
{
|
||||
conv_hash_t *hash = (conv_hash_t*) pit;
|
||||
|
@ -169,7 +169,7 @@ tr_hostlist_packet(void *pit, packet_info *pinfo, epan_dissect_t *edt _U_, const
|
|||
add_hostlist_table_data(hash, &trhdr->src, 0, TRUE, 1, pinfo->fd->pkt_len, &tr_host_dissector_info, ENDPOINT_NONE);
|
||||
add_hostlist_table_data(hash, &trhdr->dst, 0, FALSE, 1, pinfo->fd->pkt_len, &tr_host_dissector_info, ENDPOINT_NONE);
|
||||
|
||||
return 1;
|
||||
return TAP_PACKET_REDRAW;
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
@ -665,7 +665,7 @@ ucp_stats_tree_init(stats_tree* st)
|
|||
st_ucp_results_neg = stats_tree_create_node(st, st_str_neg, st_ucp_results, STAT_DT_INT, TRUE);
|
||||
}
|
||||
|
||||
static int
|
||||
static tap_packet_status
|
||||
ucp_stats_tree_per_packet(stats_tree *st, /* st as it was passed to us */
|
||||
packet_info *pinfo _U_,
|
||||
epan_dissect_t *edt _U_,
|
||||
|
@ -701,7 +701,7 @@ ucp_stats_tree_per_packet(stats_tree *st, /* st as it was passed to us */
|
|||
}
|
||||
}
|
||||
|
||||
return 1;
|
||||
return TAP_PACKET_REDRAW;
|
||||
}
|
||||
|
||||
/*!
|
||||
|
|
|
@ -328,7 +328,7 @@ static const char* udp_conv_get_filter_type(conv_item_t* conv, conv_filter_type_
|
|||
|
||||
static ct_dissector_info_t udp_ct_dissector_info = {&udp_conv_get_filter_type};
|
||||
|
||||
static int
|
||||
static tap_packet_status
|
||||
udpip_conversation_packet(void *pct, packet_info *pinfo, epan_dissect_t *edt _U_, const void *vip)
|
||||
{
|
||||
conv_hash_t *hash = (conv_hash_t*) pct;
|
||||
|
@ -336,7 +336,7 @@ udpip_conversation_packet(void *pct, packet_info *pinfo, epan_dissect_t *edt _U_
|
|||
|
||||
add_conversation_table_data_with_conv_id(hash, &udphdr->ip_src, &udphdr->ip_dst, udphdr->uh_sport, udphdr->uh_dport, (conv_id_t) udphdr->uh_stream, 1, pinfo->fd->pkt_len, &pinfo->rel_ts, &pinfo->abs_ts, &udp_ct_dissector_info, ENDPOINT_UDP);
|
||||
|
||||
return 1;
|
||||
return TAP_PACKET_REDRAW;
|
||||
}
|
||||
|
||||
static const char* udp_host_get_filter_type(hostlist_talker_t* host, conv_filter_type_e filter)
|
||||
|
@ -382,7 +382,7 @@ static const char* udp_host_get_filter_type(hostlist_talker_t* host, conv_filter
|
|||
|
||||
static hostlist_dissector_info_t udp_host_dissector_info = {&udp_host_get_filter_type};
|
||||
|
||||
static int
|
||||
static tap_packet_status
|
||||
udpip_hostlist_packet(void *pit, packet_info *pinfo, epan_dissect_t *edt _U_, const void *vip)
|
||||
{
|
||||
conv_hash_t *hash = (conv_hash_t*) pit;
|
||||
|
@ -394,7 +394,7 @@ udpip_hostlist_packet(void *pit, packet_info *pinfo, epan_dissect_t *edt _U_, co
|
|||
add_hostlist_table_data(hash, &udphdr->ip_src, udphdr->uh_sport, TRUE, 1, pinfo->fd->pkt_len, &udp_host_dissector_info, ENDPOINT_UDP);
|
||||
add_hostlist_table_data(hash, &udphdr->ip_dst, udphdr->uh_dport, FALSE, 1, pinfo->fd->pkt_len, &udp_host_dissector_info, ENDPOINT_UDP);
|
||||
|
||||
return 1;
|
||||
return TAP_PACKET_REDRAW;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
|
|
|
@ -1769,13 +1769,13 @@ static const char* usb_conv_get_filter_type(conv_item_t* conv, conv_filter_type_
|
|||
|
||||
static ct_dissector_info_t usb_ct_dissector_info = {&usb_conv_get_filter_type};
|
||||
|
||||
static int
|
||||
static tap_packet_status
|
||||
usb_conversation_packet(void *pct, packet_info *pinfo, epan_dissect_t *edt _U_, const void *vip _U_)
|
||||
{
|
||||
conv_hash_t *hash = (conv_hash_t*) pct;
|
||||
add_conversation_table_data(hash, &pinfo->src, &pinfo->dst, 0, 0, 1, pinfo->fd->pkt_len, &pinfo->rel_ts, &pinfo->abs_ts, &usb_ct_dissector_info, ENDPOINT_NONE);
|
||||
|
||||
return 1;
|
||||
return TAP_PACKET_REDRAW;
|
||||
}
|
||||
|
||||
static const char* usb_host_get_filter_type(hostlist_talker_t* host, conv_filter_type_e filter)
|
||||
|
@ -1794,7 +1794,7 @@ usb_col_filter_str(const address* addr _U_, gboolean is_src)
|
|||
|
||||
static hostlist_dissector_info_t usb_host_dissector_info = {&usb_host_get_filter_type};
|
||||
|
||||
static int
|
||||
static tap_packet_status
|
||||
usb_hostlist_packet(void *pit, packet_info *pinfo, epan_dissect_t *edt _U_, const void *vip _U_)
|
||||
{
|
||||
conv_hash_t *hash = (conv_hash_t*) pit;
|
||||
|
@ -1805,7 +1805,7 @@ usb_hostlist_packet(void *pit, packet_info *pinfo, epan_dissect_t *edt _U_, cons
|
|||
add_hostlist_table_data(hash, &pinfo->src, 0, TRUE, 1, pinfo->fd->pkt_len, &usb_host_dissector_info, ENDPOINT_NONE);
|
||||
add_hostlist_table_data(hash, &pinfo->dst, 0, FALSE, 1, pinfo->fd->pkt_len, &usb_host_dissector_info, ENDPOINT_NONE);
|
||||
|
||||
return 1;
|
||||
return TAP_PACKET_REDRAW;
|
||||
}
|
||||
|
||||
/* SETUP dissectors */
|
||||
|
|
|
@ -5619,7 +5619,7 @@ static void wsp_stat_init(stat_tap_table_ui* new_stat)
|
|||
unknown_sc_idx = table_idx;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
static tap_packet_status
|
||||
wsp_stat_packet(void *tapdata, packet_info *pinfo _U_, epan_dissect_t *edt _U_, const void *wiv_ptr)
|
||||
{
|
||||
stat_data_t* stat_data = (stat_data_t*)tapdata;
|
||||
|
@ -5664,7 +5664,7 @@ wsp_stat_packet(void *tapdata, packet_info *pinfo _U_, epan_dissect_t *edt _U_,
|
|||
stat_tap_set_field_data(sc_table, element, PACKET_COLUMN, item_data);
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
return found? TAP_PACKET_REDRAW : TAP_PACKET_DONT_REDRAW;
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
|
@ -27,14 +27,14 @@ struct register_follow {
|
|||
follow_index_filter_func index_filter; /* generate stream/index filter to follow */
|
||||
follow_address_filter_func address_filter; /* generate address filter to follow */
|
||||
follow_port_to_display_func port_to_display; /* port to name resolution for follow type */
|
||||
follow_tap_func tap_handler; /* tap listener handler */
|
||||
tap_packet_cb tap_handler; /* tap listener handler */
|
||||
};
|
||||
|
||||
static wmem_tree_t *registered_followers = NULL;
|
||||
|
||||
void register_follow_stream(const int proto_id, const char* tap_listener,
|
||||
follow_conv_filter_func conv_filter, follow_index_filter_func index_filter, follow_address_filter_func address_filter,
|
||||
follow_port_to_display_func port_to_display, follow_tap_func tap_handler)
|
||||
follow_port_to_display_func port_to_display, tap_packet_cb tap_handler)
|
||||
{
|
||||
register_follow_t *follower;
|
||||
DISSECTOR_ASSERT(tap_listener);
|
||||
|
@ -96,7 +96,7 @@ follow_port_to_display_func get_follow_port_to_display(register_follow_t* follow
|
|||
return follower->port_to_display;
|
||||
}
|
||||
|
||||
follow_tap_func get_follow_tap_handler(register_follow_t* follower)
|
||||
tap_packet_cb get_follow_tap_handler(register_follow_t* follower)
|
||||
{
|
||||
return follower->tap_handler;
|
||||
}
|
||||
|
@ -175,7 +175,7 @@ follow_info_free(follow_info_t* follow_info)
|
|||
g_free(follow_info);
|
||||
}
|
||||
|
||||
gboolean
|
||||
tap_packet_status
|
||||
follow_tvb_tap_listener(void *tapdata, packet_info *pinfo,
|
||||
epan_dissect_t *edt _U_, const void *data)
|
||||
{
|
||||
|
@ -207,7 +207,7 @@ follow_tvb_tap_listener(void *tapdata, packet_info *pinfo,
|
|||
follow_info->bytes_written[follow_record->is_server] += follow_record->data->len;
|
||||
|
||||
follow_info->payload = g_list_prepend(follow_info->payload, follow_record);
|
||||
return FALSE;
|
||||
return TAP_PACKET_DONT_REDRAW;
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
@ -20,6 +20,7 @@ extern "C" {
|
|||
#include <epan/epan.h>
|
||||
#include <epan/packet.h>
|
||||
#include <epan/ipv6.h>
|
||||
#include <epan/tap.h>
|
||||
#include <epan/wmem/wmem.h>
|
||||
#include "ws_symbol_export.h"
|
||||
|
||||
|
@ -102,12 +103,11 @@ typedef gchar* (*follow_conv_filter_func)(packet_info* pinfo, int* stream);
|
|||
typedef gchar* (*follow_index_filter_func)(int stream);
|
||||
typedef gchar* (*follow_address_filter_func)(address* src_addr, address* dst_addr, int src_port, int dst_port);
|
||||
typedef gchar* (*follow_port_to_display_func)(wmem_allocator_t *allocator, guint port);
|
||||
typedef gboolean (*follow_tap_func)(void *tapdata, packet_info *pinfo, epan_dissect_t *edt, const void *data);
|
||||
|
||||
WS_DLL_PUBLIC
|
||||
void register_follow_stream(const int proto_id, const char* tap_listener,
|
||||
follow_conv_filter_func conv_filter, follow_index_filter_func index_filter, follow_address_filter_func address_filter,
|
||||
follow_port_to_display_func port_to_display, follow_tap_func tap_handler);
|
||||
follow_port_to_display_func port_to_display, tap_packet_cb tap_handler);
|
||||
|
||||
/** Get protocol ID from registered follower
|
||||
*
|
||||
|
@ -161,15 +161,15 @@ WS_DLL_PUBLIC follow_port_to_display_func get_follow_port_to_display(register_fo
|
|||
/** Provide function that handles tap data (tap_packet_cb parameter of register_tap_listener)
|
||||
*
|
||||
* @param follower [in] Registered follower
|
||||
* @return A tap data handler
|
||||
* @return A tap packet handler
|
||||
*/
|
||||
WS_DLL_PUBLIC follow_tap_func get_follow_tap_handler(register_follow_t* follower);
|
||||
WS_DLL_PUBLIC tap_packet_cb get_follow_tap_handler(register_follow_t* follower);
|
||||
|
||||
|
||||
/** Tap function handler when dissector's tap provides follow data as a tvb.
|
||||
* Used by TCP, UDP and HTTP followers
|
||||
*/
|
||||
WS_DLL_PUBLIC gboolean
|
||||
WS_DLL_PUBLIC tap_packet_status
|
||||
follow_tvb_tap_listener(void *tapdata, packet_info *pinfo, epan_dissect_t *edt _U_, const void *data);
|
||||
|
||||
/** Interator to walk all registered followers and execute func
|
||||
|
|
|
@ -374,7 +374,7 @@ stats_tree_new(stats_tree_cfg *cfg, tree_pres *pr, const char *filter)
|
|||
}
|
||||
|
||||
/* will be the tap packet cb */
|
||||
extern int
|
||||
extern tap_packet_status
|
||||
stats_tree_packet(void *p, packet_info *pinfo, epan_dissect_t *edt, const void *pri)
|
||||
{
|
||||
stats_tree *st = (stats_tree *)p;
|
||||
|
@ -387,7 +387,7 @@ stats_tree_packet(void *p, packet_info *pinfo, epan_dissect_t *edt, const void *
|
|||
if (st->cfg->packet)
|
||||
return st->cfg->packet(st,pinfo,edt,pri);
|
||||
else
|
||||
return 0;
|
||||
return TAP_PACKET_DONT_REDRAW;
|
||||
}
|
||||
|
||||
extern stats_tree_cfg*
|
||||
|
|
|
@ -46,10 +46,10 @@ extern "C" {
|
|||
typedef struct _stats_tree stats_tree;
|
||||
|
||||
/* tap packet callback for stats_tree */
|
||||
typedef int (*stat_tree_packet_cb)(stats_tree*,
|
||||
packet_info *,
|
||||
epan_dissect_t *,
|
||||
const void *);
|
||||
typedef tap_packet_status (*stat_tree_packet_cb)(stats_tree*,
|
||||
packet_info *,
|
||||
epan_dissect_t *,
|
||||
const void *);
|
||||
|
||||
/* stats_tree initialization callback */
|
||||
typedef void (*stat_tree_init_cb)(stats_tree *);
|
||||
|
|
|
@ -178,7 +178,7 @@ WS_DLL_PUBLIC void stats_tree_presentation(void (*registry_iterator)(gpointer,gp
|
|||
WS_DLL_PUBLIC stats_tree *stats_tree_new(stats_tree_cfg *cfg, tree_pres *pr, const char *filter);
|
||||
|
||||
/** callback for taps */
|
||||
WS_DLL_PUBLIC int stats_tree_packet(void*, packet_info*, epan_dissect_t*, const void *);
|
||||
WS_DLL_PUBLIC tap_packet_status stats_tree_packet(void*, packet_info*, epan_dissect_t*, const void *);
|
||||
|
||||
/** callback for reset */
|
||||
WS_DLL_PUBLIC void stats_tree_reset(void *p_st);
|
||||
|
|
50
epan/tap.c
50
epan/tap.c
|
@ -80,6 +80,7 @@ typedef struct _tap_listener_t {
|
|||
struct _tap_listener_t *next;
|
||||
int tap_id;
|
||||
gboolean needs_redraw;
|
||||
gboolean failed;
|
||||
guint flags;
|
||||
gchar *fstring;
|
||||
dfilter_t *code;
|
||||
|
@ -310,12 +311,49 @@ tap_push_tapped_queue(epan_dissect_t *edt)
|
|||
if (!(tp->flags & TAP_PACKET_IS_ERROR_PACKET) || (tl->flags & TL_REQUIRES_ERROR_PACKETS))
|
||||
{
|
||||
if(tp->tap_id==tl->tap_id){
|
||||
gboolean passed=TRUE;
|
||||
if(tl->code){
|
||||
passed=dfilter_apply_edt(tl->code, edt);
|
||||
if(!tl->packet){
|
||||
/* There isn't a per-packet
|
||||
* routine for this tap.
|
||||
*/
|
||||
continue;
|
||||
}
|
||||
if(passed && tl->packet){
|
||||
tl->needs_redraw|=tl->packet(tl->tapdata, tp->pinfo, edt, tp->tap_specific_data);
|
||||
if(tl->failed){
|
||||
/* A previous call failed,
|
||||
* meaning "stop running this
|
||||
* tap", so don't call the
|
||||
* packet routine.
|
||||
*/
|
||||
continue;
|
||||
}
|
||||
|
||||
/* If we have a filter, see if the
|
||||
* packet passes.
|
||||
*/
|
||||
if(tl->code){
|
||||
if (!dfilter_apply_edt(tl->code, edt)){
|
||||
/* The packet didn't
|
||||
* pass the filter. */
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
/* So call the per-packet routine. */
|
||||
tap_packet_status status;
|
||||
|
||||
status = tl->packet(tl->tapdata, tp->pinfo, edt, tp->tap_specific_data);
|
||||
|
||||
switch (status) {
|
||||
|
||||
case TAP_PACKET_DONT_REDRAW:
|
||||
break;
|
||||
|
||||
case TAP_PACKET_REDRAW:
|
||||
tl->needs_redraw=TRUE;
|
||||
break;
|
||||
|
||||
case TAP_PACKET_FAILED:
|
||||
tl->failed=TRUE;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -380,6 +418,7 @@ reset_tap_listeners(void)
|
|||
tl->reset(tl->tapdata);
|
||||
}
|
||||
tl->needs_redraw=TRUE;
|
||||
tl->failed=FALSE;
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -490,6 +529,7 @@ register_tap_listener(const char *tapname, void *tapdata, const char *fstring,
|
|||
|
||||
tl=(tap_listener_t *)g_malloc0(sizeof(tap_listener_t));
|
||||
tl->needs_redraw=TRUE;
|
||||
tl->failed=FALSE;
|
||||
tl->flags=flags;
|
||||
if(fstring){
|
||||
if(!dfilter_compile(fstring, &code, &err_msg)){
|
||||
|
|
11
epan/tap.h
11
epan/tap.h
|
@ -22,8 +22,17 @@
|
|||
extern "C" {
|
||||
#endif /* __cplusplus */
|
||||
|
||||
/**
|
||||
* Status returned by the per-packet callback.
|
||||
*/
|
||||
typedef enum {
|
||||
TAP_PACKET_DONT_REDRAW, /**< Packet processing succeeded, no need to redraw */
|
||||
TAP_PACKET_REDRAW, /**< Packet processing succeeded, must redraw */
|
||||
TAP_PACKET_FAILED /**< Packet processing failed, stop calling this tap */
|
||||
} tap_packet_status;
|
||||
|
||||
typedef void (*tap_reset_cb)(void *tapdata);
|
||||
typedef gboolean (*tap_packet_cb)(void *tapdata, packet_info *pinfo, epan_dissect_t *edt, const void *data);
|
||||
typedef tap_packet_status (*tap_packet_cb)(void *tapdata, packet_info *pinfo, epan_dissect_t *edt, const void *data);
|
||||
typedef void (*tap_draw_cb)(void *tapdata);
|
||||
typedef void (*tap_finish_cb)(void *tapdata);
|
||||
|
||||
|
|
|
@ -68,11 +68,11 @@ static int tap_packet_cb_error_handler(lua_State* L) {
|
|||
}
|
||||
|
||||
|
||||
static gboolean lua_tap_packet(void *tapdata, packet_info *pinfo, epan_dissect_t *edt, const void *data) {
|
||||
static tap_packet_status lua_tap_packet(void *tapdata, packet_info *pinfo, epan_dissect_t *edt, const void *data) {
|
||||
Listener tap = (Listener)tapdata;
|
||||
gboolean retval = FALSE;
|
||||
tap_packet_status retval = TAP_PACKET_DONT_REDRAW;
|
||||
|
||||
if (tap->packet_ref == LUA_NOREF) return FALSE;
|
||||
if (tap->packet_ref == LUA_NOREF) return TAP_PACKET_DONT_REDRAW; /* XXX - report error and return TAP_PACKET_FAILED? */
|
||||
|
||||
lua_settop(tap->L,0);
|
||||
|
||||
|
@ -94,12 +94,15 @@ static gboolean lua_tap_packet(void *tapdata, packet_info *pinfo, epan_dissect_t
|
|||
|
||||
switch ( lua_pcall(tap->L,3,1,1) ) {
|
||||
case 0:
|
||||
retval = luaL_optinteger(tap->L,-1,1) == 0 ? FALSE : TRUE;
|
||||
/* XXX - treat 2 as TAP_PACKET_FAILED? */
|
||||
retval = luaL_optinteger(tap->L,-1,1) == 0 ? TAP_PACKET_DONT_REDRAW : TAP_PACKET_REDRAW;
|
||||
break;
|
||||
case LUA_ERRRUN:
|
||||
/* XXX - TAP_PACKET_FAILED? */
|
||||
break;
|
||||
case LUA_ERRMEM:
|
||||
g_warning("Memory alloc error while calling listener tap callback packet");
|
||||
/* XXX - TAP_PACKET_FAILED? */
|
||||
break;
|
||||
default:
|
||||
g_assert_not_reached();
|
||||
|
|
|
@ -106,18 +106,18 @@ static void ipv6_hosts_stats_tree_init(stats_tree *st) {
|
|||
st_node_ipv6 = stats_tree_create_node(st, st_str_ipv6, 0, STAT_DT_INT, TRUE);
|
||||
}
|
||||
|
||||
static int ip_hosts_stats_tree_packet(stats_tree *st, packet_info *pinfo, int st_node, const gchar *st_str) {
|
||||
static tap_packet_status ip_hosts_stats_tree_packet(stats_tree *st, packet_info *pinfo, int st_node, const gchar *st_str) {
|
||||
tick_stat_node(st, st_str, 0, FALSE);
|
||||
tick_stat_node(st, address_to_str(pinfo->pool, &pinfo->net_src), st_node, FALSE);
|
||||
tick_stat_node(st, address_to_str(pinfo->pool, &pinfo->net_dst), st_node, FALSE);
|
||||
return 1;
|
||||
return TAP_PACKET_REDRAW;
|
||||
}
|
||||
|
||||
static int ipv4_hosts_stats_tree_packet(stats_tree *st, packet_info *pinfo, epan_dissect_t *edt _U_, const void *p _U_) {
|
||||
static tap_packet_status ipv4_hosts_stats_tree_packet(stats_tree *st, packet_info *pinfo, epan_dissect_t *edt _U_, const void *p _U_) {
|
||||
return ip_hosts_stats_tree_packet(st, pinfo, st_node_ipv4, st_str_ipv4);
|
||||
}
|
||||
|
||||
static int ipv6_hosts_stats_tree_packet(stats_tree *st, packet_info *pinfo, epan_dissect_t *edt _U_, const void *p _U_) {
|
||||
static tap_packet_status ipv6_hosts_stats_tree_packet(stats_tree *st, packet_info *pinfo, epan_dissect_t *edt _U_, const void *p _U_) {
|
||||
return ip_hosts_stats_tree_packet(st, pinfo, st_node_ipv6, st_str_ipv6);
|
||||
}
|
||||
|
||||
|
@ -154,23 +154,26 @@ static void ipv6_srcdst_stats_tree_init(stats_tree *st) {
|
|||
ip_srcdst_stats_tree_init(st, st_str_ipv6_src, &st_node_ipv6_src, st_str_ipv6_dst, &st_node_ipv6_dst);
|
||||
}
|
||||
|
||||
static int ip_srcdst_stats_tree_packet(stats_tree *st, packet_info *pinfo,
|
||||
int st_node_src, const gchar *st_str_src,
|
||||
int st_node_dst, const gchar *st_str_dst) {
|
||||
static tap_packet_status ip_srcdst_stats_tree_packet(stats_tree *st,
|
||||
packet_info *pinfo,
|
||||
int st_node_src,
|
||||
const gchar *st_str_src,
|
||||
int st_node_dst,
|
||||
const gchar *st_str_dst) {
|
||||
/* update source branch */
|
||||
tick_stat_node(st, st_str_src, 0, FALSE);
|
||||
tick_stat_node(st, address_to_str(pinfo->pool, &pinfo->net_src), st_node_src, FALSE);
|
||||
/* update destination branch */
|
||||
tick_stat_node(st, st_str_dst, 0, FALSE);
|
||||
tick_stat_node(st, address_to_str(pinfo->pool, &pinfo->net_dst), st_node_dst, FALSE);
|
||||
return 1;
|
||||
return TAP_PACKET_REDRAW;
|
||||
}
|
||||
|
||||
static int ipv4_srcdst_stats_tree_packet(stats_tree *st, packet_info *pinfo, epan_dissect_t *edt _U_, const void *p _U_) {
|
||||
static tap_packet_status ipv4_srcdst_stats_tree_packet(stats_tree *st, packet_info *pinfo, epan_dissect_t *edt _U_, const void *p _U_) {
|
||||
return ip_srcdst_stats_tree_packet(st, pinfo, st_node_ipv4_src, st_str_ipv4_src, st_node_ipv4_dst, st_str_ipv4_dst);
|
||||
}
|
||||
|
||||
static int ipv6_srcdst_stats_tree_packet(stats_tree *st, packet_info *pinfo, epan_dissect_t *edt _U_, const void *p _U_) {
|
||||
static tap_packet_status ipv6_srcdst_stats_tree_packet(stats_tree *st, packet_info *pinfo, epan_dissect_t *edt _U_, const void *p _U_) {
|
||||
return ip_srcdst_stats_tree_packet(st, pinfo, st_node_ipv6_src, st_str_ipv6_src, st_node_ipv6_dst, st_str_ipv6_dst);
|
||||
}
|
||||
|
||||
|
@ -188,14 +191,14 @@ static void ipv6_ptype_stats_tree_init(stats_tree *st) {
|
|||
st_node_ipv6_ptype = stats_tree_create_pivot(st, st_str_ipv6_ptype, 0);
|
||||
}
|
||||
|
||||
static int ipv4_ptype_stats_tree_packet(stats_tree *st, packet_info *pinfo, epan_dissect_t *edt _U_, const void *p _U_) {
|
||||
static tap_packet_status ipv4_ptype_stats_tree_packet(stats_tree *st, packet_info *pinfo, epan_dissect_t *edt _U_, const void *p _U_) {
|
||||
stats_tree_tick_pivot(st, st_node_ipv4_ptype, port_type_to_str(pinfo->ptype));
|
||||
return 1;
|
||||
return TAP_PACKET_REDRAW;
|
||||
}
|
||||
|
||||
static int ipv6_ptype_stats_tree_packet(stats_tree *st, packet_info *pinfo, epan_dissect_t *edt _U_, const void *p _U_) {
|
||||
static tap_packet_status ipv6_ptype_stats_tree_packet(stats_tree *st, packet_info *pinfo, epan_dissect_t *edt _U_, const void *p _U_) {
|
||||
stats_tree_tick_pivot(st, st_node_ipv6_ptype, port_type_to_str(pinfo->ptype));
|
||||
return 1;
|
||||
return TAP_PACKET_REDRAW;
|
||||
}
|
||||
|
||||
/* a tree example
|
||||
|
@ -217,7 +220,7 @@ static void ipv6_dsts_stats_tree_init(stats_tree *st) {
|
|||
st_node_ipv6_dsts = stats_tree_create_node(st, st_str_ipv6_dsts, 0, STAT_DT_INT, TRUE);
|
||||
}
|
||||
|
||||
static int dsts_stats_tree_packet(stats_tree *st, packet_info *pinfo, int st_node, const gchar *st_str) {
|
||||
static tap_packet_status dsts_stats_tree_packet(stats_tree *st, packet_info *pinfo, int st_node, const gchar *st_str) {
|
||||
static gchar str[128];
|
||||
int ip_dst_node;
|
||||
int protocol_node;
|
||||
|
@ -227,14 +230,14 @@ static int dsts_stats_tree_packet(stats_tree *st, packet_info *pinfo, int st_nod
|
|||
protocol_node = tick_stat_node(st, port_type_to_str(pinfo->ptype), ip_dst_node, TRUE);
|
||||
g_snprintf(str, sizeof(str) - 1, "%u", pinfo->destport);
|
||||
tick_stat_node(st, str, protocol_node, TRUE);
|
||||
return 1;
|
||||
return TAP_PACKET_REDRAW;
|
||||
}
|
||||
|
||||
static int ipv4_dsts_stats_tree_packet(stats_tree *st, packet_info *pinfo, epan_dissect_t *edt _U_, const void *p _U_) {
|
||||
static tap_packet_status ipv4_dsts_stats_tree_packet(stats_tree *st, packet_info *pinfo, epan_dissect_t *edt _U_, const void *p _U_) {
|
||||
return dsts_stats_tree_packet(st, pinfo, st_node_ipv4_dsts, st_str_ipv4_dsts);
|
||||
}
|
||||
|
||||
static int ipv6_dsts_stats_tree_packet(stats_tree *st, packet_info *pinfo, epan_dissect_t *edt _U_, const void *p _U_) {
|
||||
static tap_packet_status ipv6_dsts_stats_tree_packet(stats_tree *st, packet_info *pinfo, epan_dissect_t *edt _U_, const void *p _U_) {
|
||||
return dsts_stats_tree_packet(st, pinfo, st_node_ipv6_dsts, st_str_ipv6_dsts);
|
||||
}
|
||||
|
||||
|
@ -259,12 +262,12 @@ static void plen_stats_tree_init(stats_tree *st) {
|
|||
}
|
||||
}
|
||||
|
||||
static int plen_stats_tree_packet(stats_tree *st, packet_info *pinfo, epan_dissect_t *edt _U_, const void *p _U_) {
|
||||
static tap_packet_status plen_stats_tree_packet(stats_tree *st, packet_info *pinfo, epan_dissect_t *edt _U_, const void *p _U_) {
|
||||
tick_stat_node(st, st_str_plen, 0, FALSE);
|
||||
|
||||
stats_tree_tick_range(st, st_str_plen, 0, pinfo->fd->pkt_len);
|
||||
|
||||
return 1;
|
||||
return TAP_PACKET_REDRAW;
|
||||
}
|
||||
|
||||
/* register all pinfo trees */
|
||||
|
|
|
@ -1247,7 +1247,7 @@ static gboolean print_field_value(field_info *finfo, int cmd_line_index)
|
|||
return TRUE;
|
||||
}
|
||||
|
||||
static int
|
||||
static tap_packet_status
|
||||
protocolinfo_packet(void *prs, packet_info *pinfo _U_, epan_dissect_t *edt, const void *dummy _U_)
|
||||
{
|
||||
pci_t *rs=(pci_t *)prs;
|
||||
|
@ -1257,7 +1257,7 @@ protocolinfo_packet(void *prs, packet_info *pinfo _U_, epan_dissect_t *edt, cons
|
|||
gp=proto_get_finfo_ptr_array(edt->tree, rs->hf_index);
|
||||
if(!gp){
|
||||
printf(" n.a.");
|
||||
return 0;
|
||||
return TAP_PACKET_DONT_REDRAW;
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -1267,7 +1267,7 @@ protocolinfo_packet(void *prs, packet_info *pinfo _U_, epan_dissect_t *edt, cons
|
|||
print_field_value((field_info *)gp->pdata[i], rs->cmd_line_index);
|
||||
}
|
||||
|
||||
return 0;
|
||||
return TAP_PACKET_DONT_REDRAW;
|
||||
}
|
||||
|
||||
int g_cmd_line_index = 0;
|
||||
|
|
|
@ -1207,7 +1207,7 @@ sharkd_session_process_tap_expert_cb(void *tapdata)
|
|||
putchar(',');
|
||||
}
|
||||
|
||||
static gboolean
|
||||
static tap_packet_status
|
||||
sharkd_session_packet_tap_expert_cb(void *tapdata, packet_info *pinfo _U_, epan_dissect_t *edt _U_, const void *pointer)
|
||||
{
|
||||
struct sharkd_expert_tap *etd = (struct sharkd_expert_tap *) tapdata;
|
||||
|
@ -1215,7 +1215,7 @@ sharkd_session_packet_tap_expert_cb(void *tapdata, packet_info *pinfo _U_, epan_
|
|||
expert_info_t *ei_copy;
|
||||
|
||||
if (ei == NULL)
|
||||
return FALSE;
|
||||
return TAP_PACKET_DONT_REDRAW;
|
||||
|
||||
ei_copy = g_new(expert_info_t, 1);
|
||||
/* Note: this is a shallow copy */
|
||||
|
@ -1227,7 +1227,7 @@ sharkd_session_packet_tap_expert_cb(void *tapdata, packet_info *pinfo _U_, epan_
|
|||
|
||||
etd->details = g_slist_prepend(etd->details, ei_copy);
|
||||
|
||||
return TRUE;
|
||||
return TAP_PACKET_REDRAW;
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -1437,7 +1437,7 @@ sharkd_session_process_tap_rtp_free_cb(void *tapdata)
|
|||
g_free(rtp_req);
|
||||
}
|
||||
|
||||
static gboolean
|
||||
static tap_packet_status
|
||||
sharkd_session_packet_tap_rtp_analyse_cb(void *tapdata, packet_info *pinfo, epan_dissect_t *edt _U_, const void *pointer)
|
||||
{
|
||||
struct sharkd_analyse_rtp *rtp_req = (struct sharkd_analyse_rtp *) tapdata;
|
||||
|
@ -1471,7 +1471,7 @@ sharkd_session_packet_tap_rtp_analyse_cb(void *tapdata, packet_info *pinfo, epan
|
|||
rtp_req->packets = g_slist_append(rtp_req->packets, item);
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
return TAP_PACKET_REDRAW;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -3072,15 +3072,16 @@ struct sharkd_iograph
|
|||
GString *error;
|
||||
};
|
||||
|
||||
static gboolean
|
||||
static tap_packet_status
|
||||
sharkd_iograph_packet(void *g, packet_info *pinfo, epan_dissect_t *edt, const void *dummy _U_)
|
||||
{
|
||||
struct sharkd_iograph *graph = (struct sharkd_iograph *) g;
|
||||
int idx;
|
||||
gboolean update_succeeded;
|
||||
|
||||
idx = get_io_graph_index(pinfo, graph->interval);
|
||||
if (idx < 0 || idx >= SHARKD_IOGRAPH_MAX_ITEMS)
|
||||
return FALSE;
|
||||
return TAP_PACKET_DONT_REDRAW;
|
||||
|
||||
if (idx + 1 > graph->num_items)
|
||||
{
|
||||
|
@ -3102,7 +3103,9 @@ sharkd_iograph_packet(void *g, packet_info *pinfo, epan_dissect_t *edt, const vo
|
|||
graph->num_items = idx + 1;
|
||||
}
|
||||
|
||||
return update_io_graph_item(graph->items, idx, pinfo, edt, graph->hf_index, graph->calc_type, graph->interval);
|
||||
update_succeeded = update_io_graph_item(graph->items, idx, pinfo, edt, graph->hf_index, graph->calc_type, graph->interval);
|
||||
/* XXX - TAP_PACKET_FAILED if the item couldn't be updated, with an error message? */
|
||||
return update_succeeded ? TAP_PACKET_REDRAW : TAP_PACKET_DONT_REDRAW;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -4147,7 +4150,7 @@ sharkd_rtp_download_decode(struct sharkd_download_rtp *req)
|
|||
g_hash_table_destroy(decoders_hash_);
|
||||
}
|
||||
|
||||
static gboolean
|
||||
static tap_packet_status
|
||||
sharkd_session_packet_download_tap_rtp_cb(void *tapdata, packet_info *pinfo, epan_dissect_t *edt _U_, const void *data)
|
||||
{
|
||||
const struct _rtp_info *rtp_info = (const struct _rtp_info *) data;
|
||||
|
@ -4155,7 +4158,7 @@ sharkd_session_packet_download_tap_rtp_cb(void *tapdata, packet_info *pinfo, epa
|
|||
|
||||
/* do not consider RTP packets without a setup frame */
|
||||
if (rtp_info->info_setup_frame_num == 0)
|
||||
return FALSE;
|
||||
return TAP_PACKET_DONT_REDRAW;
|
||||
|
||||
if (rtpstream_id_equal_pinfo_rtp_info(&req_rtp->id, pinfo, rtp_info))
|
||||
{
|
||||
|
@ -4177,7 +4180,7 @@ sharkd_session_packet_download_tap_rtp_cb(void *tapdata, packet_info *pinfo, epa
|
|||
req_rtp->packets = g_slist_append(req_rtp->packets, rtp_packet);
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
return TAP_PACKET_DONT_REDRAW;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -50,10 +50,10 @@ static void camelsrt_reset(void *phs)
|
|||
}
|
||||
|
||||
|
||||
static int camelsrt_packet(void *phs,
|
||||
packet_info *pinfo _U_,
|
||||
epan_dissect_t *edt _U_,
|
||||
const void *phi)
|
||||
static tap_packet_status camelsrt_packet(void *phs,
|
||||
packet_info *pinfo _U_,
|
||||
epan_dissect_t *edt _U_,
|
||||
const void *phi)
|
||||
{
|
||||
struct camelsrt_t *hs = (struct camelsrt_t *)phs;
|
||||
const struct camelsrt_info_t * pi = (const struct camelsrt_info_t *)phi;
|
||||
|
@ -75,7 +75,7 @@ static int camelsrt_packet(void *phs,
|
|||
}
|
||||
}
|
||||
}
|
||||
return 1;
|
||||
return TAP_PACKET_REDRAW;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -112,10 +112,10 @@ diam_tree_to_csv(proto_node *node, gpointer data)
|
|||
return FALSE;
|
||||
}
|
||||
|
||||
static int
|
||||
static tap_packet_status
|
||||
diameteravp_packet(void *pds, packet_info *pinfo, epan_dissect_t *edt _U_, const void *pdi)
|
||||
{
|
||||
int ret = 0;
|
||||
tap_packet_status ret = TAP_PACKET_DONT_REDRAW;
|
||||
double resp_time = 0.;
|
||||
gboolean is_request = TRUE;
|
||||
guint32 cmd_code = 0;
|
||||
|
@ -140,7 +140,7 @@ diameteravp_packet(void *pds, packet_info *pinfo, epan_dissect_t *edt _U_, const
|
|||
ds->frame = pinfo->num;
|
||||
ds->diammsg_toprocess = 0;
|
||||
} else {
|
||||
ds->diammsg_toprocess += 1;
|
||||
ds->diammsg_toprocess += 1;
|
||||
}
|
||||
|
||||
/* Extract data from request/answer pair provided by diameter dissector.*/
|
||||
|
|
|
@ -70,7 +70,7 @@ expert_stat_reset(void *tapdata)
|
|||
}
|
||||
|
||||
/* Process stat struct for an expert frame */
|
||||
static gboolean
|
||||
static tap_packet_status
|
||||
expert_stat_packet(void *tapdata, packet_info *pinfo _U_, epan_dissect_t *edt _U_,
|
||||
const void *pointer)
|
||||
{
|
||||
|
@ -99,12 +99,12 @@ expert_stat_packet(void *tapdata, packet_info *pinfo _U_, epan_dissect_t *edt _U
|
|||
break;
|
||||
default:
|
||||
g_assert_not_reached();
|
||||
return FALSE;
|
||||
return TAP_PACKET_DONT_REDRAW;
|
||||
}
|
||||
|
||||
/* Don't store details at a lesser severity than we are interested in */
|
||||
if (severity_level < lowest_report_level) {
|
||||
return TRUE;
|
||||
return TAP_PACKET_REDRAW; /* XXX - TAP_PACKET_DONT_REDRAW? */
|
||||
}
|
||||
|
||||
/* If a duplicate just bump up frequency.
|
||||
|
@ -114,7 +114,7 @@ expert_stat_packet(void *tapdata, packet_info *pinfo _U_, epan_dissect_t *edt _U
|
|||
if ((strcmp(ei->protocol, entry->protocol) == 0) &&
|
||||
(strcmp(ei->summary, entry->summary) == 0)) {
|
||||
entry->frequency++;
|
||||
return TRUE;
|
||||
return TAP_PACKET_REDRAW;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -128,7 +128,7 @@ expert_stat_packet(void *tapdata, packet_info *pinfo _U_, epan_dissect_t *edt _U
|
|||
/* Store a copy of the expert entry */
|
||||
g_array_append_val(data->ei_array[severity_level], tmp_entry);
|
||||
|
||||
return TRUE;
|
||||
return TAP_PACKET_REDRAW;
|
||||
}
|
||||
|
||||
/* Output for all of the items of one severity */
|
||||
|
|
|
@ -45,7 +45,7 @@ typedef struct _gsm_a_stat_t {
|
|||
} gsm_a_stat_t;
|
||||
|
||||
|
||||
static int
|
||||
static tap_packet_status
|
||||
gsm_a_stat_packet(
|
||||
void *tapdata,
|
||||
packet_info *pinfo _U_,
|
||||
|
@ -92,7 +92,7 @@ gsm_a_stat_packet(
|
|||
/*
|
||||
* unsupported PD
|
||||
*/
|
||||
return(0);
|
||||
return(TAP_PACKET_DONT_REDRAW);
|
||||
}
|
||||
break;
|
||||
|
||||
|
@ -112,10 +112,10 @@ gsm_a_stat_packet(
|
|||
/*
|
||||
* unknown PDU type !!!
|
||||
*/
|
||||
return(0);
|
||||
return(TAP_PACKET_DONT_REDRAW);
|
||||
}
|
||||
|
||||
return(1);
|
||||
return(TAP_PACKET_REDRAW);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -197,7 +197,7 @@ httpstat_reset(void *psp )
|
|||
|
||||
}
|
||||
|
||||
static int
|
||||
static tap_packet_status
|
||||
httpstat_packet(void *psp , packet_info *pinfo _U_, epan_dissect_t *edt _U_, const void *pri)
|
||||
{
|
||||
const http_info_value_t *value = (const http_info_value_t *)pri;
|
||||
|
@ -218,7 +218,7 @@ httpstat_packet(void *psp , packet_info *pinfo _U_, epan_dissect_t *edt _U_, con
|
|||
*/
|
||||
int i = value->response_code;
|
||||
if ((i < 100) || (i >= 600)) {
|
||||
return 0;
|
||||
return TAP_PACKET_DONT_REDRAW;
|
||||
}
|
||||
else if (i < 200) {
|
||||
key = 199; /* Hopefully, this status code will never be used */
|
||||
|
@ -239,7 +239,7 @@ httpstat_packet(void *psp , packet_info *pinfo _U_, epan_dissect_t *edt _U_, con
|
|||
sp->hash_responses,
|
||||
GUINT_TO_POINTER(key));
|
||||
if (sc == NULL)
|
||||
return 0;
|
||||
return TAP_PACKET_DONT_REDRAW;
|
||||
}
|
||||
sc->packets++;
|
||||
}
|
||||
|
@ -259,9 +259,9 @@ httpstat_packet(void *psp , packet_info *pinfo _U_, epan_dissect_t *edt _U_, con
|
|||
sc->packets++;
|
||||
}
|
||||
} else {
|
||||
return 0;
|
||||
return TAP_PACKET_DONT_REDRAW;
|
||||
}
|
||||
return 1;
|
||||
return TAP_PACKET_REDRAW;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -102,10 +102,10 @@ static gint compare_doubles(gconstpointer a, gconstpointer b)
|
|||
* "icmp" tap, the third parameter type is icmp_transaction_t.
|
||||
*
|
||||
* function returns :
|
||||
* FALSE: no updates, no need to call (*draw) later
|
||||
* TRUE: state has changed, call (*draw) sometime later
|
||||
* TAP_PACKET_DONT_REDRAW: no updates, no need to call (*draw) later
|
||||
* TAP_PACKET_REDRAW: state has changed, call (*draw) sometime later
|
||||
*/
|
||||
static gboolean
|
||||
static tap_packet_status
|
||||
icmpstat_packet(void *tapdata, packet_info *pinfo _U_, epan_dissect_t *edt _U_, const void *data)
|
||||
{
|
||||
icmpstat_t *icmpstat = (icmpstat_t *)tapdata;
|
||||
|
@ -113,13 +113,13 @@ icmpstat_packet(void *tapdata, packet_info *pinfo _U_, epan_dissect_t *edt _U_,
|
|||
double resp_time, *rt;
|
||||
|
||||
if (trans == NULL)
|
||||
return FALSE;
|
||||
return TAP_PACKET_DONT_REDRAW;
|
||||
|
||||
if (trans->resp_frame) {
|
||||
resp_time = nstime_to_msec(&trans->resp_time);
|
||||
rt = g_new(double, 1);
|
||||
if (rt == NULL)
|
||||
return FALSE;
|
||||
return TAP_PACKET_DONT_REDRAW;
|
||||
*rt = resp_time;
|
||||
icmpstat->rt_list = g_slist_prepend(icmpstat->rt_list, rt);
|
||||
icmpstat->num_resps++;
|
||||
|
@ -135,9 +135,9 @@ icmpstat_packet(void *tapdata, packet_info *pinfo _U_, epan_dissect_t *edt _U_,
|
|||
} else if (trans->rqst_frame)
|
||||
icmpstat->num_rqsts++;
|
||||
else
|
||||
return FALSE;
|
||||
return TAP_PACKET_DONT_REDRAW;
|
||||
|
||||
return TRUE;
|
||||
return TAP_PACKET_REDRAW;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -103,10 +103,10 @@ static gint compare_doubles(gconstpointer a, gconstpointer b)
|
|||
* "icmpv6" tap, the third parameter type is icmp_transaction_t.
|
||||
*
|
||||
* function returns :
|
||||
* FALSE: no updates, no need to call (*draw) later
|
||||
* TRUE: state has changed, call (*draw) sometime later
|
||||
* TAP_PACKET_DONT_REDRAW: no updates, no need to call (*draw) later
|
||||
* TAP_PACKET_REDRAW: state has changed, call (*draw) sometime later
|
||||
*/
|
||||
static gboolean
|
||||
static tap_packet_status
|
||||
icmpv6stat_packet(void *tapdata, packet_info *pinfo _U_, epan_dissect_t *edt _U_, const void *data)
|
||||
{
|
||||
icmpv6stat_t *icmpv6stat = (icmpv6stat_t *)tapdata;
|
||||
|
@ -114,13 +114,13 @@ icmpv6stat_packet(void *tapdata, packet_info *pinfo _U_, epan_dissect_t *edt _U_
|
|||
double resp_time, *rt;
|
||||
|
||||
if (trans == NULL)
|
||||
return FALSE;
|
||||
return TAP_PACKET_DONT_REDRAW;
|
||||
|
||||
if (trans->resp_frame) {
|
||||
resp_time = nstime_to_msec(&trans->resp_time);
|
||||
rt = g_new(double, 1);
|
||||
if (rt == NULL)
|
||||
return FALSE;
|
||||
return TAP_PACKET_DONT_REDRAW;
|
||||
*rt = resp_time;
|
||||
icmpv6stat->rt_list = g_slist_prepend(icmpv6stat->rt_list, rt);
|
||||
icmpv6stat->num_resps++;
|
||||
|
@ -136,9 +136,9 @@ icmpv6stat_packet(void *tapdata, packet_info *pinfo _U_, epan_dissect_t *edt _U_
|
|||
} else if (trans->rqst_frame)
|
||||
icmpv6stat->num_rqsts++;
|
||||
else
|
||||
return FALSE;
|
||||
return TAP_PACKET_DONT_REDRAW;
|
||||
|
||||
return TRUE;
|
||||
return TAP_PACKET_REDRAW;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -78,7 +78,7 @@ typedef struct _io_stat_item_t {
|
|||
|
||||
static guint64 last_relative_time;
|
||||
|
||||
static int
|
||||
static tap_packet_status
|
||||
iostat_packet(void *arg, packet_info *pinfo, epan_dissect_t *edt, const void *dummy _U_)
|
||||
{
|
||||
io_stat_t *parent;
|
||||
|
@ -506,7 +506,7 @@ iostat_packet(void *arg, packet_info *pinfo, epan_dissect_t *edt, const void *du
|
|||
break;
|
||||
}
|
||||
}
|
||||
return TRUE;
|
||||
return TAP_PACKET_REDRAW;
|
||||
}
|
||||
|
||||
static int
|
||||
|
|
|
@ -207,7 +207,7 @@ static void update_ueid_rnti_counts(guint16 rnti, guint16 ueid, mac_lte_stat_t *
|
|||
|
||||
|
||||
/* Process stat struct for a MAC LTE frame */
|
||||
static int
|
||||
static tap_packet_status
|
||||
mac_lte_stat_packet(void *phs, packet_info *pinfo, epan_dissect_t *edt _U_,
|
||||
const void *phi)
|
||||
{
|
||||
|
@ -220,7 +220,7 @@ mac_lte_stat_packet(void *phs, packet_info *pinfo, epan_dissect_t *edt _U_,
|
|||
const struct mac_lte_tap_info *si = (const struct mac_lte_tap_info *)phi;
|
||||
|
||||
if (!hs) {
|
||||
return 0;
|
||||
return TAP_PACKET_DONT_REDRAW;
|
||||
}
|
||||
|
||||
hs->common_stats.all_frames++;
|
||||
|
@ -231,18 +231,18 @@ mac_lte_stat_packet(void *phs, packet_info *pinfo, epan_dissect_t *edt _U_,
|
|||
hs->common_stats.pch_frames++;
|
||||
hs->common_stats.pch_bytes += si->single_number_of_bytes;
|
||||
hs->common_stats.pch_paging_ids += si->number_of_paging_ids;
|
||||
return 1;
|
||||
return TAP_PACKET_REDRAW;
|
||||
case SI_RNTI:
|
||||
hs->common_stats.sib_frames++;
|
||||
hs->common_stats.sib_bytes += si->single_number_of_bytes;
|
||||
return 1;
|
||||
return TAP_PACKET_REDRAW;
|
||||
case NO_RNTI:
|
||||
hs->common_stats.mib_frames++;
|
||||
return 1;
|
||||
return TAP_PACKET_REDRAW;
|
||||
case RA_RNTI:
|
||||
hs->common_stats.rar_frames++;
|
||||
hs->common_stats.rar_entries += si->number_of_rars;
|
||||
return 1;
|
||||
return TAP_PACKET_REDRAW;
|
||||
case C_RNTI:
|
||||
case SPS_RNTI:
|
||||
/* Drop through for per-UE update */
|
||||
|
@ -250,7 +250,7 @@ mac_lte_stat_packet(void *phs, packet_info *pinfo, epan_dissect_t *edt _U_,
|
|||
|
||||
default:
|
||||
/* Error */
|
||||
return 0;
|
||||
return TAP_PACKET_DONT_REDRAW;
|
||||
}
|
||||
|
||||
/* Check max UEs/tti counter */
|
||||
|
@ -304,7 +304,7 @@ mac_lte_stat_packet(void *phs, packet_info *pinfo, epan_dissect_t *edt _U_,
|
|||
|
||||
/* Really should have a row pointer by now */
|
||||
if (!te) {
|
||||
return 0;
|
||||
return TAP_PACKET_DONT_REDRAW;
|
||||
}
|
||||
|
||||
/* Update entry with details from si */
|
||||
|
@ -315,12 +315,12 @@ mac_lte_stat_packet(void *phs, packet_info *pinfo, epan_dissect_t *edt _U_,
|
|||
if (si->direction == DIRECTION_UPLINK) {
|
||||
if (si->isPHYRetx) {
|
||||
te->stats.UL_retx_frames++;
|
||||
return 1;
|
||||
return TAP_PACKET_REDRAW;
|
||||
}
|
||||
|
||||
if (si->crcStatusValid && (si->crcStatus != crc_success)) {
|
||||
te->stats.UL_CRC_errors++;
|
||||
return 1;
|
||||
return TAP_PACKET_REDRAW;
|
||||
}
|
||||
|
||||
/* Update time range */
|
||||
|
@ -348,7 +348,7 @@ mac_lte_stat_packet(void *phs, packet_info *pinfo, epan_dissect_t *edt _U_,
|
|||
else {
|
||||
if (si->isPHYRetx) {
|
||||
te->stats.DL_retx_frames++;
|
||||
return 1;
|
||||
return TAP_PACKET_REDRAW;
|
||||
}
|
||||
|
||||
if (si->crcStatusValid && (si->crcStatus != crc_success)) {
|
||||
|
@ -370,7 +370,7 @@ mac_lte_stat_packet(void *phs, packet_info *pinfo, epan_dissect_t *edt _U_,
|
|||
/* Something went wrong! */
|
||||
break;
|
||||
}
|
||||
return 1;
|
||||
return TAP_PACKET_REDRAW;
|
||||
}
|
||||
|
||||
/* Update time range */
|
||||
|
@ -395,7 +395,7 @@ mac_lte_stat_packet(void *phs, packet_info *pinfo, epan_dissect_t *edt _U_,
|
|||
|
||||
}
|
||||
|
||||
return 1;
|
||||
return TAP_PACKET_REDRAW;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -31,7 +31,7 @@ typedef struct _pci_t {
|
|||
} pci_t;
|
||||
|
||||
|
||||
static int
|
||||
static tap_packet_status
|
||||
protocolinfo_packet(void *prs, packet_info *pinfo, epan_dissect_t *edt, const void *dummy _U_)
|
||||
{
|
||||
pci_t *rs = (pci_t *)prs;
|
||||
|
@ -48,6 +48,8 @@ protocolinfo_packet(void *prs, packet_info *pinfo, epan_dissect_t *edt, const vo
|
|||
*
|
||||
* To prevent a crash, we check whether INFO column is writable
|
||||
* and, if not, we report that error and exit.
|
||||
*
|
||||
* XXX - report the error and just return TAP_PACKET_FAILED?
|
||||
*/
|
||||
if (!col_get_writable(pinfo->cinfo, COL_INFO)) {
|
||||
cmdarg_err("the proto,colinfo tap doesn't work if the INFO column isn't being printed.");
|
||||
|
@ -55,7 +57,7 @@ protocolinfo_packet(void *prs, packet_info *pinfo, epan_dissect_t *edt, const vo
|
|||
}
|
||||
gp = proto_get_finfo_ptr_array(edt->tree, rs->hf_index);
|
||||
if (!gp) {
|
||||
return 0;
|
||||
return TAP_PACKET_DONT_REDRAW;
|
||||
}
|
||||
|
||||
for (i=0; i<gp->len; i++) {
|
||||
|
@ -65,7 +67,7 @@ protocolinfo_packet(void *prs, packet_info *pinfo, epan_dissect_t *edt, const vo
|
|||
wmem_free(NULL, str);
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
return TAP_PACKET_DONT_REDRAW;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -53,7 +53,7 @@ new_phs_t(phs_t *parent)
|
|||
}
|
||||
|
||||
|
||||
static int
|
||||
static tap_packet_status
|
||||
protohierstat_packet(void *prs, packet_info *pinfo, epan_dissect_t *edt, const void *dummy _U_)
|
||||
{
|
||||
phs_t *rs = (phs_t *)prs;
|
||||
|
@ -62,13 +62,13 @@ protohierstat_packet(void *prs, packet_info *pinfo, epan_dissect_t *edt, const v
|
|||
field_info *fi;
|
||||
|
||||
if (!edt) {
|
||||
return 0;
|
||||
return TAP_PACKET_DONT_REDRAW;
|
||||
}
|
||||
if (!edt->tree) {
|
||||
return 0;
|
||||
return TAP_PACKET_DONT_REDRAW;
|
||||
}
|
||||
if (!edt->tree->first_child) {
|
||||
return 0;
|
||||
return TAP_PACKET_DONT_REDRAW;
|
||||
}
|
||||
|
||||
for (node=edt->tree->first_child; node; node=node->next) {
|
||||
|
@ -112,7 +112,7 @@ protohierstat_packet(void *prs, packet_info *pinfo, epan_dissect_t *edt, const v
|
|||
}
|
||||
rs = rs->child;
|
||||
}
|
||||
return 1;
|
||||
return TAP_PACKET_REDRAW;
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
|
@ -151,7 +151,7 @@ static rlc_lte_ep_t *alloc_rlc_lte_ep(const struct rlc_lte_tap_info *si, packet_
|
|||
|
||||
|
||||
/* Process stat struct for a RLC LTE frame */
|
||||
static int
|
||||
static tap_packet_status
|
||||
rlc_lte_stat_packet(void *phs, packet_info *pinfo, epan_dissect_t *edt _U_,
|
||||
const void *phi)
|
||||
{
|
||||
|
@ -164,7 +164,7 @@ rlc_lte_stat_packet(void *phs, packet_info *pinfo, epan_dissect_t *edt _U_,
|
|||
|
||||
/* Need this */
|
||||
if (!hs) {
|
||||
return 0;
|
||||
return TAP_PACKET_DONT_REDRAW;
|
||||
}
|
||||
|
||||
/* Inc top-level frame count */
|
||||
|
@ -176,12 +176,12 @@ rlc_lte_stat_packet(void *phs, packet_info *pinfo, epan_dissect_t *edt _U_,
|
|||
case CHANNEL_TYPE_BCCH_DL_SCH:
|
||||
hs->common_stats.bcch_frames++;
|
||||
hs->common_stats.bcch_bytes += si->pduLength;
|
||||
return 1;
|
||||
return TAP_PACKET_REDRAW;
|
||||
|
||||
case CHANNEL_TYPE_PCCH:
|
||||
hs->common_stats.pcch_frames++;
|
||||
hs->common_stats.pcch_bytes += si->pduLength;
|
||||
return 1;
|
||||
return TAP_PACKET_REDRAW;
|
||||
|
||||
default:
|
||||
break;
|
||||
|
@ -218,7 +218,7 @@ rlc_lte_stat_packet(void *phs, packet_info *pinfo, epan_dissect_t *edt _U_,
|
|||
|
||||
/* Really should have a row pointer by now */
|
||||
if (!te) {
|
||||
return 0;
|
||||
return TAP_PACKET_DONT_REDRAW;
|
||||
}
|
||||
|
||||
/* Update entry with details from si */
|
||||
|
@ -262,7 +262,7 @@ rlc_lte_stat_packet(void *phs, packet_info *pinfo, epan_dissect_t *edt _U_,
|
|||
te->stats.DL_total_missing += si->missingSNs;
|
||||
}
|
||||
|
||||
return 1;
|
||||
return TAP_PACKET_REDRAW;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -46,7 +46,7 @@ typedef struct _rpc_program_t {
|
|||
static rpc_program_t *prog_list = NULL;
|
||||
static int already_enabled = 0;
|
||||
|
||||
static int
|
||||
static tap_packet_status
|
||||
rpcprogs_packet(void *dummy1 _U_, packet_info *pinfo, epan_dissect_t *edt _U_, const void *pri)
|
||||
{
|
||||
const rpc_call_info_value *ri = (const rpc_call_info_value *)pri;
|
||||
|
@ -120,7 +120,7 @@ rpcprogs_packet(void *dummy1 _U_, packet_info *pinfo, epan_dissect_t *edt _U_, c
|
|||
|
||||
/* we are only interested in reply packets */
|
||||
if (ri->request || !rp) {
|
||||
return 0;
|
||||
return TAP_PACKET_DONT_REDRAW;
|
||||
}
|
||||
|
||||
/* calculate time delta between request and reply */
|
||||
|
@ -160,7 +160,7 @@ rpcprogs_packet(void *dummy1 _U_, packet_info *pinfo, epan_dissect_t *edt _U_, c
|
|||
}
|
||||
rp->num++;
|
||||
|
||||
return 1;
|
||||
return TAP_PACKET_REDRAW;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -126,7 +126,7 @@ rtspstat_reset(void *psp )
|
|||
|
||||
}
|
||||
|
||||
static int
|
||||
static tap_packet_status
|
||||
rtspstat_packet(void *psp , packet_info *pinfo _U_, epan_dissect_t *edt _U_, const void *pri)
|
||||
{
|
||||
const rtsp_info_value_t *value = (const rtsp_info_value_t *)pri;
|
||||
|
@ -147,7 +147,7 @@ rtspstat_packet(void *psp , packet_info *pinfo _U_, epan_dissect_t *edt _U_, con
|
|||
*/
|
||||
int i = value->response_code;
|
||||
if ((i < 100) || (i >= 600)) {
|
||||
return 0;
|
||||
return TAP_PACKET_DONT_REDRAW;
|
||||
}
|
||||
else if (i < 200) {
|
||||
key = 199; /* Hopefully, this status code will never be used */
|
||||
|
@ -168,7 +168,7 @@ rtspstat_packet(void *psp , packet_info *pinfo _U_, epan_dissect_t *edt _U_, con
|
|||
sp->hash_responses,
|
||||
GINT_TO_POINTER(key));
|
||||
if (sc == NULL)
|
||||
return 0;
|
||||
return TAP_PACKET_DONT_REDRAW;
|
||||
}
|
||||
sc->packets++;
|
||||
}
|
||||
|
@ -188,9 +188,9 @@ rtspstat_packet(void *psp , packet_info *pinfo _U_, epan_dissect_t *edt _U_, con
|
|||
sc->packets++;
|
||||
}
|
||||
} else {
|
||||
return 0;
|
||||
return TAP_PACKET_DONT_REDRAW;
|
||||
}
|
||||
return 1;
|
||||
return TAP_PACKET_REDRAW;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -92,7 +92,7 @@ alloc_sctp_ep(const struct _sctp_info *si)
|
|||
|
||||
|
||||
|
||||
static int
|
||||
static tap_packet_status
|
||||
sctpstat_packet(void *phs, packet_info *pinfo _U_, epan_dissect_t *edt _U_, const void *phi)
|
||||
{
|
||||
|
||||
|
@ -103,7 +103,7 @@ sctpstat_packet(void *phs, packet_info *pinfo _U_, epan_dissect_t *edt _U_, cons
|
|||
guint8 chunk_type;
|
||||
|
||||
if (!hs)
|
||||
return (0);
|
||||
return (TAP_PACKET_DONT_REDRAW);
|
||||
|
||||
hs->number_of_packets++;
|
||||
|
||||
|
@ -131,7 +131,7 @@ sctpstat_packet(void *phs, packet_info *pinfo _U_, epan_dissect_t *edt _U_, cons
|
|||
}
|
||||
|
||||
if (!te)
|
||||
return (0);
|
||||
return (TAP_PACKET_DONT_REDRAW);
|
||||
|
||||
|
||||
if (si->number_of_tvbs > 0) {
|
||||
|
@ -144,7 +144,7 @@ sctpstat_packet(void *phs, packet_info *pinfo _U_, epan_dissect_t *edt _U_, cons
|
|||
te->chunk_count[CHUNK_TYPE(si->tvb[tvb_number])]++;
|
||||
}
|
||||
}
|
||||
return (1);
|
||||
return (TAP_PACKET_REDRAW);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -248,7 +248,7 @@ sipstat_reset(void *psp )
|
|||
|
||||
|
||||
/* Main entry point to SIP tap */
|
||||
static int
|
||||
static tap_packet_status
|
||||
sipstat_packet(void *psp, packet_info *pinfo _U_, epan_dissect_t *edt _U_, const void *pri)
|
||||
{
|
||||
const sip_info_value_t *value = (const sip_info_value_t *)pri;
|
||||
|
@ -306,7 +306,7 @@ sipstat_packet(void *psp, packet_info *pinfo _U_, epan_dissect_t *edt _U_, const
|
|||
if ((i < 100) || (i >= 700))
|
||||
{
|
||||
/* Forget about crazy values */
|
||||
return 0;
|
||||
return TAP_PACKET_DONT_REDRAW;
|
||||
}
|
||||
else if (i < 200)
|
||||
{
|
||||
|
@ -337,7 +337,7 @@ sipstat_packet(void *psp, packet_info *pinfo _U_, epan_dissect_t *edt _U_, const
|
|||
sc = (sip_response_code_t *)g_hash_table_lookup(sp->hash_responses, &key);
|
||||
if (sc == NULL)
|
||||
{
|
||||
return 0;
|
||||
return TAP_PACKET_DONT_REDRAW;
|
||||
}
|
||||
}
|
||||
sc->packets++;
|
||||
|
@ -369,10 +369,10 @@ sipstat_packet(void *psp, packet_info *pinfo _U_, epan_dissect_t *edt _U_, const
|
|||
else
|
||||
{
|
||||
/* No request method set. Just ignore */
|
||||
return 0;
|
||||
return TAP_PACKET_DONT_REDRAW;
|
||||
}
|
||||
|
||||
return 1;
|
||||
return TAP_PACKET_REDRAW;
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
|
@ -27,10 +27,10 @@
|
|||
|
||||
void register_tap_listener_smbsids(void);
|
||||
|
||||
static int
|
||||
static tap_packet_status
|
||||
smbsids_packet(void *pss _U_, packet_info *pinfo _U_, epan_dissect_t *edt _U_, const void *psi _U_)
|
||||
{
|
||||
return 1;
|
||||
return TAP_PACKET_REDRAW;
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
|
||||
void register_tap_listener_sv(void);
|
||||
|
||||
static int
|
||||
static tap_packet_status
|
||||
sv_packet(void *prs _U_, packet_info *pinfo, epan_dissect_t *edt _U_, const void *pri)
|
||||
{
|
||||
int i;
|
||||
|
@ -40,7 +40,7 @@ sv_packet(void *prs _U_, packet_info *pinfo, epan_dissect_t *edt _U_, const void
|
|||
|
||||
printf("\n");
|
||||
|
||||
return 0;
|
||||
return TAP_PACKET_DONT_REDRAW;
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue