forked from osmocom/wireshark
Rename routines to clarify what they do.
XXX_prime_with_YYY makes it a bit clearer than does XXX_prime_YYY that we're not priming YYY, we're priming XXX *using* YYY. Change-Id: I1686b8b5469bc0f0bd6db8551fb6301776a1b133 Reviewed-on: https://code.wireshark.org/review/21031 Reviewed-by: Guy Harris <guy@alum.mit.edu>
This commit is contained in:
parent
c079255539
commit
4d2d423106
|
@ -486,8 +486,8 @@ libwireshark.so.0 libwireshark0 #MINVER#
|
|||
epan_dissect_init@Base 1.9.1
|
||||
epan_dissect_new@Base 1.9.1
|
||||
epan_dissect_packet_contains_field@Base 1.12.0~rc1
|
||||
epan_dissect_prime_dfilter@Base 1.9.1
|
||||
epan_dissect_prime_hfid@Base 2.1.0
|
||||
epan_dissect_prime_with_dfilter@Base 2.3.0
|
||||
epan_dissect_prime_with_hfid@Base 2.3.0
|
||||
epan_dissect_reset@Base 1.12.0~rc1
|
||||
epan_dissect_run@Base 1.9.1
|
||||
epan_dissect_run_with_taps@Base 1.9.1
|
||||
|
|
|
@ -479,7 +479,7 @@ prime_edt(gpointer data, gpointer user_data)
|
|||
epan_dissect_t *edt = (epan_dissect_t *)user_data;
|
||||
|
||||
if (colorf->c_colorfilter != NULL)
|
||||
epan_dissect_prime_dfilter(edt, colorf->c_colorfilter);
|
||||
epan_dissect_prime_with_dfilter(edt, colorf->c_colorfilter);
|
||||
}
|
||||
|
||||
/* Prime the epan_dissect_t with all the compiler
|
||||
|
|
|
@ -388,7 +388,7 @@ col_custom_prime_edt(epan_dissect_t *edt, column_info *cinfo)
|
|||
|
||||
if (col_item->fmt_matx[COL_CUSTOM] &&
|
||||
col_item->col_custom_dfilter) {
|
||||
epan_dissect_prime_dfilter(edt, col_item->col_custom_dfilter);
|
||||
epan_dissect_prime_with_dfilter(edt, col_item->col_custom_dfilter);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -426,7 +426,7 @@ dfilter_prime_proto_tree(const dfilter_t *df, proto_tree *tree)
|
|||
int i;
|
||||
|
||||
for (i = 0; i < df->num_interesting_fields; i++) {
|
||||
proto_tree_prime_hfid(tree, df->interesting_fields[i]);
|
||||
proto_tree_prime_with_hfid(tree, df->interesting_fields[i]);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -530,15 +530,15 @@ epan_dissect_free(epan_dissect_t* edt)
|
|||
}
|
||||
|
||||
void
|
||||
epan_dissect_prime_dfilter(epan_dissect_t *edt, const dfilter_t* dfcode)
|
||||
epan_dissect_prime_with_dfilter(epan_dissect_t *edt, const dfilter_t* dfcode)
|
||||
{
|
||||
dfilter_prime_proto_tree(dfcode, edt->tree);
|
||||
}
|
||||
|
||||
void
|
||||
epan_dissect_prime_hfid(epan_dissect_t *edt, int hfid)
|
||||
epan_dissect_prime_with_hfid(epan_dissect_t *edt, int hfid)
|
||||
{
|
||||
proto_tree_prime_hfid(edt->tree, hfid);
|
||||
proto_tree_prime_with_hfid(edt->tree, hfid);
|
||||
}
|
||||
|
||||
/* ----------------------- */
|
||||
|
|
|
@ -218,12 +218,12 @@ epan_dissect_file_run_with_taps(epan_dissect_t *edt, struct wtap_pkthdr *phdr,
|
|||
/** Prime an epan_dissect_t's proto_tree using the fields/protocols used in a dfilter. */
|
||||
WS_DLL_PUBLIC
|
||||
void
|
||||
epan_dissect_prime_dfilter(epan_dissect_t *edt, const struct epan_dfilter *dfcode);
|
||||
epan_dissect_prime_with_dfilter(epan_dissect_t *edt, const struct epan_dfilter *dfcode);
|
||||
|
||||
/** Prime an epan_dissect_t's proto_tree with a field/protocol specified by its hfid */
|
||||
WS_DLL_PUBLIC
|
||||
void
|
||||
epan_dissect_prime_hfid(epan_dissect_t *edt, int hfid);
|
||||
epan_dissect_prime_with_hfid(epan_dissect_t *edt, int hfid);
|
||||
|
||||
/** fill the dissect run output into the packet list columns */
|
||||
WS_DLL_PUBLIC
|
||||
|
|
|
@ -5828,7 +5828,7 @@ proto_tree_create_root(packet_info *pinfo)
|
|||
/* "prime" a proto_tree with a single hfid that a dfilter
|
||||
* is interested in. */
|
||||
void
|
||||
proto_tree_prime_hfid(proto_tree *tree _U_, const gint hfid)
|
||||
proto_tree_prime_with_hfid(proto_tree *tree _U_, const gint hfid)
|
||||
{
|
||||
header_field_info *hfinfo;
|
||||
|
||||
|
|
|
@ -1020,7 +1020,7 @@ proto_tree_set_fake_protocols(proto_tree *tree, gboolean fake_protocols);
|
|||
@param hfid the interesting field id
|
||||
@todo what *does* interesting mean? */
|
||||
extern void
|
||||
proto_tree_prime_hfid(proto_tree *tree, const int hfid);
|
||||
proto_tree_prime_with_hfid(proto_tree *tree, const int hfid);
|
||||
|
||||
/** Get a parent item of a subtree.
|
||||
@param tree the tree to get the parent from
|
||||
|
|
|
@ -319,7 +319,7 @@ void tap_build_interesting (epan_dissect_t *edt)
|
|||
interesting hf_fields */
|
||||
for(tl=tap_listener_queue;tl;tl=tl->next){
|
||||
if(tl->code){
|
||||
epan_dissect_prime_dfilter(edt, tl->code);
|
||||
epan_dissect_prime_with_dfilter(edt, tl->code);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
6
file.c
6
file.c
|
@ -1151,7 +1151,7 @@ add_packet_to_packet_list(frame_data *fdata, capture_file *cf,
|
|||
cf->prev_cap = fdata;
|
||||
|
||||
if (dfcode != NULL) {
|
||||
epan_dissect_prime_dfilter(edt, dfcode);
|
||||
epan_dissect_prime_with_dfilter(edt, dfcode);
|
||||
}
|
||||
#if 0
|
||||
/* Prepare coloring rules, this ensures that display filter rules containing
|
||||
|
@ -1238,7 +1238,7 @@ read_packet(capture_file *cf, dfilter_t *dfcode, epan_dissect_t *edt,
|
|||
epan_dissect_t rf_edt;
|
||||
|
||||
epan_dissect_init(&rf_edt, cf->epan, TRUE, FALSE);
|
||||
epan_dissect_prime_dfilter(&rf_edt, cf->rfcode);
|
||||
epan_dissect_prime_with_dfilter(&rf_edt, cf->rfcode);
|
||||
epan_dissect_run(&rf_edt, cf->cd_t, phdr, frame_tvbuff_new(&fdlocal, buf), &fdlocal, NULL);
|
||||
passed = dfilter_apply_edt(cf->rfcode, &rf_edt);
|
||||
epan_dissect_cleanup(&rf_edt);
|
||||
|
@ -3439,7 +3439,7 @@ match_dfilter(capture_file *cf, frame_data *fdata, void *criterion)
|
|||
}
|
||||
|
||||
epan_dissect_init(&edt, cf->epan, TRUE, FALSE);
|
||||
epan_dissect_prime_dfilter(&edt, sfcode);
|
||||
epan_dissect_prime_with_dfilter(&edt, sfcode);
|
||||
epan_dissect_run(&edt, cf->cd_t, &cf->phdr, frame_tvbuff_new_buffer(fdata, &cf->buf), fdata, NULL);
|
||||
result = dfilter_apply_edt(sfcode, &edt) ? MR_MATCHED : MR_NOTMATCHED;
|
||||
epan_dissect_cleanup(&edt);
|
||||
|
|
|
@ -1066,7 +1066,7 @@ process_packet(capture_file *cf, epan_dissect_t *edt, gint64 offset,
|
|||
filter. */
|
||||
if (n_rfilters > 0) {
|
||||
for(i = 0; i < n_rfcodes; i++) {
|
||||
epan_dissect_prime_dfilter(edt, rfcodes[i]);
|
||||
epan_dissect_prime_with_dfilter(edt, rfcodes[i]);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
6
sharkd.c
6
sharkd.c
|
@ -302,10 +302,10 @@ process_packet_first_pass(capture_file *cf, epan_dissect_t *edt,
|
|||
/* If we're running a read filter, prime the epan_dissect_t with that
|
||||
filter. */
|
||||
if (cf->rfcode)
|
||||
epan_dissect_prime_dfilter(edt, cf->rfcode);
|
||||
epan_dissect_prime_with_dfilter(edt, cf->rfcode);
|
||||
|
||||
if (cf->dfcode)
|
||||
epan_dissect_prime_dfilter(edt, cf->dfcode);
|
||||
epan_dissect_prime_with_dfilter(edt, cf->dfcode);
|
||||
|
||||
frame_data_set_before_dissect(&fdlocal, &cf->elapsed_time,
|
||||
&ref, prev_dis);
|
||||
|
@ -907,7 +907,7 @@ sharkd_filter(const char *dftext, guint8 **result)
|
|||
break;
|
||||
|
||||
/* frame_data_set_before_dissect */
|
||||
epan_dissect_prime_dfilter(&edt, dfcode);
|
||||
epan_dissect_prime_with_dfilter(&edt, dfcode);
|
||||
|
||||
epan_dissect_run(&edt, cfile.cd_t, &phdr, frame_tvbuff_new_buffer(fdata, &buf), fdata, NULL);
|
||||
|
||||
|
|
|
@ -1085,7 +1085,7 @@ process_packet_first_pass(capture_file *cf, epan_dissect_t *edt,
|
|||
/* If we're running a read filter, prime the epan_dissect_t with that
|
||||
filter. */
|
||||
if (cf->rfcode)
|
||||
epan_dissect_prime_dfilter(edt, cf->rfcode);
|
||||
epan_dissect_prime_with_dfilter(edt, cf->rfcode);
|
||||
|
||||
frame_data_set_before_dissect(&fdlocal, &cf->elapsed_time,
|
||||
&ref, prev_dis);
|
||||
|
@ -1147,7 +1147,7 @@ process_packet_second_pass(capture_file *cf, epan_dissect_t *edt, frame_data *fd
|
|||
/* If we're running a display filter, prime the epan_dissect_t with that
|
||||
filter. */
|
||||
if (cf->dfcode)
|
||||
epan_dissect_prime_dfilter(edt, cf->dfcode);
|
||||
epan_dissect_prime_with_dfilter(edt, cf->dfcode);
|
||||
|
||||
col_custom_prime_edt(edt, &cf->cinfo);
|
||||
|
||||
|
@ -1601,7 +1601,7 @@ process_packet(capture_file *cf, epan_dissect_t *edt, gint64 offset,
|
|||
/* If we're running a filter, prime the epan_dissect_t with that
|
||||
filter. */
|
||||
if (cf->dfcode)
|
||||
epan_dissect_prime_dfilter(edt, cf->dfcode);
|
||||
epan_dissect_prime_with_dfilter(edt, cf->dfcode);
|
||||
|
||||
col_custom_prime_edt(edt, &cf->cinfo);
|
||||
|
||||
|
|
8
tshark.c
8
tshark.c
|
@ -2805,10 +2805,10 @@ process_packet_first_pass(capture_file *cf, epan_dissect_t *edt,
|
|||
/* If we're running a read filter, prime the epan_dissect_t with that
|
||||
filter. */
|
||||
if (cf->rfcode)
|
||||
epan_dissect_prime_dfilter(edt, cf->rfcode);
|
||||
epan_dissect_prime_with_dfilter(edt, cf->rfcode);
|
||||
|
||||
if (cf->dfcode)
|
||||
epan_dissect_prime_dfilter(edt, cf->dfcode);
|
||||
epan_dissect_prime_with_dfilter(edt, cf->dfcode);
|
||||
|
||||
frame_data_set_before_dissect(&fdlocal, &cf->elapsed_time,
|
||||
&ref, prev_dis);
|
||||
|
@ -2880,7 +2880,7 @@ process_packet_second_pass(capture_file *cf, epan_dissect_t *edt, frame_data *fd
|
|||
/* If we're running a display filter, prime the epan_dissect_t with that
|
||||
filter. */
|
||||
if (cf->dfcode)
|
||||
epan_dissect_prime_dfilter(edt, cf->dfcode);
|
||||
epan_dissect_prime_with_dfilter(edt, cf->dfcode);
|
||||
|
||||
col_custom_prime_edt(edt, &cf->cinfo);
|
||||
|
||||
|
@ -3555,7 +3555,7 @@ process_packet(capture_file *cf, epan_dissect_t *edt, gint64 offset, struct wtap
|
|||
/* If we're running a filter, prime the epan_dissect_t with that
|
||||
filter. */
|
||||
if (cf->dfcode)
|
||||
epan_dissect_prime_dfilter(edt, cf->dfcode);
|
||||
epan_dissect_prime_with_dfilter(edt, cf->dfcode);
|
||||
|
||||
col_custom_prime_edt(edt, &cf->cinfo);
|
||||
|
||||
|
|
|
@ -3566,7 +3566,7 @@ void iax2_analysis_cb(GtkAction *action _U_, gpointer user_data _U_)
|
|||
if (!cf_read_record(cf, fdata))
|
||||
return; /* error reading the record */
|
||||
epan_dissect_init(&edt, cf->epan, TRUE, FALSE);
|
||||
epan_dissect_prime_dfilter(&edt, sfcode);
|
||||
epan_dissect_prime_with_dfilter(&edt, sfcode);
|
||||
epan_dissect_run(&edt, cf->cd_t, &cf->phdr,
|
||||
frame_tvbuff_new_buffer(fdata, &cf->buf), fdata, NULL);
|
||||
|
||||
|
|
|
@ -262,7 +262,7 @@ finfo_window_refresh(struct FieldinfoWinData *DataPtr)
|
|||
epan_dissect_init(&edt, cfile.epan, TRUE, TRUE);
|
||||
/* Makes any sense?
|
||||
if (old_finfo->hfinfo)
|
||||
proto_tree_prime_hfid(edt.tree, old_finfo->hfinfo->id);
|
||||
proto_tree_prime_with_hfid(edt.tree, old_finfo->hfinfo->id);
|
||||
*/
|
||||
epan_dissect_run(&edt, cfile.cd_t, &DataPtr->phdr, frame_tvbuff_new(DataPtr->frame, DataPtr->pd), DataPtr->frame, NULL);
|
||||
|
||||
|
|
|
@ -3897,8 +3897,8 @@ rtp_analysis_cb(GtkAction *action _U_, gpointer user_data _U_)
|
|||
if (!cf_read_record(cf, fdata))
|
||||
return; /* error reading the record */
|
||||
epan_dissect_init(&edt, cf->epan, TRUE, FALSE);
|
||||
epan_dissect_prime_dfilter(&edt, sfcode);
|
||||
epan_dissect_prime_hfid(&edt, hfid_rtp_ssrc);
|
||||
epan_dissect_prime_with_dfilter(&edt, sfcode);
|
||||
epan_dissect_prime_with_hfid(&edt, hfid_rtp_ssrc);
|
||||
epan_dissect_run(&edt, cf->cd_t, &cf->phdr, frame_tvbuff_new_buffer(fdata, &cf->buf), fdata, NULL);
|
||||
|
||||
/*
|
||||
|
|
|
@ -1000,7 +1000,7 @@ sctp_analyse_cb(struct sctp_analyse *u_data, gboolean ext)
|
|||
return; /* error reading the record */
|
||||
|
||||
epan_dissect_init(&edt, cf->epan, TRUE, FALSE);
|
||||
epan_dissect_prime_dfilter(&edt, sfcode);
|
||||
epan_dissect_prime_with_dfilter(&edt, sfcode);
|
||||
epan_dissect_run(&edt, cf->cd_t, &cf->phdr, frame_tvbuff_new_buffer(fdata, &cf->buf), fdata, NULL);
|
||||
|
||||
/* if it is not an sctp packet, show the dialog */
|
||||
|
|
|
@ -333,7 +333,7 @@ Iax2AnalysisDialog::Iax2AnalysisDialog(QWidget &parent, CaptureFile &cf) :
|
|||
epan_dissect_t edt;
|
||||
|
||||
epan_dissect_init(&edt, cap_file_.capFile()->epan, TRUE, FALSE);
|
||||
epan_dissect_prime_dfilter(&edt, sfcode);
|
||||
epan_dissect_prime_with_dfilter(&edt, sfcode);
|
||||
epan_dissect_run(&edt, cap_file_.capFile()->cd_t, &cap_file_.capFile()->phdr,
|
||||
frame_tvbuff_new_buffer(fdata, &cap_file_.capFile()->buf), fdata, NULL);
|
||||
|
||||
|
|
|
@ -1604,8 +1604,8 @@ void RtpAnalysisDialog::findStreams()
|
|||
epan_dissect_t edt;
|
||||
|
||||
epan_dissect_init(&edt, cap_file_.capFile()->epan, TRUE, FALSE);
|
||||
epan_dissect_prime_dfilter(&edt, sfcode);
|
||||
epan_dissect_prime_hfid(&edt, hfid_rtp_ssrc);
|
||||
epan_dissect_prime_with_dfilter(&edt, sfcode);
|
||||
epan_dissect_prime_with_hfid(&edt, hfid_rtp_ssrc);
|
||||
epan_dissect_run(&edt, cap_file_.capFile()->cd_t, &cap_file_.capFile()->phdr,
|
||||
frame_tvbuff_new_buffer(fdata, &cap_file_.capFile()->buf), fdata, NULL);
|
||||
|
||||
|
|
|
@ -145,7 +145,7 @@ rlc_lte_tap_info *select_rlc_lte_session(capture_file *cf,
|
|||
}
|
||||
|
||||
epan_dissect_init(&edt, cf->epan, TRUE, FALSE);
|
||||
epan_dissect_prime_dfilter(&edt, sfcode);
|
||||
epan_dissect_prime_with_dfilter(&edt, sfcode);
|
||||
epan_dissect_run_with_taps(&edt, cf->cd_t, &cf->phdr, frame_tvbuff_new_buffer(fdata, &cf->buf), fdata, NULL);
|
||||
rel_ts = edt.pi.rel_ts;
|
||||
epan_dissect_cleanup(&edt);
|
||||
|
|
|
@ -318,7 +318,7 @@ select_tcpip_session(capture_file *cf, struct segment *hdrs)
|
|||
}
|
||||
|
||||
epan_dissect_init(&edt, cf->epan, TRUE, FALSE);
|
||||
epan_dissect_prime_dfilter(&edt, sfcode);
|
||||
epan_dissect_prime_with_dfilter(&edt, sfcode);
|
||||
epan_dissect_run_with_taps(&edt, cf->cd_t, &cf->phdr, frame_tvbuff_new_buffer(fdata, &cf->buf), fdata, NULL);
|
||||
rel_ts = edt.pi.rel_ts;
|
||||
epan_dissect_cleanup(&edt);
|
||||
|
|
Loading…
Reference in New Issue