X-Git-Url: https://git.distorted.org.uk/~mdw/tripe/blobdiff_plain/d8b106a3c886e95f1ba58a989347be984aa7682e..fe182f617126cb792a6d5867440105f9f10910b4:/server/tripe.h diff --git a/server/tripe.h b/server/tripe.h index 86d3779e..4669711e 100644 --- a/server/tripe.h +++ b/server/tripe.h @@ -159,7 +159,7 @@ typedef struct keyset keyset; typedef struct algswitch algswitch; -typedef struct bulkcrypto { +typedef struct bulkops { const char *name; unsigned prim; int (*check)(const algswitch */*a*/, dstr */*e*/); @@ -167,7 +167,7 @@ typedef struct bulkcrypto { int (*encrypt)(keyset */*ks*/, unsigned /*ty*/, buf */*b*/, buf */*bb*/); int (*decrypt)(keyset */*ks*/, unsigned /*ty*/, buf */*b*/, buf */*bb*/, uint32 */*seq*/); -} bulkcrypto; +} bulkops; #define BCP_CIPHER 1 #define BCP_MAC 2 @@ -176,7 +176,7 @@ typedef struct bulkcrypto { struct algswitch { const gchash *h; /* Hash function */ const gccipher *mgf; /* Mask-generation function */ - const bulkcrypto *bulk; /* Bulk crypto transformation */ + const bulkops *bulk; /* Bulk crypto transformation */ const gccipher *c; /* Symmetric encryption scheme */ const gcmac *m; /* Message authentication code */ const gccipher *b; /* Block cipher */ @@ -210,7 +210,7 @@ typedef struct knode { #define HASH_STRING(h, s) GH_HASH((h), (s), sizeof(s)) -extern const bulkcrypto bulktab[]; +extern const bulkops bulktab[]; /*----- Data structures ---------------------------------------------------*/ @@ -266,7 +266,7 @@ struct keyset { unsigned long sz_exp, sz_regen; /* Data limits for the keyset */ T( unsigned seq; ) /* Sequence number for tracing */ unsigned f; /* Various useful flags */ - const bulkcrypto *bulk; /* Bulk crypto transform */ + const bulkops *bulk; /* Bulk crypto transform */ size_t tagsz; /* Length to truncate MAC tags */ struct ksdir { gcipher *c; /* Keyset cipher for encryption */ @@ -980,6 +980,19 @@ extern void a_vformat(dstr */*d*/, const char */*fmt*/, va_list */*ap*/); extern void EXECL_LIKE(0) a_format(dstr */*d*/, const char */*fmt*/, ...); +/* --- @a_info@ --- * + * + * Arguments: @admin *a@ = connection + * @const char *fmt@ = format string + * @...@ = other arguments + * + * Returns: --- + * + * Use: Report information to an admin client. + */ + +extern void EXECL_LIKE(0) a_info(admin */*a*/, const char */*fmt*/, ...); + /* --- @a_warn@ --- * * * Arguments: @const char *fmt@ = pointer to format string