# call.mate
-# $Id: $
+# $Id$
Action=Settings; DiscardPduData=TRUE; ShowGopTimes=FALSE; ShowPduTree=FALSE;
# mms.mate
-# $Id: $
+# $Id$
# MMSE over HTTP
Action=PduDef; Name=mmse_over_http_pdu; Proto=http; Transport=tcp/ip; Payload=mmse; addr=ip.addr; port=tcp.port; http_rq=http.request; content=http.content_type;
-
+# pasv_ftp.mate
+# $Id $
Action=PduDef; Name=ftp_pdu; Proto=ftp; Transport=tcp/ip; Stop=TRUE; ftp_addr=ip.addr; ftp_port=tcp.port; ftp_resp=ftp.response.code; ftp_req=ftp.request.command; server_addr=ftp.passive.ip; server_port=ftp.passive.port;
Action=PduDef; Name=ftp_data_pdu; Proto=ftp-data; Transport=tcp/ip; server_addr=ip.src; server_port=tcp.srcport;
+# tcp.mate
+# $Id $
Action=PduDef; Name=tcp_pdu; Proto=tcp; Transport=ip; addr=ip.addr; port=tcp.port; tcp_start=tcp.flags.syn; tcp_stop=tcp.flags.fin; tcp_stop=tcp.flags.reset;
Action=GopDef; Name=tcp_session; On=tcp_pdu; addr; addr; port; port;
Action=GopStart; For=tcp_session; tcp_start=1;
-
+# web.mate
+# $Id $
Action=PduDef; Name=dns_pdu; Proto=dns; Transport=ip; addr=ip.addr; dns_resp=dns.flags.response; host=dns.qry.name; client_addr=ip.src; dns_id=dns.id;
Action=PduDef; Name=http_pdu; Proto=http; Transport=tcp/ip; addr=ip.addr; port=tcp.port; http_rq=http.request.method; http_rs=http.response; host=http.host; client_addr=ip.src;
#define KEYWORD_ACCEPT "Accept"
#define KEYWORD_REJECT "Reject"
#define KEYWORD_NOTREE "NoTree"
+#define KEYWORD_BASICTREE "BasicTree"
+#define KEYWORD_FULLTREE "FullTree"
#define KEYWORD_PDUTREE "PduTree"
#define KEYWORD_FRAMETREE "FrameTree"
#define KEYWORD_GOPEXPIRATION "GopExpiration"
GHashTable* gog_index;
/* gog */
- gboolean gop_as_subtree;
+ guint8* gop_as_subtree;
LoAL* keys;
int hfid_gog_num_of_gops;
int hfid_gog_gop;
int hfid_gog_gopstart;
+ int hfid_gog_gopstop;
gint ett_gog_gop;
} mate_cfg_item;
gboolean last_to_be_created;
avpl_match_mode match_mode;
avpl_replace_mode replace_mode;
- gboolean gop_as_subtree;
+ guint8* gop_as_subtree;
int hfid_mate;
float gop_expiration;
float gop_idle_timeout;
float gop_lifetime;
+ /* text "constants" */
guint8* accept;
guint8* reject;
-
guint8* no_tree;
guint8* frame_tree;
guint8* pdu_tree;
+ guint8* full_tree;
+ guint8* basic_tree;
/* what to dbgprint */
int dbg_lvl;
new->gop_index = NULL;
new->gog_index = NULL;
- new->gop_as_subtree = FALSE;
+ new->gop_as_subtree = NULL;
new->keys = NULL;
new->hfid_gog_num_of_gops = -1;
new->hfid_gog_gop = -1;
cfg = new_gogcfg(name);
cfg->expiration = extract_named_float(avpl, KEYWORD_GOGEXPIRE,matecfg->gog_expiration);
- cfg->gop_as_subtree = extract_named_bool(avpl, KEYWORD_GOPTREE,matecfg->gop_as_subtree);
+ cfg->gop_as_subtree = extract_named_str(avpl, KEYWORD_GOPTREE,matecfg->gop_as_subtree);
return TRUE;
}
}
cfg->expiration = extract_named_float(avpl, KEYWORD_GOGEXPIRE,cfg->expiration);
- cfg->gop_as_subtree = extract_named_bool(avpl, KEYWORD_GOPTREE,cfg->gop_as_subtree);
+ cfg->gop_as_subtree = extract_named_str(avpl, KEYWORD_GOPTREE,cfg->gop_as_subtree);
merge_avpl(cfg->extra,avpl,TRUE);
g_array_append_val(matecfg->hfrs,hfri);
+ hfri.p_id = &(cfg->hfid_gog_gopstop);
+ hfri.hfinfo.name = "GopStop frame";
+ hfri.hfinfo.abbrev = g_strdup_printf("mate.%s.GopStop",cfg->name);
+ hfri.hfinfo.type = FT_FRAMENUM;
+ hfri.hfinfo.display = BASE_DEC;
+ hfri.hfinfo.blurb = g_strdup("The stop frame of a GOP");
+
+ g_array_append_val(matecfg->hfrs,hfri);
+
hfri.p_id = &(cfg->hfid_start_time);
hfri.hfinfo.name = g_strdup_printf("%s start time",cfg->name);
hfri.hfinfo.abbrev = g_strdup_printf("mate.%s.StartTime",cfg->name);
matecfg->pdu_tree = avp->n;
insert_avp(all_keywords,avp);
+ avp = new_avp(KEYWORD_BASICTREE,"",'=');
+ matecfg->basic_tree = avp->n;
+ insert_avp(all_keywords,avp);
+
+ avp = new_avp(KEYWORD_FULLTREE,"",'=');
+ matecfg->full_tree = avp->n;
+ insert_avp(all_keywords,avp);
+
if (actions) {
g_hash_table_destroy(actions);
}
init_actions();
matecfg->show_pdu_tree = matecfg->frame_tree;
-
+ matecfg->gop_as_subtree = matecfg->basic_tree;
+
config_error = g_string_new("");
if ( mate_load_config(filename) ) {
static proto_item *mate_i = NULL;
-void attrs_tree(proto_tree* tree, tvbuff_t *tvb,mate_item* item) {
+void attrs_tree(proto_tree* tree, tvbuff_t *tvb, mate_item* item) {
AVPN* c;
proto_item *avpl_i;
proto_tree *avpl_t;
mate_gop* gog_gops;
proto_item *gog_gop_item;
proto_tree *gog_gop_tree;
-
+ mate_pdu* pdu;
+
#ifdef _MATE_DEBUGGING
proto_item* gog_key_item;
proto_tree* gog_key_tree;
for (gog_gops = gog->gops; gog_gops; gog_gops = gog_gops->next) {
if (gop != gog_gops) {
- if (gog->cfg->gop_as_subtree) {
+ if (gog->cfg->gop_as_subtree == mc->full_tree) {
mate_gop_tree(gog_gops_tree, tvb, gog_gops);
} else {
gog_gop_item = proto_tree_add_uint(gog_gops_tree,gog_gops->cfg->hfid,tvb,0,0,gog_gops->id);
- if (gop->pdus && gop->cfg->show_pdu_tree == mc->frame_tree) {
+ if (gog->cfg->gop_as_subtree == mc->basic_tree) {
gog_gop_tree = proto_item_add_subtree(gog_gop_item, gog->cfg->ett_gog_gop);
- proto_tree_add_uint(gog_gop_tree,gog->cfg->hfid_gog_gopstart,tvb,0,0,gog_gops->pdus->frame);
+
+ proto_tree_add_text(gog_gop_tree, tvb,0,0, "Started at: %f", gog_gops->start_time);
+
+
+ proto_tree_add_text(gog_gop_tree, tvb,0,0, "%s Duration: %f",
+ gog_gops->cfg->name, gog_gops->last_time - gog_gops->start_time);
+
+ if (gog_gops->released)
+ proto_tree_add_text(gog_gop_tree, tvb,0,0, "%s has been released, Time: %f",
+ gog_gops->cfg->name, gog_gops->release_time - gog_gops->start_time);
+
+ proto_tree_add_text(gog_gop_tree, tvb,0,0, "Number of Pdus: %u",gog_gops->num_of_pdus);
+
+ if (gop->pdus && gop->cfg->show_pdu_tree == mc->frame_tree) {
+ proto_tree_add_uint(gog_gop_tree,gog->cfg->hfid_gog_gopstart,tvb,0,0,gog_gops->pdus->frame);
+
+ for (pdu = gog_gops->pdus->next ; pdu; pdu = pdu->next) {
+ if (pdu->is_stop) {
+ proto_tree_add_uint(gog_gop_tree,gog->cfg->hfid_gog_gopstop,tvb,0,0,pdu->frame);
+ break;
+ }
+ }
+ }
}
}
} else {
- proto_tree_add_uint_format(gog_gops_tree,gop->cfg->hfid,tvb,0,0,gop->id,"%s of current frame: %d",gop->cfg->name,gop->id);
+ proto_tree_add_uint_format(gog_gops_tree,gop->cfg->hfid,tvb,0,0,gop->id,"current %s Gop: %d",gop->cfg->name,gop->id);
}
}
}