X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~mdw/git/tripe/blobdiff_plain/808702d218ba5999dbc8cef769a79d1fb9be1e63..3cdc3f3a27e8c4f4fe692009d868c773d298a68c:/tripe.h?ds=sidebyside diff --git a/tripe.h b/tripe.h index 7de033d3..320a2ca5 100644 --- a/tripe.h +++ b/tripe.h @@ -1,6 +1,6 @@ /* -*-c-*- * - * $Id: tripe.h,v 1.20 2004/04/18 18:08:11 mdw Exp $ + * $Id$ * * Main header file for TrIPE * @@ -292,7 +292,7 @@ typedef struct stats { unsigned long sz_in, sz_out; /* Size of all data in and out */ unsigned long sz_kxin, sz_kxout; /* Size of key exchange messages */ unsigned long sz_ipin, sz_ipout; /* Size of encapsulated IP packets */ - time_t t_start, t_last; /* Time peer created, last recv */ + time_t t_start, t_last, t_kx; /* Time peer created, last pk, kx */ unsigned long n_reject; /* Number of rejected packets */ unsigned long n_in, n_out; /* Number of packets in and out */ unsigned long n_kxin, n_kxout; /* Number of key exchange packets */ @@ -345,6 +345,17 @@ typedef struct admin { #define AF_DEAD 1u /* Destroy this admin block */ #define AF_LOCK 2u /* Don't destroy it yet */ +#define AF_NOTE 4u /* Catch notifications */ +#ifndef NTRACE + #define AF_TRACE 8u /* Catch tracing */ +#endif +#define AF_WARN 16u /* Catch warning messages */ + +#ifndef NTRACE +# define AF_ALLMSGS (AF_NOTE | AF_TRACE | AF_WARN) +#else +# define AF_ALLMSGS (AF_NOTE | AF_WARN) +#endif /*----- Global variables --------------------------------------------------*/ @@ -651,16 +662,29 @@ extern int ksl_decrypt(keyset **/*ksroot*/, unsigned /*ty*/, extern void a_warn(const char */*fmt*/, ...); +/* --- @a_notify@ --- * + * + * Arguments: @const char *fmt@ = pointer to format string + * @...@ = other arguments + * + * Returns: --- + * + * Use: Sends a notification to interested admin connections. + */ + +extern void a_notify(const char */*fmt*/, ...); + /* --- @a_create@ --- * * * Arguments: @int fd_in, fd_out@ = file descriptors to use + * @unsigned f@ = initial flags to set * * Returns: --- * * Use: Creates a new admin connection. */ -extern void a_create(int /*fd_in*/, int /*fd_out*/); +extern void a_create(int /*fd_in*/, int /*fd_out*/, unsigned /*f*/); /* --- @a_quit@ --- * *