diff --git a/src/python/of10/parse.py b/src/python/of10/parse.py
index e56b69a..5c3ce65 100644
--- a/src/python/of10/parse.py
+++ b/src/python/of10/parse.py
@@ -172,13 +172,13 @@
     return hdr
 
 map_wc_field_to_match_member = {
-    'OFPFW_DL_VLAN'                 : 'dl_vlan',
-    'OFPFW_DL_SRC'                  : 'dl_src',
-    'OFPFW_DL_DST'                  : 'dl_dst',
-    'OFPFW_DL_TYPE'                 : 'dl_type',
-    'OFPFW_NW_PROTO'                : 'nw_proto',
-    'OFPFW_TP_SRC'                  : 'tp_src',
-    'OFPFW_TP_DST'                  : 'tp_dst',
+    'OFPFW_DL_VLAN'                 : 'vlan_vid',
+    'OFPFW_DL_SRC'                  : 'eth_src',
+    'OFPFW_DL_DST'                  : 'eth_dst',
+    'OFPFW_DL_TYPE'                 : 'eth_type',
+    'OFPFW_NW_PROTO'                : 'ip_proto',
+    'OFPFW_TP_SRC'                  : 'tcp_src',
+    'OFPFW_TP_DST'                  : 'tcp_dst',
     'OFPFW_NW_SRC_SHIFT'            : 'nw_src_shift',
     'OFPFW_NW_SRC_BITS'             : 'nw_src_bits',
     'OFPFW_NW_SRC_MASK'             : 'nw_src_mask',
@@ -187,8 +187,8 @@
     'OFPFW_NW_DST_BITS'             : 'nw_dst_bits',
     'OFPFW_NW_DST_MASK'             : 'nw_dst_mask',
     'OFPFW_NW_DST_ALL'              : 'nw_dst_all',
-    'OFPFW_DL_VLAN_PCP'             : 'dl_vlan_pcp',
-    'OFPFW_NW_TOS'                  : 'nw_tos'
+    'OFPFW_DL_VLAN_PCP'             : 'vlan_pcp',
+    'OFPFW_NW_TOS'                  : 'ip_dscp'
 }
 
 
@@ -287,57 +287,57 @@
     match = cstruct.ofp_match()
     match.wildcards = cstruct.OFPFW_ALL
     #@todo Check if packet is other than L2 format
-    match.dl_dst = parse_mac(ether.dst)
+    match.eth_dst = parse_mac(ether.dst)
     match.wildcards &= ~cstruct.OFPFW_DL_DST
-    match.dl_src = parse_mac(ether.src)
+    match.eth_src = parse_mac(ether.src)
     match.wildcards &= ~cstruct.OFPFW_DL_SRC
-    match.dl_type = ether.type
+    match.eth_type = ether.type
     match.wildcards &= ~cstruct.OFPFW_DL_TYPE
 
     if dot1q:
-        match.dl_vlan = dot1q.vlan
-        match.dl_vlan_pcp = dot1q.prio
-        match.dl_type = dot1q.type
+        match.vlan_vid = dot1q.vlan
+        match.vlan_pcp = dot1q.prio
+        match.eth_type = dot1q.type
     else:
-        match.dl_vlan = cstruct.OFP_VLAN_NONE
-        match.dl_vlan_pcp = 0
+        match.vlan_vid = cstruct.OFP_VLAN_NONE
+        match.vlan_pcp = 0
     match.wildcards &= ~cstruct.OFPFW_DL_VLAN
     match.wildcards &= ~cstruct.OFPFW_DL_VLAN_PCP
 
     if ip:
-        match.nw_src = parse_ip(ip.src)
+        match.ipv4_src = parse_ip(ip.src)
         match.wildcards &= ~cstruct.OFPFW_NW_SRC_MASK
-        match.nw_dst = parse_ip(ip.dst)
+        match.ipv4_dst = parse_ip(ip.dst)
         match.wildcards &= ~cstruct.OFPFW_NW_DST_MASK
-        match.nw_tos = ip.tos
+        match.ip_dscp = ip.tos
         match.wildcards &= ~cstruct.OFPFW_NW_TOS
 
     if tcp:
