diff --git a/tests/bsn_ipmask.py b/tests/bsn_ipmask.py
index e640089..8dd603a 100644
--- a/tests/bsn_ipmask.py
+++ b/tests/bsn_ipmask.py
@@ -47,9 +47,7 @@
         given wildcard index
         """
         logging.info("Setting index %d to mask is %s" % (index, mask))
-        m = ofp.message.vendor()
-        m.vendor = 0x005c16c7
-        m.data = struct.pack("!LBBBBL", 0, index, 0, 0, 0, mask)
+        m = ofp.message.bsn_set_ip_mask(index=index, mask=mask)
         self.controller.message_send(m)
 
     def bsn_get_ip_mask(self, index):
@@ -57,16 +55,11 @@
         Use the BSN_GET_IP_MASK_REQUEST vendor command to get the current IP mask
         for the given wildcard index
         """
-        m = ofp.message.vendor()
-        m.vendor = 0x005c16c7
-        m.data = struct.pack( "!LBBBBL", 1, index, 0, 0, 0, 0 )
-        self.controller.message_send(m)
-        m, r = self.controller.poll(ofp.OFPT_VENDOR)
-        self.assertEqual(m.vendor, 0x005c16c7, "Wrong vendor ID")
-        x = struct.unpack("!LBBBBL", m.data)
-        self.assertEqual(x[0], 2, "Wrong subtype")
-        self.assertEqual(x[1], index, "Wrong index")
-        return x[5]
+        request = ofp.message.bsn_get_ip_mask_request(index=index)
+        reply, _ = self.controller.transact(request)
+        self.assertTrue(isinstance(reply, ofp.message.bsn_get_ip_mask_reply), "Wrong reply type")
+        self.assertEqual(reply.index, index, "Wrong index")
+        return reply.mask
 
     def runTest(self):
         self.assertFalse(required_wildcards(self) & ofp.OFPFW_NW_DST_ALL,
diff --git a/tests/bsn_mirror.py b/tests/bsn_mirror.py
index 4a6e970..4e4343d 100644
--- a/tests/bsn_mirror.py
+++ b/tests/bsn_mirror.py
@@ -23,9 +23,7 @@
         Use the BSN_SET_MIRRORING vendor command to enable/disable
         mirror action support
         """
-        m = ofp.message.vendor()
-        m.vendor = 0x005c16c7
-        m.data = struct.pack("!LBBBB", 3, enabled, 0, 0, 0)
+        m = ofp.message.bsn_set_mirroring(report_mirror_ports=enabled)
         self.controller.message_send(m)
 
     def bsn_get_mirroring(self):
@@ -33,15 +31,10 @@
         Use the BSN_GET_MIRRORING_REQUEST vendor command to get the
         enabled/disabled state of mirror action support
         """
-        m = ofp.message.vendor()
-        m.vendor = 0x005c16c7
-        m.data = struct.pack("!LBBBB", 4, 0, 0, 0, 0)
-        self.controller.message_send(m)
-        m, r = self.controller.poll(ofp.OFPT_VENDOR, 2)
-        self.assertEqual(m.vendor, 0x005c16c7, "Wrong vendor ID")
-        x = struct.unpack("!LBBBB", m.data)
-        self.assertEqual(x[0], 5, "Wrong subtype")
-        return x[1]
+        request = ofp.message.bsn_get_mirroring_request()
+        reply, _ = self.controller.transact(request)
+        self.assertTrue(isinstance(reply, ofp.message.bsn_get_mirroring_reply), "Unexpected reply type")
+        return reply.report_mirror_ports
 
     def runTest(self):
         mirror_ports = test_param_get("mirror_ports")
diff --git a/tests/bsn_shell.py b/tests/bsn_shell.py
index 8886c80..2ac2f08 100644
--- a/tests/bsn_shell.py
+++ b/tests/bsn_shell.py
@@ -22,23 +22,17 @@
         Use the BSN_SHELL_COMMAND vendor command to run the given command
         and receive the output
         """
-        m = ofp.message.vendor()
-        m.vendor = 0x005c16c7
-        m.data = struct.pack("!LL", 6, 0) + cmd
-        rc = self.controller.message_send(m)
-        self.assertNotEqual(rc, -1, "Error sending shell command")
+        m = ofp.message.bsn_shell_command(service=0, data=cmd)
+        self.controller.message_send(m)
         out = ""
         while True:
-            m, r = self.controller.poll(ofp.OFPT_VENDOR, 60)
-            self.assertEqual(m.vendor, 0x005c16c7, "Wrong vendor ID")
-            subtype = struct.unpack("!L", m.data[:4])[0]
-            if subtype == 7:
-               out += m.data[4:]
-            elif subtype == 8:
-               status = struct.unpack("!LL", m.data)[1]
-               return status, out
+            m, _ = self.controller.poll(ofp.OFPT_VENDOR, 60)
+            if isinstance(m, ofp.message.bsn_shell_output):
+                out += m.data
+            elif isinstance(m, ofp.message.bsn_shell_status):
+                return m.status, out
             else:
-               assert False, "Wrong subtype"
+                raise AssertionError("Unexpected message received")
 
     def runTest(self):
         status, out = self.bsn_shell_command("echo _one     space_")
diff --git a/tests/nicira_role.py b/tests/nicira_role.py
index 24606a2..1122a7b 100644
--- a/tests/nicira_role.py
+++ b/tests/nicira_role.py
@@ -11,12 +11,7 @@
 
 from oftest.testutils import *
 
-# Nicira vendor extension constants
-NXT_VENDOR = 0x00002320
-
-NXT_ROLE_REQUEST = 10
-
-NXT_ROLE_VALUE = dict( other=0, slave=1, master=2 )
+NX_ROLE_MASTER = 2
 
 @nonstandard
 class NiciraRoleRequest(base_tests.SimpleDataPlane):
@@ -24,21 +19,10 @@
     Exercise Nicira vendor extension for requesting HA roles
     """
 
-    def nicira_role_request(self, role):
-        """
-        Use the BSN_SET_IP_MASK vendor command to change the IP mask for the
-        given wildcard index
-        """
-        logging.info("Sending role request %s" % role)
-        m = ofp.message.vendor()
-        m.vendor = NXT_VENDOR
-        m.data = struct.pack("!LL", NXT_ROLE_REQUEST, NXT_ROLE_VALUE[role])
-        return m
-
     def runTest(self):
         '''
         For now, we only verify that a response is received.
         '''
-        request = self.nicira_role_request("master")
+        request = ofp.message.nicira_controller_role_request(role=NX_ROLE_MASTER)
         response, pkt = self.controller.transact(request)
         self.assertTrue(response is not None, "No reply to Nicira role request")
