aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-vlan.c
diff options
context:
space:
mode:
authorStephen Fisher <steve@stephen-fisher.com>2010-01-02 04:20:43 +0000
committerStephen Fisher <steve@stephen-fisher.com>2010-01-02 04:20:43 +0000
commit4f0203b47effc245265d1744ced11a9092d57a6f (patch)
tree0e3dbecc4412adb056c6a0819ef98a790bfbbe6f /epan/dissectors/packet-vlan.c
parente6a0b91f06e6f1413c72ae148c15a4a0df3b411b (diff)
Add descriptions to the priority and CFI fields in 802.1q VLAN packets.
svn path=/trunk/; revision=31406
Diffstat (limited to 'epan/dissectors/packet-vlan.c')
-rw-r--r--epan/dissectors/packet-vlan.c24
1 files changed, 22 insertions, 2 deletions
diff --git a/epan/dissectors/packet-vlan.c b/epan/dissectors/packet-vlan.c
index 74216055bc..5c3243ff95 100644
--- a/epan/dissectors/packet-vlan.c
+++ b/epan/dissectors/packet-vlan.c
@@ -51,6 +51,26 @@ static int hf_vlan_trailer = -1;
static gint ett_vlan = -1;
+/* From Table G-2 of IEEE standard 802.1d-2004 */
+static const value_string pri_vals[] = {
+ { 1, "Background" },
+ { 2, "Spare" },
+ { 0, "Best Effort (default)" },
+ { 3, "Excellent Effort" },
+ { 4, "Controlled Load" },
+ { 5, "Video, < 100ms latency and jitter" },
+ { 6, "Voice, < 10ms latency and jitter" },
+ { 7, "Network Control" },
+ { 0, NULL }
+};
+
+static const value_string cfi_vals[] = {
+ { 0, "Canonical" },
+ { 1, "Non-canonical" },
+ { 0, NULL }
+};
+
+
void
capture_vlan(const guchar *pd, int offset, int len, packet_counts *ld ) {
guint16 encap_proto;
@@ -144,10 +164,10 @@ proto_register_vlan(void)
static hf_register_info hf[] = {
{ &hf_vlan_priority, {
"Priority", "vlan.priority", FT_UINT16, BASE_DEC,
- NULL, 0xE000, "User Priority", HFILL }},
+ VALS(pri_vals), 0xE000, "Descriptions are recommendations from IEEE standard 802.1d-2004", HFILL }},
{ &hf_vlan_cfi, {
"CFI", "vlan.cfi", FT_UINT16, BASE_DEC,
- NULL, 0x1000, "Canonical Format Identifier", HFILL }},
+ VALS(cfi_vals), 0x1000, "Canonical Format Identifier", HFILL }},
{ &hf_vlan_id, {
"ID", "vlan.id", FT_UINT16, BASE_DEC,
NULL, 0x0FFF, "VLAN ID", HFILL }},