/* tap-protohierstat.c
* protohierstat 2002 Ronnie Sahlberg
*
- * $Id: tap-protohierstat.c,v 1.4 2003/11/24 22:11:53 guy Exp $
+ * $Id$
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
#include "epan/packet_info.h"
#include "epan/epan_dissect.h"
#include "epan/proto.h"
-#include "tap.h"
+#include <epan/tap.h>
#include "register.h"
typedef struct _phs_t {
if(!edt->tree){
return 0;
}
- if(!edt->tree->children){
+ if(!edt->tree->first_child){
return 0;
}
- for(tree=edt->tree->children;tree;tree=tree->next){
+ for(tree=edt->tree->first_child;tree;tree=tree->next){
fi=PITEM_FINFO(tree);
/* first time we saw a protocol at this leaf */
if(rs->protocol==-1){
- rs->protocol=fi->ptr_u.hfinfo->id;
- rs->proto_name=fi->ptr_u.hfinfo->abbrev;
+ rs->protocol=fi->hfinfo->id;
+ rs->proto_name=fi->hfinfo->abbrev;
rs->frames=1;
rs->bytes=pinfo->fd->pkt_len;
rs->child=new_phs_t(rs);
/* find this protocol in the list of siblings */
for(tmprs=rs;tmprs;tmprs=tmprs->sibling){
- if(tmprs->protocol==fi->ptr_u.hfinfo->id){
+ if(tmprs->protocol==fi->hfinfo->id){
break;
}
}
;
tmprs->sibling=new_phs_t(rs->parent);
rs=tmprs->sibling;
- rs->protocol=fi->ptr_u.hfinfo->id;
- rs->proto_name=fi->ptr_u.hfinfo->abbrev;
+ rs->protocol=fi->hfinfo->id;
+ rs->proto_name=fi->hfinfo->abbrev;
} else {
rs=tmprs;
}