+#ifdef KERNEL_PRIVATE
+/*!
+ @typedef ctl_rcvd_func
+ @discussion The ctl_rcvd_func is called when the client reads data from
+ the kernel control socket. The kernel control can use this callback
+ in combination with ctl_getenqueuespace() to avoid overflowing
+ the socket's receive buffer. When ctl_getenqueuespace() returns
+ 0 or ctl_enqueuedata()/ctl_enqueuembuf() return ENOBUFS, the
+ kernel control can wait until this callback is called before
+ trying to enqueue the data again.
+ @param kctlref The control ref of the kernel control.
+ @param unit The unit number of the kernel control instance.
+ @param unitinfo The user-defined private data initialized by the
+ ctl_connect_func callback.
+ @param flags The recv flags. See the recv(2) man page.
+ */
+typedef void (*ctl_rcvd_func)(kern_ctl_ref kctlref, u_int32_t unit, void *unitinfo,
+ int flags);
+
+/*!
+ @typedef ctl_send_list_func
+ @discussion The ctl_send_list_func is used to receive data sent from
+ the client to the kernel control.
+ @param kctlref The control ref of the kernel control.
+ @param unit The unit number of the kernel control instance the client has
+ connected to.
+ @param unitinfo The user-defined private data initialized by the
+ ctl_connect_func callback.
+ @param m The data sent by the client to the kernel control in an
+ mbuf packet chain. Your function is responsible for releasing
+ mbuf packet chain.
+ @param flags The flags specified by the client when calling
+ send/sendto/sendmsg (MSG_OOB/MSG_DONTROUTE).
+ */
+typedef errno_t (*ctl_send_list_func)(kern_ctl_ref kctlref, u_int32_t unit, void *unitinfo,
+ mbuf_t m, int flags);
+#endif /* KERNEL_PRIVATE */
+