-        match.nw_proto = 6
+        match.ip_proto = 6
         match.wildcards &= ~cstruct.OFPFW_NW_PROTO
     elif not tcp and udp:
         tcp = udp
-        match.nw_proto = 17
+        match.ip_proto = 17
         match.wildcards &= ~cstruct.OFPFW_NW_PROTO
 
     if tcp:
-        match.tp_src = tcp.sport
+        match.tcp_src = tcp.sport
         match.wildcards &= ~cstruct.OFPFW_TP_SRC
-        match.tp_dst = tcp.dport
+        match.tcp_dst = tcp.dport
         match.wildcards &= ~cstruct.OFPFW_TP_DST
 
     if icmp:
-        match.nw_proto = 1
-        match.tp_src = icmp.type
-        match.tp_dst = icmp.code
+        match.ip_proto = 1
+        match.tcp_src = icmp.type
+        match.tcp_dst = icmp.code
         match.wildcards &= ~cstruct.OFPFW_NW_PROTO
 
     if arp:
-        match.nw_proto = arp.op
+        match.ip_proto = arp.op
         match.wildcards &= ~cstruct.OFPFW_NW_PROTO
-        match.nw_src = parse_ip(arp.psrc)
+        match.ipv4_src = parse_ip(arp.psrc)
         match.wildcards &= ~cstruct.OFPFW_NW_SRC_MASK
-        match.nw_dst = parse_ip(arp.pdst)
+        match.ipv4_dst = parse_ip(arp.pdst)
         match.wildcards &= ~cstruct.OFPFW_NW_DST_MASK
 
     return match
