+/*
+ * @function sock_setupcalls_locked
+ * @discussion The locked version of sock_setupcalls
+ * @param locked: When sets, indicates that the callbacks expect to be
+ * on a locked socket. Thus, no unlock is done prior to
+ * calling the callback.
+ */
+extern void sock_setupcalls_locked(socket_t sock,
+ sock_upcall rcallback, void *rcontext,
+ sock_upcall wcallback, void *wcontext, int locked);
+
+/*
+ * @function sock_catchevents
+ * @discussion Set the notifier function to be called when an event
+ * occurs on the socket. This may be set to NULL to disable
+ * further notifications. Setting the function does not
+ * affect currently notifications about to be sent or being sent.
+ * @param sock The socket.
+ * @param event_callback The event notifier function
+ * @param event_context A cookie passed directly to the event callback
+ * @param event_mask One or more SO_FILT_HINT_* values OR'ed together,
+ * indicating the registered event(s).
+ */
+extern errno_t sock_catchevents(socket_t sock, sock_evupcall event_callback,
+ void *event_context, u_int32_t event_mask);
+
+extern void sock_catchevents_locked(socket_t sock, sock_evupcall ecallback,
+ void *econtext, u_int32_t emask);
+
+
+/*
+ * @function sock_iskernel
+ * @discussion Returns true if the socket was created by the kernel or
+ * is owned by the kernel.
+ * @param sock The socket.
+ * @result True if the kernel owns the socket.
+ */
+extern int sock_iskernel(socket_t);