+extern errno_t sock_nointerrupt(socket_t so, int on);
+
+/*
+ @function sock_getlistener
+ @discussion Retrieves the listening socket of a pre-accepted socket,
+ i.e. a socket which is still in the incomplete/completed list.
+ Once a socket has been accepted, the information pertaining
+ to its listener is no longer available. Therefore, modules
+ interested in finding out the listening socket should install
+ the appropriate socket filter callback (sf_attach) which gets
+ invoked prior to the socket being fully accepted, and call
+ this routine at such a time to obtain the listener. Callers
+ are guaranteed that the listener socket will not go away
+ during the sf_attach callback, and therefore the value is
+ safe to be used only in that callback context. Callers should
+ therefore take note that the listening socket's lock will be
+ held throughout the duration of the callback.
+ @param so The pre-accepted socket.
+ @result Non-NULL value which indicates the listening socket; otherwise,
+ NULL if the socket is not in the incomplete/completed list
+ of a listener.
+ */
+extern socket_t sock_getlistener(socket_t so);
+
+/*
+ @function sock_getaddr
+ @discussion Retrieves the local or remote address of a socket.
+ This is a composite of sock_getpeername and sock_getsockname,
+ except that the allocated socket address is returned to the
+ caller, and that the caller is reponsible for calling
+ sock_freeaddr once finished with it.
+ @param so The socket.
+ @param psockname Pointer to the storage for the socket name.
+ @param peername 0 for local address, and non-zero for peer address.
+ @result 0 on success otherwise the errno error.
+ */
+extern errno_t sock_getaddr(socket_t so, struct sockaddr **psockname,
+ int peername);
+
+/*
+ @function sock_freeaddr
+ @discussion Frees the socket address allocated by sock_getaddr.
+ @param sockname The socket name to be freed.
+ */
+extern void sock_freeaddr(struct sockaddr *sockname);
+#endif /* KERNEL_PRIVATE */
+
+__END_DECLS
+#endif /* __KPI_SOCKET__ */