diff options
author | Guy Harris <guy@alum.mit.edu> | 2008-07-14 19:28:19 +0000 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2008-07-14 19:28:19 +0000 |
commit | e95265b9264edea5c1cb70d109e04efa58679440 (patch) | |
tree | bdb51a115e5bffe9fb61b807f6872c627147a947 /epan/prefs.c | |
parent | 1349de553248d8f968e747ff5a5d2a1cd76bcba2 (diff) |
Rename the ERF "erfhdlc" preference to "hdlc_type" ("erf" is redundant,
and "hdlc" doesn't indicate that it's a protocol type), and, instead of
a "raw" option, have a "try to guess the traffic type" option - for now,
if the first byte is 0x0f or 0x8f, treat it as Cisco HDLC, otherwise
treat it as PPP.
svn path=/trunk/; revision=25737
Diffstat (limited to 'epan/prefs.c')
-rw-r--r-- | epan/prefs.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/epan/prefs.c b/epan/prefs.c index 53c8927b10..47bea36a85 100644 --- a/epan/prefs.c +++ b/epan/prefs.c @@ -2359,6 +2359,21 @@ set_pref(gchar *pref_name, gchar *value, void *private_data _U_) value = "llc"; else if (strcmp(value, "raw") == 0 || strcmp(value, "Raw data") == 0) value = "guess"; + } else if (strcmp(dotp, "erfhdlc") == 0) { + /* Handle the old "erfhdlc" preference; map it to the new + "hdlc_type" preference, and map the values to those for + the new preference. */ + pref = find_preference(module, "hdlc_type"); + if (strcmp(value, "chdlc") == 0 || strcmp(value, "Cisco HDLC") == 0) + value = "chdlc"; + else if (strcmp(value, "ppp") == 0 || strcmp(value, "PPP serial") == 0) + value = "ppp"; + else if (strcmp(value, "fr") == 0 || strcmp(value, "Frame Relay") == 0) + value = "frelay"; + else if (strcmp(value, "mtp2") == 0 || strcmp(value, "SS7 MTP2") == 0) + value = "mtp2"; + else if (strcmp(value, "raw") == 0 || strcmp(value, "Raw data") == 0) + value = "guess"; } } } |