+ /*
+ * Interface/routing/protocol specific ioctls:
+ * interface and routing ioctls should have a
+ * different entry since a socket's unnecessary
+ */
+#define cmdbyte(x) (((x) >> 8) & 0xff)
+ if (cmdbyte(cmd) == 'i')
+ return (ifioctl(cmd, data));
+ if (cmdbyte(cmd) == 'r')
+ return (rtioctl(cmd, data));
+ return ((*so->so_proto->pr_usrreq)(so, PRU_CONTROL,
+ (struct mbuf *)cmd, (struct mbuf *)data, (struct mbuf *)0));