As suggested by Kovarththanan Rajaratnam in https://bugs.wireshark.org/bugzilla/show_...
[obnox/wireshark/wip.git] / epan / dissectors / packet-vmlab.c
index 3915c1595b683804372daeb14925f47107a6bf28..7b89ead826175ce1c6366f90dea23858acb59d9c 100644 (file)
 
 /* History
  *
- * Apr 4, 2010 - David Aggeler 
+ * Apr 4, 2010 - David Aggeler
  *
  * - Initial version based on packet-vlan.c
  *
- *   VMware Lab Manager is using this encapsulation directly as Ethernet Frames 
- *   or inside VLANs. The Ethernet type was originally registered to Akimbi, but VMware 
- *   acquired this company in 2006. No public information found, so the decoding here 
+ *   VMware Lab Manager is using this encapsulation directly as Ethernet Frames
+ *   or inside VLANs. The Ethernet type was originally registered to Akimbi, but VMware
+ *   acquired this company in 2006. No public information found, so the decoding here
  *   is an educated guess. Since one of the features of Lab Manager is to separate
  *   VMs with equal host name, IP and MAC Address, I expect the upper layer dissectors
- *   (namely ARP, ICMP, IP, TCP) to create false alerts, since identical configurations 
- *   may communicate at the same time. The main goal of this dissector is to be able 
+ *   (namely ARP, ICMP, IP, TCP) to create false alerts, since identical configurations
+ *   may communicate at the same time. The main goal of this dissector is to be able
  *   to troubleshoot connectivity, preferably pings. It's also a little to understand
  *   as to how host spanning fenced configurations actually talk.
  *
@@ -77,7 +77,7 @@ dissect_vmlab(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
 
     proto_tree*     volatile vmlab_tree;
     proto_item*     ti;
-    
+
     guint32         offset=0;
 
     const guint8*   src_addr;
@@ -93,7 +93,7 @@ dissect_vmlab(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
 
     ti = proto_tree_add_item(tree, proto_vmlab, tvb, 0, 24, FALSE);
     vmlab_tree = proto_item_add_subtree(ti, ett_vmlab);
-   
+
     /* Flags*/
     attributes = tvb_get_guint8(tvb, offset);
     proto_tree_add_item(vmlab_tree, hf_vmlab_flags_part1,    tvb, offset, 1, FALSE);
@@ -103,7 +103,7 @@ dissect_vmlab(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
         proto_item_append_text(ti, ", Fragment");
     }
     offset += 1;
-        
+
     /* Portgroup*/
     portgroup = tvb_get_guint8(tvb, offset);
     proto_tree_add_uint(vmlab_tree, hf_vmlab_portgroup, tvb, offset, 1, portgroup);
@@ -128,9 +128,9 @@ dissect_vmlab(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
     proto_tree_add_ether(vmlab_tree, hf_vmlab_eth_src, tvb, offset, 6, src_addr);
     offset += 6;
 
-    proto_item_append_text(ti, ", Src: %s (%s), Dst: %s (%s)", 
+    proto_item_append_text(ti, ", Src: %s (%s), Dst: %s (%s)",
                            get_ether_name(src_addr), ether_to_str(src_addr), get_ether_name(dst_addr), ether_to_str(dst_addr));
-        
+
     /* Encapsulated Ethertype is also part of the block*/
     encap_proto = tvb_get_ntohs(tvb, offset);
     offset += 2;
@@ -145,24 +145,24 @@ proto_register_vmlab(void)
 {
     static hf_register_info hf[] = {
 
-        { &hf_vmlab_flags_part1,    { "Unknown       ", "vmlab.unknown1", 
+        { &hf_vmlab_flags_part1,    { "Unknown", "vmlab.unknown1",
             FT_UINT8, BASE_HEX,  NULL, 0xF8, NULL, HFILL }},
-        { &hf_vmlab_flags_fragment, { "More Fragments", "vmlab.fragment", 
+        { &hf_vmlab_flags_fragment, { "More Fragments", "vmlab.fragment",
             FT_UINT8, BASE_NONE, VALS(fragment_vals), 0x04, NULL, HFILL }},
-        { &hf_vmlab_flags_part2,    { "Unknown       ", "vmlab.unknown2", 
+        { &hf_vmlab_flags_part2,    { "Unknown", "vmlab.unknown2",
             FT_UINT8, BASE_HEX,  NULL, 0x03, NULL, HFILL }},
 
-        { &hf_vmlab_portgroup,      { "Portgroup        ", "vmlab.pgrp", 
+        { &hf_vmlab_portgroup,      { "Portgroup", "vmlab.pgrp",
             FT_UINT8, BASE_DEC,  NULL, 0, NULL, HFILL }},
-        { &hf_vmlab_eth_src,        { "Source           ", "vmlab.src", 
+        { &hf_vmlab_eth_src,        { "Source", "vmlab.src",
             FT_ETHER, BASE_NONE, NULL, 0x0, NULL, HFILL }},
-        { &hf_vmlab_eth_dst,        { "Destination      ", "vmlab.dst", 
+        { &hf_vmlab_eth_dst,        { "Destination", "vmlab.dst",
             FT_ETHER, BASE_NONE, NULL, 0x0, NULL, HFILL }},
-        { &hf_vmlab_eth_addr,       { "Address          ", "vmlab.addr", 
+        { &hf_vmlab_eth_addr,       { "Address", "vmlab.addr",
             FT_ETHER, BASE_NONE, NULL, 0x0, NULL, HFILL }},
-        { &hf_vmlab_etype,          { "Encapsulated Type", "vmlab.subtype", 
+        { &hf_vmlab_etype,          { "Encapsulated Type", "vmlab.subtype",
             FT_UINT16, BASE_HEX, VALS(etype_vals), 0x0, NULL, HFILL }},
-        { &hf_vmlab_trailer,        { "Trailer", "vmlab.trailer", 
+        { &hf_vmlab_trailer,        { "Trailer", "vmlab.trailer",
             FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL }}
     };
     static gint *ett[] = {