X-Git-Url: https://git.distorted.org.uk/~mdw/tripe/blobdiff_plain/98b9b13628a7613868e0fda618e6303961932550..9d966eb7af70d029a9b4862efb67b0c90d32688e:/server/tripe.h diff --git a/server/tripe.h b/server/tripe.h index fd0f44e9..0e336f39 100644 --- a/server/tripe.h +++ b/server/tripe.h @@ -598,7 +598,7 @@ typedef struct tunnel_ops { const char *name; /* Name of this tunnel driver */ unsigned flags; /* Various interesting flags */ #define TUNF_PRIVOPEN 1u /* Need helper to open file */ - void (*init)(void); /* Initializes the system */ + int (*init)(void); /* Initializes the system */ tunnel *(*create)(struct peer */*p*/, int /*fd*/, char **/*ifn*/); /* Initializes a new tunnel */ void (*setifname)(tunnel */*t*/, const char */*ifn*/); @@ -841,14 +841,14 @@ extern unsigned tr_flags; /* Trace options flags */ * @const char *pubkr@ = public keyring file * @const char *ptag@ = default private-key tag * - * Returns: --- + * Returns: Zero on success, @-1@ on failure. * * Use: Initializes the key-management machinery, loading the * keyrings and so on. */ -extern void km_init(const char */*privkr*/, const char */*pubkr*/, - const char */*ptag*/); +extern int km_init(const char */*privkr*/, const char */*pubkr*/, + const char */*ptag*/); /* --- @km_reload@ --- * * @@ -1354,13 +1354,13 @@ extern void a_daemon(void); * @gid_t g@ = group to own the socket * @mode_t m@ = permissions to set on the socket * - * Returns: --- + * Returns: Zero on success, @-1@ on failure. * * Use: Creates the admin listening socket. */ -extern void a_listen(const char */*sock*/, - uid_t /*u*/, gid_t /*g*/, mode_t /*m*/); +extern int a_listen(const char */*sock*/, + uid_t /*u*/, gid_t /*g*/, mode_t /*m*/); /* --- @a_unlisten@ --- * * @@ -1409,12 +1409,12 @@ extern void a_signals(void); * @gid_t g@ = group to own the socket * @mode_t m@ = permissions to set on the socket * - * Returns: --- + * Returns: Zero on success, @-1@ on failure. * * Use: Creates the admin listening socket. */ -extern void a_init(void); +extern int a_init(void); /*----- Mapping with addresses as keys ------------------------------------*/ @@ -1514,13 +1514,13 @@ extern int ps_tunfd(const tunnel_ops */*tops*/, char **/*ifn*/); * * Arguments: @int detachp@ = whether to detach the child from its terminal * - * Returns: --- + * Returns: Zero on success, @-1@ on failure. * * Use: Separates off the privileged tunnel-opening service from the * rest of the server. */ -extern void ps_split(int /*detachp*/); +extern int ps_split(int /*detachp*/); /* --- @ps_quit@ --- * * @@ -1707,12 +1707,12 @@ extern const addr *p_addr(peer */*p*/); * * Arguments: @struct addrinfo *ailist@ = addresses to bind to * - * Returns: --- + * Returns: Zero on success, @-1@ on failure. * * Use: Binds to the main UDP sockets. */ -extern void p_bind(struct addrinfo */*ailist*/); +extern int p_bind(struct addrinfo */*ailist*/); /* --- @p_unbind@ --- * * @@ -1741,18 +1741,18 @@ extern void p_init(void); * * Arguments: @const tunnel_ops *tops@ = tunnel ops to add * - * Returns: --- + * Returns: Zero on success, @-1@ on failure. * - * Use: Adds a tunnel class to the list of known classes. If there - * is no current default tunnel, then this one is made the - * default. + * Use: Adds a tunnel class to the list of known classes, if it + * initializes properly. If there is no current default tunnel, + * then this one is made the default. * * Does nothing if the tunnel class is already known. So adding * a bunch of tunnels takes quadratic time, but there will be * too few to care about. */ -extern void p_addtun(const tunnel_ops */*tops*/); +extern int p_addtun(const tunnel_ops */*tops*/); /* --- @p_setdflttun@ --- * *