diff --git a/src/python/oftest/testutils.py b/src/python/oftest/testutils.py
index 90d17ef..1aacf63 100644
--- a/src/python/oftest/testutils.py
+++ b/src/python/oftest/testutils.py
@@ -57,11 +57,11 @@
         return 0
 
 def simple_tcp_packet(pktlen=100, 
-                      dl_dst='00:01:02:03:04:05',
-                      dl_src='00:06:07:08:09:0a',
+                      eth_dst='00:01:02:03:04:05',
+                      eth_src='00:06:07:08:09:0a',
                       dl_vlan_enable=False,
-                      dl_vlan=0,
-                      dl_vlan_pcp=0,
+                      vlan_vid=0,
+                      vlan_pcp=0,
                       dl_vlan_cfi=0,
                       ip_src='192.168.0.1',
                       ip_dst='192.168.0.2',
@@ -77,11 +77,11 @@
 
     Supports a few parameters:
     @param len Length of packet in bytes w/o CRC
-    @param dl_dst Destinatino MAC
-    @param dl_src Source MAC
+    @param eth_dst Destinatino MAC
+    @param eth_src Source MAC
     @param dl_vlan_enable True if the packet is with vlan, False otherwise
-    @param dl_vlan VLAN ID
-    @param dl_vlan_pcp VLAN priority
+    @param vlan_vid VLAN ID
+    @param vlan_pcp VLAN priority
     @param ip_src IP source
     @param ip_dst IP destination
     @param ip_tos IP ToS
@@ -99,17 +99,17 @@
 
     # Note Dot1Q.id is really CFI
     if (dl_vlan_enable):
-        pkt = scapy.Ether(dst=dl_dst, src=dl_src)/ \
-            scapy.Dot1Q(prio=dl_vlan_pcp, id=dl_vlan_cfi, vlan=dl_vlan)/ \
+        pkt = scapy.Ether(dst=eth_dst, src=eth_src)/ \
+            scapy.Dot1Q(prio=vlan_pcp, id=dl_vlan_cfi, vlan=vlan_vid)/ \
             scapy.IP(src=ip_src, dst=ip_dst, tos=ip_tos, ttl=ip_ttl, ihl=ip_ihl)/ \
             scapy.TCP(sport=tcp_sport, dport=tcp_dport)
     else:
         if not ip_options:
-            pkt = scapy.Ether(dst=dl_dst, src=dl_src)/ \
+            pkt = scapy.Ether(dst=eth_dst, src=eth_src)/ \
                 scapy.IP(src=ip_src, dst=ip_dst, tos=ip_tos, ttl=ip_ttl, ihl=ip_ihl)/ \
                 scapy.TCP(sport=tcp_sport, dport=tcp_dport)
         else:
-            pkt = scapy.Ether(dst=dl_dst, src=dl_src)/ \
+            pkt = scapy.Ether(dst=eth_dst, src=eth_src)/ \
                 scapy.IP(src=ip_src, dst=ip_dst, tos=ip_tos, ttl=ip_ttl, ihl=ip_ihl, options=ip_options)/ \
                 scapy.TCP(sport=tcp_sport, dport=tcp_dport)
 
@@ -118,11 +118,11 @@
     return pkt
 
 def simple_udp_packet(pktlen=100,
-                      dl_dst='00:01:02:03:04:05',
-                      dl_src='00:06:07:08:09:0a',
+                      eth_dst='00:01:02:03:04:05',
+                      eth_src='00:06:07:08:09:0a',
                       dl_vlan_enable=False,
-                      dl_vlan=0,
-                      dl_vlan_pcp=0,
+                      vlan_vid=0,
+                      vlan_pcp=0,
                       dl_vlan_cfi=0,
                       ip_src='192.168.0.1',
                       ip_dst='192.168.0.2',
@@ -138,11 +138,11 @@
 
     Supports a few parameters:
     @param len Length of packet in bytes w/o CRC
-    @param dl_dst Destination MAC
-    @param dl_src Source MAC
+    @param eth_dst Destination MAC
+    @param eth_src Source MAC
     @param dl_vlan_enable True if the packet is with vlan, False otherwise
-    @param dl_vlan VLAN ID
-    @param dl_vlan_pcp VLAN priority
+    @param vlan_vid VLAN ID
+    @param vlan_pcp VLAN priority
     @param ip_src IP source
     @param ip_dst IP destination
     @param ip_tos IP ToS
@@ -159,17 +159,17 @@
 
     # Note Dot1Q.id is really CFI
     if (dl_vlan_enable):
-        pkt = scapy.Ether(dst=dl_dst, src=dl_src)/ \
-            scapy.Dot1Q(prio=dl_vlan_pcp, id=dl_vlan_cfi, vlan=dl_vlan)/ \
+        pkt = scapy.Ether(dst=eth_dst, src=eth_src)/ \
+            scapy.Dot1Q(prio=vlan_pcp, id=dl_vlan_cfi, vlan=vlan_vid)/ \
             scapy.IP(src=ip_src, dst=ip_dst, tos=ip_tos, ttl=ip_ttl, ihl=ip_ihl)/ \
             scapy.UDP(sport=udp_sport, dport=udp_dport)
     else:
         if not ip_options:
-            pkt = scapy.Ether(dst=dl_dst, src=dl_src)/ \
+            pkt = scapy.Ether(dst=eth_dst, src=eth_src)/ \
                 scapy.IP(src=ip_src, dst=ip_dst, tos=ip_tos, ttl=ip_ttl, ihl=ip_ihl)/ \
                 scapy.UDP(sport=udp_sport, dport=udp_dport)
         else:
-            pkt = scapy.Ether(dst=dl_dst, src=dl_src)/ \
+            pkt = scapy.Ether(dst=eth_dst, src=eth_src)/ \
                 scapy.IP(src=ip_src, dst=ip_dst, tos=ip_tos, ttl=ip_ttl, ihl=ip_ihl, options=ip_options)/ \
                 scapy.UDP(sport=udp_sport, dport=udp_dport)
 
@@ -178,11 +178,11 @@
     return pkt
 
 def simple_icmp_packet(pktlen=60, 
-                      dl_dst='00:01:02:03:04:05',
-                      dl_src='00:06:07:08:09:0a',
+                      eth_dst='00:01:02:03:04:05',
+                      eth_src='00:06:07:08:09:0a',
                       dl_vlan_enable=False,
-                      dl_vlan=0,
-                      dl_vlan_pcp=0,
+                      vlan_vid=0,
+                      vlan_pcp=0,
                       ip_src='192.168.0.1',
                       ip_dst='192.168.0.2',
                       ip_tos=0,
@@ -195,11 +195,11 @@
 
     Supports a few parameters:
     @param len Length of packet in bytes w/o CRC
-    @param dl_dst Destinatino MAC
-    @param dl_src Source MAC
+    @param eth_dst Destinatino MAC
+    @param eth_src Source MAC
     @param dl_vlan_enable True if the packet is with vlan, False otherwise
-    @param dl_vlan VLAN ID
-    @param dl_vlan_pcp VLAN priority
+    @param vlan_vid VLAN ID
+    @param vlan_pcp VLAN priority
     @param ip_src IP source
     @param ip_dst IP destination
     @param ip_tos IP ToS
@@ -216,12 +216,12 @@
         pktlen = MINSIZE
 
     if (dl_vlan_enable):
-        pkt = scapy.Ether(dst=dl_dst, src=dl_src)/ \
-            scapy.Dot1Q(prio=dl_vlan_pcp, id=0, vlan=dl_vlan)/ \
+        pkt = scapy.Ether(dst=eth_dst, src=eth_src)/ \
+            scapy.Dot1Q(prio=vlan_pcp, id=0, vlan=vlan_vid)/ \
             scapy.IP(src=ip_src, dst=ip_dst, ttl=ip_ttl, tos=ip_tos)/ \
             scapy.ICMP(type=icmp_type, code=icmp_code)
     else:
-        pkt = scapy.Ether(dst=dl_dst, src=dl_src)/ \
+        pkt = scapy.Ether(dst=eth_dst, src=eth_src)/ \
             scapy.IP(src=ip_src, dst=ip_dst, ttl=ip_ttl, tos=ip_tos)/ \
             scapy.ICMP(type=icmp_type, code=icmp_code)
 
@@ -230,8 +230,8 @@
     return pkt
 
 def simple_arp_packet(pktlen=60, 
-                      dl_dst='ff:ff:ff:ff:ff:ff',
-                      dl_src='00:06:07:08:09:0a',
+                      eth_dst='ff:ff:ff:ff:ff:ff',
+                      eth_src='00:06:07:08:09:0a',
                       arp_op=1,
                       ip_snd='192.168.0.1',
                       ip_tgt='192.168.0.2',
@@ -243,8 +243,8 @@
 
     Supports a few parameters:
     @param len Length of packet in bytes w/o CRC
-    @param dl_dst Destinatino MAC
-    @param dl_src Source MAC
+    @param eth_dst Destinatino MAC
+    @param eth_src Source MAC
     @param arp_op Operation (1=request, 2=reply)
     @param ip_snd Sender IP
     @param ip_tgt Target IP
@@ -259,7 +259,7 @@
     if MINSIZE > pktlen:
         pktlen = MINSIZE
 
-    pkt = scapy.Ether(dst=dl_dst, src=dl_src)/ \
+    pkt = scapy.Ether(dst=eth_dst, src=eth_src)/ \
           scapy.ARP(hwsrc=hw_snd, hwdst=hw_tgt, pdst=ip_tgt, psrc=ip_snd, op=arp_op)
 
     pkt = pkt/("0" * (pktlen - len(pkt)))
@@ -267,27 +267,27 @@
     return pkt
 
 def simple_eth_packet(pktlen=60,
-                      dl_dst='00:01:02:03:04:05',
-                      dl_src='01:80:c2:00:00:00',
-                      dl_type=0x88cc):
+                      eth_dst='00:01:02:03:04:05',
+                      eth_src='01:80:c2:00:00:00',
+                      eth_type=0x88cc):
 
     if MINSIZE > pktlen:
         pktlen = MINSIZE
 
-    pkt = scapy.Ether(dst=dl_dst, src=dl_src, type=dl_type)
+    pkt = scapy.Ether(dst=eth_dst, src=eth_src, type=eth_type)
 
     pkt = pkt/("0" * (pktlen - len(pkt)))
 
     return pkt
 
 def qinq_tcp_packet(pktlen=100, 
-                    dl_dst='00:01:02:03:04:05',
-                    dl_src='00:06:07:08:09:0a',
+                    eth_dst='00:01:02:03:04:05',
+                    eth_src='00:06:07:08:09:0a',
                     dl_vlan_outer=20,
                     dl_vlan_pcp_outer=0,
                     dl_vlan_cfi_outer=0,
-                    dl_vlan=10,
-                    dl_vlan_pcp=0,
+                    vlan_vid=10,
+                    vlan_pcp=0,
                     dl_vlan_cfi=0,
                     ip_src='192.168.0.1',
                     ip_dst='192.168.0.2',
@@ -303,13 +303,13 @@
 
     Supports a few parameters:
     @param len Length of packet in bytes w/o CRC
-    @param dl_dst Destinatino MAC
-    @param dl_src Source MAC
+    @param eth_dst Destinatino MAC
+    @param eth_src Source MAC
     @param dl_vlan_outer Outer VLAN ID
     @param dl_vlan_pcp_outer Outer VLAN priority
     @param dl_vlan_cfi_outer Outer VLAN cfi bit
-    @param dl_vlan Inner VLAN ID
-    @param dl_vlan_pcp VLAN priority
+    @param vlan_vid Inner VLAN ID
+    @param vlan_pcp VLAN priority
     @param dl_vlan_cfi VLAN cfi bit
     @param ip_src IP source
     @param ip_dst IP destination
@@ -326,9 +326,9 @@
         pktlen = MINSIZE
 
     # Note Dot1Q.id is really CFI
-    pkt = scapy.Ether(dst=dl_dst, src=dl_src)/ \
+    pkt = scapy.Ether(dst=eth_dst, src=eth_src)/ \
           scapy.Dot1Q(prio=dl_vlan_pcp_outer, id=dl_vlan_cfi_outer, vlan=dl_vlan_outer)/ \
-          scapy.Dot1Q(prio=dl_vlan_pcp, id=dl_vlan_cfi, vlan=dl_vlan)/ \
+          scapy.Dot1Q(prio=vlan_pcp, id=dl_vlan_cfi, vlan=vlan_vid)/ \
           scapy.IP(src=ip_src, dst=ip_dst, tos=ip_tos, ttl=ip_ttl, ihl=ip_ihl)/ \
           scapy.TCP(sport=tcp_sport, dport=tcp_dport)
 
@@ -500,49 +500,49 @@
     parent.assertEqual(req_match.in_port, res_match.in_port,
                        'Match failed: in_port: ' + str(req_match.in_port) +
                        " != " + str(res_match.in_port))
-    parent.assertEqual(str(req_match.dl_src), str(res_match.dl_src),
-                       'Match failed: dl_src: ' + str(req_match.dl_src) +
-                       " != " + str(res_match.dl_src))
-    parent.assertEqual(str(req_match.dl_dst), str(res_match.dl_dst),
-                       'Match failed: dl_dst: ' + str(req_match.dl_dst) +
-                       " != " + str(res_match.dl_dst))
-    parent.assertEqual(req_match.dl_vlan, res_match.dl_vlan,
-                       'Match failed: dl_vlan: ' + str(req_match.dl_vlan) +
-                       " != " + str(res_match.dl_vlan))
-    parent.assertEqual(req_match.dl_vlan_pcp, res_match.dl_vlan_pcp,
-                       'Match failed: dl_vlan_pcp: ' + 
-                       str(req_match.dl_vlan_pcp) + " != " + 
-                       str(res_match.dl_vlan_pcp))
-    parent.assertEqual(req_match.dl_type, res_match.dl_type,
-                       'Match failed: dl_type: ' + str(req_match.dl_type) +
-                       " != " + str(res_match.dl_type))
+    parent.assertEqual(str(req_match.eth_src), str(res_match.eth_src),
+                       'Match failed: eth_src: ' + str(req_match.eth_src) +
+                       " != " + str(res_match.eth_src))
+    parent.assertEqual(str(req_match.eth_dst), str(res_match.eth_dst),
+                       'Match failed: eth_dst: ' + str(req_match.eth_dst) +
+                       " != " + str(res_match.eth_dst))
+    parent.assertEqual(req_match.vlan_vid, res_match.vlan_vid,
+                       'Match failed: vlan_vid: ' + str(req_match.vlan_vid) +
+                       " != " + str(res_match.vlan_vid))
+    parent.assertEqual(req_match.vlan_pcp, res_match.vlan_pcp,
+                       'Match failed: vlan_pcp: ' + 
+                       str(req_match.vlan_pcp) + " != " + 
+                       str(res_match.vlan_pcp))
+    parent.assertEqual(req_match.eth_type, res_match.eth_type,
+                       'Match failed: eth_type: ' + str(req_match.eth_type) +
+                       " != " + str(res_match.eth_type))
 
     if (not(req_match.wildcards & of10.OFPFW_DL_TYPE)
-        and (req_match.dl_type == IP_ETHERTYPE)):
-        parent.assertEqual(req_match.nw_tos, res_match.nw_tos,
-                           'Match failed: nw_tos: ' + str(req_match.nw_tos) +
-                           " != " + str(res_match.nw_tos))
-        parent.assertEqual(req_match.nw_proto, res_match.nw_proto,
-                           'Match failed: nw_proto: ' + str(req_match.nw_proto) +
-                           " != " + str(res_match.nw_proto))
-        parent.assertEqual(req_match.nw_src, res_match.nw_src,
-                           'Match failed: nw_src: ' + str(req_match.nw_src) +
-                           " != " + str(res_match.nw_src))
-        parent.assertEqual(req_match.nw_dst, res_match.nw_dst,
-                           'Match failed: nw_dst: ' + str(req_match.nw_dst) +
-                           " != " + str(res_match.nw_dst))
+        and (req_match.eth_type == IP_ETHERTYPE)):
+        parent.assertEqual(req_match.ip_dscp, res_match.ip_dscp,
+                           'Match failed: ip_dscp: ' + str(req_match.ip_dscp) +
+                           " != " + str(res_match.ip_dscp))
+        parent.assertEqual(req_match.ip_proto, res_match.ip_proto,
+                           'Match failed: ip_proto: ' + str(req_match.ip_proto) +
+                           " != " + str(res_match.ip_proto))
+        parent.assertEqual(req_match.ipv4_src, res_match.ipv4_src,
+                           'Match failed: ipv4_src: ' + str(req_match.ipv4_src) +
+                           " != " + str(res_match.ipv4_src))
+        parent.assertEqual(req_match.ipv4_dst, res_match.ipv4_dst,
+                           'Match failed: ipv4_dst: ' + str(req_match.ipv4_dst) +
+                           " != " + str(res_match.ipv4_dst))
 
         if (not(req_match.wildcards & of10.OFPFW_NW_PROTO)
-            and ((req_match.nw_proto == TCP_PROTOCOL)
-                 or (req_match.nw_proto == UDP_PROTOCOL))):
-            parent.assertEqual(req_match.tp_src, res_match.tp_src,
-                               'Match failed: tp_src: ' + 
-                               str(req_match.tp_src) +
-                               " != " + str(res_match.tp_src))
-            parent.assertEqual(req_match.tp_dst, res_match.tp_dst,
-                               'Match failed: tp_dst: ' + 
-                               str(req_match.tp_dst) +
-                               " != " + str(res_match.tp_dst))
+            and ((req_match.ip_proto == TCP_PROTOCOL)
+                 or (req_match.ip_proto == UDP_PROTOCOL))):
+            parent.assertEqual(req_match.tcp_src, res_match.tcp_src,
+                               'Match failed: tcp_src: ' + 
+                               str(req_match.tcp_src) +
+                               " != " + str(res_match.tcp_src))
+            parent.assertEqual(req_match.tcp_dst, res_match.tcp_dst,
+                               'Match failed: tcp_dst: ' + 
+                               str(req_match.tcp_dst) +
+                               " != " + str(res_match.tcp_dst))
 
 def packet_to_flow_match(parent, packet):
     match = of10.parse.packet_to_flow_match(packet)
@@ -627,7 +627,7 @@
     do_barrier(parent.controller)
 
 def flow_match_test_port_pair(parent, ing_port, egr_ports, wildcards=None,
-                              dl_vlan=-1, pkt=None, exp_pkt=None,
+                              vlan_vid=-1, pkt=None, exp_pkt=None,
                               action_list=None):
     """
     Flow match test on single TCP packet
@@ -641,9 +641,9 @@
         wildcards = required_wildcards(parent)
     logging.info("Pkt match test: " + str(ing_port) + " to " + 
                        str(egr_ports))
-    logging.debug("  WC: " + hex(wildcards) + " vlan: " + str(dl_vlan))
+    logging.debug("  WC: " + hex(wildcards) + " vlan: " + str(vlan_vid))
     if pkt is None:
-        pkt = simple_tcp_packet(dl_vlan_enable=(dl_vlan >= 0), dl_vlan=dl_vlan)
+        pkt = simple_tcp_packet(dl_vlan_enable=(vlan_vid >= 0), vlan_vid=vlan_vid)
 
     request = flow_msg_create(parent, pkt, ing_port=ing_port, 
                               wildcards=wildcards, egr_ports=egr_ports,
@@ -660,7 +660,7 @@
     receive_pkt_verify(parent, egr_ports, exp_pkt, ing_port)
 
 def flow_match_test_pktout(parent, ing_port, egr_ports,
-                           dl_vlan=-1, pkt=None, exp_pkt=None,
+                           vlan_vid=-1, pkt=None, exp_pkt=None,
                            action_list=None):
     """
     Packet-out test on single TCP packet
@@ -672,7 +672,7 @@
     """
 
     if pkt is None:
-        pkt = simple_tcp_packet(dl_vlan_enable=(dl_vlan >= 0), dl_vlan=dl_vlan)
+        pkt = simple_tcp_packet(dl_vlan_enable=(vlan_vid >= 0), vlan_vid=vlan_vid)
 
     msg = of10.message.packet_out()
     msg.in_port = ing_port
@@ -719,7 +719,7 @@
     logging.debug("Could not generate enough egress ports for test")
     return []
     
-def flow_match_test(parent, port_map, wildcards=None, dl_vlan=-1, pkt=None, 
+def flow_match_test(parent, port_map, wildcards=None, vlan_vid=-1, pkt=None, 
                     exp_pkt=None, action_list=None,
                     max_test=0, egr_count=1, ing_port=False):
     """
@@ -730,7 +730,7 @@
     and logging
     @param pkt If not None, use this packet for ingress
     @param wildcards For flow match entry
-    @param dl_vlan If not -1, and pkt is None, create a pkt w/ VLAN tag
+    @param vlan_vid If not -1, and pkt is None, create a pkt w/ VLAN tag
     @param exp_pkt If not None, use this as the expected output pkt; els use pkt
     @param action_list Additional actions to add to flow mod
     @param egr_count Number of egress ports; -1 means get from config w/ dflt 2
@@ -755,7 +755,7 @@
             parent.assertTrue(0, "Failed to generate egress port list")
 
         flow_match_test_port_pair(parent, ingress_port, egr_ports, 
-                                  wildcards=wildcards, dl_vlan=dl_vlan, 
+                                  wildcards=wildcards, vlan_vid=vlan_vid, 
                                   pkt=pkt, exp_pkt=exp_pkt,
                                   action_list=action_list)
         test_count += 1
@@ -772,7 +772,7 @@
     if ing_port:
         egr_ports.append(of10.OFPP_IN_PORT)
     flow_match_test_pktout(parent, ingress_port, egr_ports,
-                           dl_vlan=dl_vlan,
+                           vlan_vid=vlan_vid,
                            pkt=pkt, exp_pkt=exp_pkt,
                            action_list=action_list)
 
@@ -816,23 +816,23 @@
     if field_to_mod in ['pktlen']:
         return None
 
-    if field_to_mod == 'dl_dst':
+    if field_to_mod == 'eth_dst':
         act = of10.action.action_set_dl_dst()
-        act.dl_addr = of10.parse.parse_mac(mod_field_vals['dl_dst'])
-    elif field_to_mod == 'dl_src':
+        act.dl_addr = of10.parse.parse_mac(mod_field_vals['eth_dst'])
+    elif field_to_mod == 'eth_src':
         act = of10.action.action_set_dl_src()
-        act.dl_addr = of10.parse.parse_mac(mod_field_vals['dl_src'])
+        act.dl_addr = of10.parse.parse_mac(mod_field_vals['eth_src'])
     elif field_to_mod == 'dl_vlan_enable':
         if not mod_field_vals['dl_vlan_enable']: # Strip VLAN tag
             act = of10.action.action_strip_vlan()
-        # Add VLAN tag is handled by dl_vlan field
+        # Add VLAN tag is handled by vlan_vid field
         # Will return None in this case
-    elif field_to_mod == 'dl_vlan':
+    elif field_to_mod == 'vlan_vid':
         act = of10.action.action_set_vlan_vid()
-        act.vlan_vid = mod_field_vals['dl_vlan']
-    elif field_to_mod == 'dl_vlan_pcp':
+        act.vlan_vid = mod_field_vals['vlan_vid']
+    elif field_to_mod == 'vlan_pcp':
         act = of10.action.action_set_vlan_pcp()
-        act.vlan_pcp = mod_field_vals['dl_vlan_pcp']
+        act.vlan_pcp = mod_field_vals['vlan_pcp']
     elif field_to_mod == 'ip_src':
         act = of10.action.action_set_nw_src()
         act.nw_addr = of10.parse.parse_ip(mod_field_vals['ip_src'])
@@ -878,11 +878,11 @@
 
     base_pkt_params = {}
     base_pkt_params['pktlen'] = 100
-    base_pkt_params['dl_dst'] = '00:DE:F0:12:34:56'
-    base_pkt_params['dl_src'] = '00:23:45:67:89:AB'
+    base_pkt_params['eth_dst'] = '00:DE:F0:12:34:56'
+    base_pkt_params['eth_src'] = '00:23:45:67:89:AB'
     base_pkt_params['dl_vlan_enable'] = False
-    base_pkt_params['dl_vlan'] = 2
-    base_pkt_params['dl_vlan_pcp'] = 0
+    base_pkt_params['vlan_vid'] = 2
+    base_pkt_params['vlan_pcp'] = 0
     base_pkt_params['ip_src'] = '192.168.0.1'
     base_pkt_params['ip_dst'] = '192.168.0.2'
     base_pkt_params['ip_tos'] = 0
@@ -897,11 +897,11 @@
 
     mod_pkt_params = {}
     mod_pkt_params['pktlen'] = 100
-    mod_pkt_params['dl_dst'] = '00:21:0F:ED:CB:A9'
-    mod_pkt_params['dl_src'] = '00:ED:CB:A9:87:65'
+    mod_pkt_params['eth_dst'] = '00:21:0F:ED:CB:A9'
+    mod_pkt_params['eth_src'] = '00:ED:CB:A9:87:65'
     mod_pkt_params['dl_vlan_enable'] = False
-    mod_pkt_params['dl_vlan'] = 3
-    mod_pkt_params['dl_vlan_pcp'] = 7
+    mod_pkt_params['vlan_vid'] = 3
+    mod_pkt_params['vlan_pcp'] = 7
     mod_pkt_params['ip_src'] = '10.20.30.40'
     mod_pkt_params['ip_dst'] = '50.60.70.80'
     mod_pkt_params['ip_tos'] = 0xf0
@@ -926,9 +926,9 @@
 
         if vid:
             base_pkt_params['dl_vlan_enable'] = True
-            base_pkt_params['dl_vlan'] = vid
-            if 'dl_vlan' in mod_fields:
-                mod_pkt_params['dl_vlan'] = vid + 1
+            base_pkt_params['vlan_vid'] = vid
+            if 'vlan_vid' in mod_fields:
+                mod_pkt_params['vlan_vid'] = vid + 1
 
         if add_vlan:
             base_pkt_params['dl_vlan_enable'] = False
@@ -936,8 +936,8 @@
             mod_pkt_params['pktlen'] = base_pkt_params['pktlen'] + 4
             mod_fields.append('pktlen')
             mod_fields.append('dl_vlan_enable')
-            if 'dl_vlan' not in mod_fields:
-                mod_fields.append('dl_vlan')
+            if 'vlan_vid' not in mod_fields:
+                mod_fields.append('vlan_vid')
         elif strip_vlan:
             base_pkt_params['dl_vlan_enable'] = True
             mod_pkt_params['dl_vlan_enable'] = False
