forked from osmocom/wireshark
From Stephen Donnelly: Correct ERF name, add WTAP_ENCAP string display https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7313
svn path=/trunk/; revision=43141
This commit is contained in:
parent
12bd8f51b3
commit
7881fe8493
|
@ -686,28 +686,47 @@ proto_register_frame(void)
|
|||
FT_UINT32, BASE_DEC, NULL, 0x0,
|
||||
NULL, HFILL }},
|
||||
|
||||
{ &hf_frame_wtap_encap,
|
||||
{ "WTAP_ENCAP", "frame.dlt",
|
||||
FT_INT16, BASE_DEC, NULL, 0x0,
|
||||
NULL, HFILL }},
|
||||
|
||||
{ &hf_comments_text,
|
||||
{ "Comment", "comment",
|
||||
FT_STRING, BASE_NONE, NULL, 0x0,
|
||||
NULL, HFILL }},
|
||||
};
|
||||
static gint *ett[] = {
|
||||
|
||||
static hf_register_info hf_encap =
|
||||
{ &hf_frame_wtap_encap,
|
||||
{ "Encapsulation type", "frame.encap_type",
|
||||
FT_INT16, BASE_DEC, NULL, 0x0,
|
||||
NULL, HFILL }};
|
||||
|
||||
static gint *ett[] = {
|
||||
&ett_frame,
|
||||
&ett_comments
|
||||
};
|
||||
|
||||
module_t *frame_module;
|
||||
|
||||
if (hf_encap.hfinfo.strings == NULL) {
|
||||
int encap_count = wtap_get_num_encap_types();
|
||||
value_string *arr;
|
||||
int i;
|
||||
|
||||
hf_encap.hfinfo.strings = arr = g_new(value_string, encap_count+1);
|
||||
|
||||
for (i = 0; i < encap_count; i++) {
|
||||
arr[i].value = i;
|
||||
arr[i].strptr = wtap_encap_string(i);
|
||||
}
|
||||
arr[encap_count].value = 0;
|
||||
arr[encap_count].strptr = NULL;
|
||||
}
|
||||
|
||||
wtap_encap_dissector_table = register_dissector_table("wtap_encap",
|
||||
"Wiretap encapsulation type", FT_UINT32, BASE_DEC);
|
||||
|
||||
proto_frame = proto_register_protocol("Frame", "Frame", "frame");
|
||||
proto_pkt_comment = proto_register_protocol("Packet comments", "Pkt_Comment", "pkt_comment");
|
||||
proto_register_field_array(proto_frame, hf, array_length(hf));
|
||||
proto_register_field_array(proto_frame, &hf_encap, 1);
|
||||
proto_register_subtree_array(ett, array_length(ett));
|
||||
register_dissector("frame",dissect_frame,proto_frame);
|
||||
|
||||
|
|
|
@ -444,7 +444,7 @@ static struct encap_type_info encap_table_base[] = {
|
|||
{ "Per-Packet Information header", "ppi" },
|
||||
|
||||
/* WTAP_ENCAP_ERF */
|
||||
{ "Endace Record File", "erf" },
|
||||
{ "Extensible Record Format", "erf" },
|
||||
|
||||
/* WTAP_ENCAP_BLUETOOTH_H4_WITH_PHDR */
|
||||
{ "Bluetooth H4 with linux header", "bluetooth-h4-linux" },
|
||||
|
|
Loading…
Reference in New Issue