+extern void a_init(const char */*sock*/,
+ uid_t /*u*/, gid_t /*g*/, mode_t /*m*/);
+
+/*----- Mapping with addresses as keys ------------------------------------*/
+
+/* --- @am_create@ --- *
+ *
+ * Arguments: @addrmap *m@ = pointer to map
+ *
+ * Returns: ---
+ *
+ * Use: Create an address map, properly set up.
+ */
+
+extern void am_create(addrmap */*m*/);
+
+/* --- @am_destroy@ --- *
+ *
+ * Arguments: @addrmap *m@ = pointer to map
+ *
+ * Returns: ---
+ *
+ * Use: Destroy an address map, throwing away all the entries.
+ */
+
+extern void am_destroy(addrmap */*m*/);
+
+/* --- @am_find@ --- *
+ *
+ * Arguments: @addrmap *m@ = pointer to map
+ * @const addr *a@ = address to look up
+ * @size_t sz@ = size of block to allocate
+ * @unsigned *f@ = where to store flags
+ *
+ * Returns: Pointer to found item, or null.
+ *
+ * Use: Finds a record with the given IP address, set @*f@ nonzero
+ * and returns it. If @sz@ is zero, and no match was found,
+ * return null; otherwise allocate a new block of @sz@ bytes,
+ * clear @*f@ to zero and return the block pointer.
+ */
+
+extern void *am_find(addrmap */*m*/, const addr */*a*/,
+ size_t /*sz*/, unsigned */*f*/);
+
+/* --- @am_remove@ --- *
+ *
+ * Arguments: @addrmap *m@ = pointer to map
+ * @void *i@ = pointer to the item
+ *
+ * Returns: ---
+ *
+ * Use: Removes an item from the map.
+ */
+
+extern void am_remove(addrmap */*m*/, void */*i*/);
+
+/*----- Privilege separation ----------------------------------------------*/
+
+/* --- @ps_trace@ --- *
+ *
+ * Arguments: @unsigned mask@ = trace mask to check
+ * @const char *fmt@ = message format
+ * @...@ = values for placeholders
+ *
+ * Returns: ---
+ *
+ * Use: Writes a trace message.
+ */
+
+T( extern void PRINTF_LIKE(2, 3)
+ ps_trace(unsigned /*mask*/, const char */*fmt*/, ...); )
+
+/* --- @ps_warn@ --- *
+ *
+ * Arguments: @const char *fmt@ = message format
+ * @...@ = values for placeholders
+ *
+ * Returns: ---
+ *
+ * Use: Writes a warning message.
+ */
+
+extern void PRINTF_LIKE(1, 2) ps_warn(const char */*fmt*/, ...);
+
+/* --- @ps_tunfd@ --- *
+ *
+ * Arguments: @const tunnel_ops *tops@ = pointer to tunnel operations
+ * @char **ifn@ = where to put the interface name
+ *
+ * Returns: The file descriptor, or @-1@ on error.
+ *
+ * Use: Fetches a file descriptor for a tunnel driver.
+ */
+
+extern int ps_tunfd(const tunnel_ops */*tops*/, char **/*ifn*/);
+
+/* --- @ps_split@ --- *
+ *
+ * Arguments: @int detachp@ = whether to detach the child from its terminal
+ *
+ * Returns: ---
+ *
+ * Use: Separates off the privileged tunnel-opening service from the
+ * rest of the server.
+ */
+
+extern void ps_split(int /*detachp*/);
+
+/* --- @ps_quit@ --- *
+ *
+ * Arguments: ---
+ *
+ * Returns: ---
+ *
+ * Use: Detaches from the helper process.
+ */
+
+extern void ps_quit(void);