aboutsummaryrefslogtreecommitdiffstats
path: root/editcap.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2019-01-09 13:21:10 -0800
committerGuy Harris <guy@alum.mit.edu>2019-01-09 21:21:56 +0000
commitfd93f5490c6a29d01e5cd11f14679641300469f9 (patch)
tree4f64fc24239fa7c1fe9b337c352624a69f30b0e6 /editcap.c
parentc8f87206738f6cfe5328026addc6630b7525c4ad (diff)
Clarify the name and description for a link-layer encapsulation type.
What we were calling the "name" is actually a description to show to users; what were calling the "short name" is just the name to use on the command line. Rename some routines and structure members, and put the name first and description second in the table. Expand some descriptions to give more details (e.g., to be more than just a capitalized version of the name). Fix the CamelCase capitalization of InfiniBand. Change-Id: I060b8bd86573880efd0fab044401b449469563eb Reviewed-on: https://code.wireshark.org/review/31472 Reviewed-by: Guy Harris <guy@alum.mit.edu>
Diffstat (limited to 'editcap.c')
-rw-r--r--editcap.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/editcap.c b/editcap.c
index c0683aa68c..6353b4247a 100644
--- a/editcap.c
+++ b/editcap.c
@@ -900,9 +900,9 @@ list_encap_types(FILE *stream) {
encaps = (struct string_elem *)g_malloc(sizeof(struct string_elem) * WTAP_NUM_ENCAP_TYPES);
fprintf(stream, "editcap: The available encapsulation types for the \"-T\" flag are:\n");
for (i = 0; i < WTAP_NUM_ENCAP_TYPES; i++) {
- encaps[i].sstr = wtap_encap_short_string(i);
+ encaps[i].sstr = wtap_encap_name(i);
if (encaps[i].sstr != NULL) {
- encaps[i].lstr = wtap_encap_string(i);
+ encaps[i].lstr = wtap_encap_description(i);
list = g_slist_insert_sorted(list, &encaps[i], string_nat_compare);
}
}
@@ -1307,7 +1307,7 @@ main(int argc, char *argv[])
break;
case 'T':
- out_frame_type = wtap_short_string_to_encap(optarg);
+ out_frame_type = wtap_name_to_encap(optarg);
if (out_frame_type < 0) {
fprintf(stderr, "editcap: \"%s\" isn't a valid encapsulation type\n\n",
optarg);
@@ -1433,8 +1433,8 @@ main(int argc, char *argv[])
if (skip_radiotap == TRUE && wtap_file_encap(wth) != WTAP_ENCAP_IEEE_802_11_RADIOTAP) {
fprintf(stderr, "editcap: can't skip radiotap header because input file is incorrect\n");
fprintf(stderr, "editcap: expected '%s', input is '%s'\n",
- wtap_encap_string(WTAP_ENCAP_IEEE_802_11_RADIOTAP),
- wtap_encap_string(wtap_file_type_subtype(wth)));
+ wtap_encap_description(WTAP_ENCAP_IEEE_802_11_RADIOTAP),
+ wtap_encap_description(wtap_file_type_subtype(wth)));
ret = INVALID_OPTION;
goto clean_exit;
}