#include "config.h"
-#include <epan/emem.h>
-
#include "gcp.h"
static wmem_tree_t* msgs = NULL;
gcp_msg_t* gcp_msg(packet_info* pinfo, int o, gboolean keep_persistent_data) {
gcp_msg_t* m;
- guint32 framenum = (guint32)pinfo->fd->num;
+ guint32 framenum = (guint32)pinfo->num;
guint32 offset = (guint32)o;
address* src = &(pinfo->src);
address* dst = &(pinfo->dst);
} else {
m = wmem_new(wmem_file_scope(), gcp_msg_t);
m->framenum = framenum;
- m->time = pinfo->fd->abs_ts;
+ m->time = pinfo->abs_ts;
m->trxs = NULL;
m->committed = FALSE;
m->committed = FALSE;
}
- if (CMP_ADDRESS(src, dst) < 0) {
+ if (cmp_address(src, dst) < 0) {
lo_addr = src;
hi_addr = dst;
} else {
cmd->terms.last = &(cmd->terms);
cmd->str = NULL;
cmd->msg = m;
+ if ((type != GCP_CMD_NONE) && (!persistent)){
+ cmd->str = val_to_str_const(type, gcp_cmd_type, "Unknown");
+ }
cmd->trx = t;
cmd->ctx = c;
cmd->error = 0;