diff options
author | Kovarththanan Rajaratnam <kovarththanan.rajaratnam@gmail.com> | 2009-09-08 14:59:26 +0000 |
---|---|---|
committer | Kovarththanan Rajaratnam <kovarththanan.rajaratnam@gmail.com> | 2009-09-08 14:59:26 +0000 |
commit | d75778eb4a460f1a15bebd5bd0400652cd01b1d7 (patch) | |
tree | 57f24da830d26f3e3d8a75ff0df24a856b9ab7fc | |
parent | b8fba82f4c1d2bb2ee73d2193a0f3674a7ea58fa (diff) | |
download | wireshark-d75778eb4a460f1a15bebd5bd0400652cd01b1d7.tar.gz wireshark-d75778eb4a460f1a15bebd5bd0400652cd01b1d7.tar.bz2 wireshark-d75778eb4a460f1a15bebd5bd0400652cd01b1d7.zip |
Custom columnfication:
* Deprecate COL_DCE_CTX ("Context ID). Use dcerpc.cn_ctx_id
svn path=/trunk/; revision=29797
-rw-r--r-- | epan/column-utils.c | 3 | ||||
-rw-r--r-- | epan/column_info.h | 2 | ||||
-rw-r--r-- | epan/dissectors/packet-dcerpc.c | 41 | ||||
-rw-r--r-- | epan/prefs.c | 3 | ||||
-rw-r--r-- | gtk/main_packet_list.c | 33 | ||||
-rw-r--r-- | gtk/packet_list_store.c | 1 |
6 files changed, 19 insertions, 64 deletions
diff --git a/epan/column-utils.c b/epan/column-utils.c index d9ea4e39b1..775909d85f 100644 --- a/epan/column-utils.c +++ b/epan/column-utils.c @@ -1499,9 +1499,6 @@ col_fill_in(packet_info *pinfo, gboolean fill_fd_colums) case COL_DCE_CALL: /* done by dcerpc */ break; - case COL_DCE_CTX: /* done by dcerpc */ - break; - case COL_8021Q_VLAN_ID: /* done by packet-nstrace.c and packet-vlan.c */ break; diff --git a/epan/column_info.h b/epan/column_info.h index 0adbf9325c..0c682a185a 100644 --- a/epan/column_info.h +++ b/epan/column_info.h @@ -77,7 +77,7 @@ enum { COL_CUMULATIVE_BYTES, /* 7) Cumulative number of bytes */ COL_CUSTOM, /* 8) Custom column (any filter name's contents) */ COL_DCE_CALL, /* 9) DCE/RPC connection oriented call id OR datagram sequence number */ - COL_DCE_CTX, /* 10) DCE/RPC connection oriented context id */ + COL_DCE_CTX, /* 10) !! DEPRECATED !! - DCE/RPC connection oriented context id */ COL_DELTA_TIME, /* 11) Delta time */ COL_DELTA_CONV_TIME,/* 12) Delta time to last frame in conversation */ COL_DELTA_TIME_DIS, /* 13) Delta time displayed*/ diff --git a/epan/dissectors/packet-dcerpc.c b/epan/dissectors/packet-dcerpc.c index a5ca5f64e1..3e6d7a6d9d 100644 --- a/epan/dissectors/packet-dcerpc.c +++ b/epan/dissectors/packet-dcerpc.c @@ -2615,16 +2615,6 @@ dissect_dcerpc_cn_bind (tvbuff_t *tvb, gint offset, packet_info *pinfo, dissect_dcerpc_uint16 (tvb, offset, pinfo, NULL, hdr->drep, hf_dcerpc_cn_ctx_id, &ctx_id); - if (check_col (pinfo->cinfo, COL_DCE_CTX)) { - if(pinfo->dcectxid == 0) { - col_append_fstr (pinfo->cinfo, COL_DCE_CTX, "%u", ctx_id); - } else { - /* this is not the first DCE-RPC request/response in this (TCP?-)PDU, - * prepend a delimiter */ - col_append_fstr (pinfo->cinfo, COL_DCE_CTX, "#%u", ctx_id); - } - } - /* save context ID for use with dcerpc_add_conv_to_bind_table() */ /* (if we have multiple contexts, this might cause "decode as" * to behave unpredictably) */ @@ -3259,16 +3249,6 @@ dissect_dcerpc_cn_rqst (tvbuff_t *tvb, gint offset, packet_info *pinfo, proto_item_append_text(parent_pi, " Ctx: %u", ctx_id); } - if (check_col (pinfo->cinfo, COL_DCE_CTX)) { - if(pinfo->dcectxid == 0) { - col_append_fstr (pinfo->cinfo, COL_DCE_CTX, "%u", ctx_id); - } else { - /* this is not the first DCE-RPC request/response in this (TCP?-)PDU, - * prepend a delimiter */ - col_append_fstr (pinfo->cinfo, COL_DCE_CTX, "#%u", ctx_id); - } - } - offset = dissect_dcerpc_uint16 (tvb, offset, pinfo, dcerpc_tree, hdr->drep, hf_dcerpc_opnum, &opnum); @@ -3439,17 +3419,6 @@ dissect_dcerpc_cn_resp (tvbuff_t *tvb, gint offset, packet_info *pinfo, proto_item_append_text(parent_pi, " Ctx: %u", ctx_id); } - if (check_col (pinfo->cinfo, COL_DCE_CTX)) { - if(pinfo->dcectxid == 0) { - col_append_fstr (pinfo->cinfo, COL_DCE_CTX, "%u", ctx_id); - } else { - /* this is not the first DCE-RPC request/response in this (TCP?-)PDU, - * prepend a delimiter */ - col_append_fstr (pinfo->cinfo, COL_DCE_CTX, "#%u", ctx_id); - } - } - - /* save context ID for use with dcerpc_add_conv_to_bind_table() */ pinfo->dcectxid = ctx_id; @@ -3583,16 +3552,6 @@ dissect_dcerpc_cn_fault (tvbuff_t *tvb, gint offset, packet_info *pinfo, offset = dissect_dcerpc_uint16 (tvb, offset, pinfo, dcerpc_tree, hdr->drep, hf_dcerpc_cn_ctx_id, &ctx_id); - if (check_col (pinfo->cinfo, COL_DCE_CTX)) { - if(pinfo->dcectxid == 0) { - col_append_fstr (pinfo->cinfo, COL_DCE_CTX, "%u", ctx_id); - } else { - /* this is not the first DCE-RPC request/response in this (TCP?-)PDU, - * prepend a delimiter */ - col_append_fstr (pinfo->cinfo, COL_DCE_CTX, "#%u", ctx_id); - } - } - offset = dissect_dcerpc_uint8 (tvb, offset, pinfo, dcerpc_tree, hdr->drep, hf_dcerpc_cn_cancel_count, NULL); /* padding */ diff --git a/epan/prefs.c b/epan/prefs.c index 60aec2e018..a52c8cd051 100644 --- a/epan/prefs.c +++ b/epan/prefs.c @@ -1764,7 +1764,8 @@ try_convert_to_custom_column(gpointer *el_data) { COL_OXID, "fc.ox_id" }, { COL_RXID, "fc.rx_id" }, { COL_SRCIDX, "mdshdr.srcidx" }, - { COL_DSTIDX, "mdshdr.dstidx" } + { COL_DSTIDX, "mdshdr.dstidx" }, + { COL_DCE_CTX, "dcerpc.cn_ctx_id" } }; guint haystack_idx; diff --git a/gtk/main_packet_list.c b/gtk/main_packet_list.c index 7b660b6df8..bec8010c48 100644 --- a/gtk/main_packet_list.c +++ b/gtk/main_packet_list.c @@ -126,7 +126,7 @@ packet_list_compare(GtkCList *clist, gconstpointer ptr1, gconstpointer ptr2) (hfi->type == FT_DOUBLE) || (hfi->type == FT_FLOAT) || (hfi->type == FT_BOOLEAN) || (hfi->type == FT_FRAMENUM) || (hfi->type == FT_RELATIVE_TIME))) { - + /* Compare numeric column */ custom_numeric = TRUE; } @@ -135,9 +135,9 @@ packet_list_compare(GtkCList *clist, gconstpointer ptr1, gconstpointer ptr2) num1 = atof(text1); num2 = atof(text2); if ((col_fmt == COL_UNRES_SRC_PORT) || (col_fmt == COL_UNRES_DST_PORT) || - (custom_numeric) || + (custom_numeric) || ((num1 != 0) && (num2 != 0) && ((col_fmt == COL_DEF_SRC_PORT) || - (col_fmt == COL_RES_SRC_PORT) || + (col_fmt == COL_RES_SRC_PORT) || (col_fmt == COL_DEF_DST_PORT) || (col_fmt == COL_RES_DST_PORT)))) { @@ -214,7 +214,7 @@ packet_list_resize_column_cb(GtkCList *clist _U_, gint column, gint width, gpoin /* What to do when a list item is selected/unselected */ static void -packet_list_select_cb(GtkWidget *w _U_, gint row, gint col _U_, GdkEventButton *event _U_, gpointer evt _U_) +packet_list_select_cb(GtkWidget *w _U_, gint row, gint col _U_, GdkEventButton *event _U_, gpointer evt _U_) { frame_data *fdata; @@ -237,7 +237,7 @@ packet_list_select_cb(GtkWidget *w _U_, gint row, gint col _U_, GdkEventButton * } static void -packet_list_unselect_cb(GtkWidget *w _U_, gint row _U_, gint col _U_, GdkEventButton *event _U_, gpointer evt _U_) +packet_list_unselect_cb(GtkWidget *w _U_, gint row _U_, gint col _U_, GdkEventButton *event _U_, gpointer evt _U_) { cf_unselect_packet(&cfile); } @@ -274,13 +274,13 @@ set_frame_mark(gboolean set, frame_data *frame, gint row) } /* call this after last set_frame_mark is done */ -static void mark_frames_ready(void) +static void mark_frames_ready(void) { file_save_update_dynamics(); packets_bar_update(); } -void packet_list_mark_frame_cb(GtkWidget *w _U_, gpointer data _U_) +void packet_list_mark_frame_cb(GtkWidget *w _U_, gpointer data _U_) { if (cfile.current_frame) { set_frame_mark(!cfile.current_frame->flags.marked, @@ -289,7 +289,7 @@ void packet_list_mark_frame_cb(GtkWidget *w _U_, gpointer data _U_) } } -static void mark_all_frames(gboolean set) +static void mark_all_frames(gboolean set) { frame_data *fdata; @@ -302,7 +302,7 @@ static void mark_all_frames(gboolean set) mark_frames_ready(); } -void packet_list_update_marked_frames(void) +void packet_list_update_marked_frames(void) { frame_data *fdata; @@ -318,12 +318,12 @@ void packet_list_update_marked_frames(void) mark_frames_ready(); } -void packet_list_mark_all_frames_cb(GtkWidget *w _U_, gpointer data _U_) +void packet_list_mark_all_frames_cb(GtkWidget *w _U_, gpointer data _U_) { mark_all_frames(TRUE); } -void packet_list_unmark_all_frames_cb(GtkWidget *w _U_, gpointer data _U_) +void packet_list_unmark_all_frames_cb(GtkWidget *w _U_, gpointer data _U_) { mark_all_frames(FALSE); } @@ -474,10 +474,10 @@ packet_list_new(e_prefs *prefs) custom_right_justify = FALSE; if (cfile.cinfo.col_fmt[i] == COL_CUSTOM) { hfi = proto_registrar_get_byname(cfile.cinfo.col_custom_field[i]); - if ((hfi != NULL) && (hfi->strings == NULL) && + if ((hfi != NULL) && (hfi->strings == NULL) && ((hfi->type == FT_BOOLEAN) || (hfi->type == FT_FRAMENUM) || (((hfi->display == BASE_DEC) || (hfi->display == BASE_OCT)) && - (IS_FT_INT(hfi->type) || IS_FT_UINT(hfi->type) || + (IS_FT_INT(hfi->type) || IS_FT_UINT(hfi->type) || (hfi->type == FT_INT64) || (hfi->type == FT_UINT64))))) { custom_right_justify = TRUE; } @@ -488,7 +488,6 @@ packet_list_new(e_prefs *prefs) cfile.cinfo.col_fmt[i] == COL_PACKET_LENGTH || cfile.cinfo.col_fmt[i] == COL_CUMULATIVE_BYTES || cfile.cinfo.col_fmt[i] == COL_DCE_CALL || - cfile.cinfo.col_fmt[i] == COL_DCE_CTX || custom_right_justify) gtk_clist_set_column_justification(GTK_CLIST(packet_list), i, GTK_JUSTIFY_RIGHT); @@ -587,7 +586,7 @@ packet_list_freeze(void) } static void -packet_list_resize_columns(void) +packet_list_resize_columns(void) { int i; int progbar_nextstep; @@ -795,7 +794,7 @@ packet_list_get_row_data(gint row) /* get the first fully visible row number, given row MUST be visible */ static gint -packet_list_first_full_visible_row(gint row) +packet_list_first_full_visible_row(gint row) { g_assert(gtk_clist_row_is_visible(GTK_CLIST(packet_list), row) == GTK_VISIBILITY_FULL); @@ -808,7 +807,7 @@ packet_list_first_full_visible_row(gint row) /* get the last fully visible row number, given row MUST be visible */ static gint -packet_list_last_full_visible_row(gint row) +packet_list_last_full_visible_row(gint row) { g_assert(gtk_clist_row_is_visible(GTK_CLIST(packet_list), row) == GTK_VISIBILITY_FULL); diff --git a/gtk/packet_list_store.c b/gtk/packet_list_store.c index fb40b7a0e4..3cf041f3b5 100644 --- a/gtk/packet_list_store.c +++ b/gtk/packet_list_store.c @@ -715,7 +715,6 @@ packet_list_change_record(PacketList *packet_list, guint row, gint col, column_i case COL_INFO: case COL_IF_DIR: case COL_DCE_CALL: - case COL_DCE_CTX: case COL_8021Q_VLAN_ID: case COL_EXPERT: case COL_FREQ_CHAN: |