5 * Main header file for TrIPE
7 * (c) 2001 Straylight/Edgeware
10 /*----- Licensing notice --------------------------------------------------*
12 * This file is part of Trivial IP Encryption (TrIPE).
14 * TrIPE is free software; you can redistribute it and/or modify
15 * it under the terms of the GNU General Public License as published by
16 * the Free Software Foundation; either version 2 of the License, or
17 * (at your option) any later version.
19 * TrIPE is distributed in the hope that it will be useful,
20 * but WITHOUT ANY WARRANTY; without even the implied warranty of
21 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 * GNU General Public License for more details.
24 * You should have received a copy of the GNU General Public License
25 * along with TrIPE; if not, write to the Free Software Foundation,
26 * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
36 /*----- Header files ------------------------------------------------------*/
52 #include <sys/types.h>
58 #include <sys/socket.h>
60 #include <netinet/in.h>
61 #include <arpa/inet.h>
67 #include <mLib/alloc.h>
68 #include <mLib/arena.h>
69 #include <mLib/bres.h>
70 #include <mLib/dstr.h>
72 #include <mLib/fdflags.h>
73 #include <mLib/fwatch.h>
74 #include <mLib/mdwopt.h>
75 #include <mLib/quis.h>
76 #include <mLib/report.h>
78 #include <mLib/selbuf.h>
82 #include <mLib/trace.h>
84 #include <catacomb/buf.h>
86 #include <catacomb/gcipher.h>
87 #include <catacomb/gmac.h>
88 #include <catacomb/grand.h>
89 #include <catacomb/key.h>
90 #include <catacomb/paranoia.h>
92 #include <catacomb/noise.h>
93 #include <catacomb/rand.h>
95 #include <catacomb/mp.h>
96 #include <catacomb/mprand.h>
97 #include <catacomb/dh.h>
98 #include <catacomb/ec.h>
99 #include <catacomb/ec-keys.h>
100 #include <catacomb/group.h>
102 #include "tripe-protocol.h"
107 /*----- Magic numbers -----------------------------------------------------*/
109 /* --- Trace flags --- */
117 #define T_KEYEXCH 64u
118 #define T_KEYMGMT 128u
124 #define SEC(n) (n##u)
125 #define MIN(n) (n##u * 60u)
126 #define MEG(n) (n##ul * 1024ul * 1024ul)
128 /* --- Other things --- */
130 #define PKBUFSZ 65536
132 /*----- Cipher selections -------------------------------------------------*/
134 typedef struct algswitch {
135 const gccipher *c; /* Symmetric encryption scheme */
136 const gccipher *mgf; /* Mask-generation function */
137 const gchash *h; /* Hash function */
138 const gcmac *m; /* Message authentication code */
139 size_t hashsz; /* Hash output size */
140 size_t tagsz; /* Length to truncate MAC tags */
141 size_t cksz, mksz; /* Key lengths for @c@ and @m@ */
144 extern algswitch algs;
146 #define MAXHASHSZ 64 /* Largest possible hash size */
148 #define HASH_STRING(h, s) GH_HASH((h), (s), sizeof(s))
150 /*----- Data structures ---------------------------------------------------*/
152 /* --- Socket addresses --- *
154 * A magic union of supported socket addresses.
159 struct sockaddr_in sin;
162 /* --- A symmetric keyset --- *
164 * A keyset contains a set of symmetric keys for encrypting and decrypting
165 * packets. Keysets are stored in a list, sorted in reverse order of
166 * creation, so that the most recent keyset (the one most likely to be used)
169 * Each keyset has a time limit and a data limit. The keyset is destroyed
170 * when either it has existed for too long, or it has been used to encrypt
171 * too much data. New key exchanges are triggered when keys are close to
175 typedef struct keyset {
176 struct keyset *next; /* Next active keyset in the list */
177 unsigned ref; /* Reference count for keyset */
178 struct peer *p; /* Pointer to peer structure */
179 time_t t_exp; /* Expiry time for this keyset */
180 unsigned long sz_exp; /* Data limit for the keyset */
181 T( unsigned seq; ) /* Sequence number for tracing */
182 unsigned f; /* Various useful flags */
183 gcipher *cin, *cout; /* Keyset ciphers for encryption */
184 size_t tagsz; /* Length to truncate MAC tags */
185 gmac *min, *mout; /* Keyset MACs for integrity */
186 uint32 oseq; /* Outbound sequence number */
187 uint32 iseq, iwin; /* Inbound sequence number */
190 #define KS_SEQWINSZ 32 /* Bits in sequence number window */
192 #define KSF_LISTEN 1u /* Don't encrypt packets yet */
193 #define KSF_LINK 2u /* Key is in a linked list */
195 /* --- Key exchange --- *
197 * TrIPE uses the Wrestlers Protocol for its key exchange. The Wrestlers
198 * Protocol has a number of desirable features (e.g., perfect forward
199 * secrecy, and zero-knowledge authentication) which make it attractive for
200 * use in TrIPE. The Wrestlers Protocol was designed by Mark Wooding and
207 typedef struct kxchal {
208 struct keyexch *kx; /* Pointer back to key exchange */
209 ge *c; /* Responder's challenge */
210 ge *r; /* My reply to the challenge */
211 keyset *ks; /* Pointer to temporary keyset */
212 unsigned f; /* Various useful flags */
213 sel_timer t; /* Response timer for challenge */
214 octet hc[MAXHASHSZ]; /* Hash of his challenge */
215 mp *ck; /* The check value */
216 octet hswrq_in[MAXHASHSZ]; /* Inbound switch request message */
217 octet hswok_in[MAXHASHSZ]; /* Inbound switch confirmation */
218 octet hswrq_out[MAXHASHSZ]; /* Outbound switch request message */
219 octet hswok_out[MAXHASHSZ]; /* Outbound switch confirmation */
222 typedef struct keyexch {
223 struct peer *p; /* Pointer back to the peer */
224 keyset **ks; /* Peer's list of keysets */
225 unsigned f; /* Various useful flags */
226 unsigned s; /* Current state in exchange */
227 sel_timer t; /* Timer for next exchange */
228 ge *kpub; /* Peer's public key */
229 time_t texp_kpub; /* Expiry time for public key */
230 mp *alpha; /* My temporary secret */
231 ge *c; /* My challenge */
232 ge *rx; /* The expected response */
233 unsigned nr; /* Number of extant responses */
234 time_t t_valid; /* When this exchange goes bad */
235 octet hc[MAXHASHSZ]; /* Hash of my challenge */
236 kxchal *r[KX_NCHAL]; /* Array of challenges */
239 #define KXF_TIMER 1u /* Waiting for a timer to go off */
240 #define KXF_DEAD 2u /* The key-exchanger isn't up */
241 #define KXF_PUBKEY 4u /* Key exchanger has a public key */
244 KXS_DEAD, /* Uninitialized state (magical) */
245 KXS_CHAL, /* Main answer-challenges state */
246 KXS_COMMIT, /* Committed: send switch request */
247 KXS_SWITCH /* Switched: send confirmation */
250 /* --- Tunnel structure --- *
252 * Used to maintain system-specific information about the tunnel interface.
255 typedef struct tunnel tunnel;
258 typedef struct tunnel_ops {
259 const char *name; /* Name of this tunnel driver */
260 void (*init)(void); /* Initializes the system */
261 tunnel *(*create)(struct peer */*p*/); /* Initializes a new tunnel */
262 const char *(*ifname)(tunnel */*t*/); /* Returns tunnel's interface name */
263 void (*inject)(tunnel */*t*/, buf */*b*/); /* Sends packet through if */
264 void (*destroy)(tunnel */*t*/); /* Destroys a tunnel */
267 #ifndef TUN_INTERNALS
268 struct tunnel { const tunnel_ops *ops; };
271 /* --- Peer statistics --- *
273 * Contains various interesting and not-so-interesting statistics about a
274 * peer. This is updated by various parts of the code. The format of the
275 * structure isn't considered private, and @p_stats@ returns a pointer to the
276 * statistics block for a given peer.
279 typedef struct stats {
280 unsigned long sz_in, sz_out; /* Size of all data in and out */
281 unsigned long sz_kxin, sz_kxout; /* Size of key exchange messages */
282 unsigned long sz_ipin, sz_ipout; /* Size of encapsulated IP packets */
283 time_t t_start, t_last, t_kx; /* Time peer created, last pk, kx */
284 unsigned long n_reject; /* Number of rejected packets */
285 unsigned long n_in, n_out; /* Number of packets in and out */
286 unsigned long n_kxin, n_kxout; /* Number of key exchange packets */
287 unsigned long n_ipin, n_ipout; /* Number of encrypted packets */
290 /* --- Peer structure --- *
292 * The main structure which glues everything else together.
295 typedef struct peer {
296 struct peer *next, *prev; /* Links to next and previous */
297 char *name; /* Name of this peer */
298 tunnel *t; /* Tunnel for local packets */
299 keyset *ks; /* List head for keysets */
300 buf b; /* Buffer for sending packets */
301 addr peer; /* Peer socket address */
302 size_t sasz; /* Socket address size */
303 stats st; /* Statistics */
304 keyexch kx; /* Key exchange protocol block */
307 /* --- Admin structure --- */
309 #define OBUFSZ 16384u
311 typedef struct obuf {
312 struct obuf *next; /* Next buffer in list */
313 char *p_in, *p_out; /* Pointers into the buffer */
314 char buf[OBUFSZ]; /* The actual buffer */
317 typedef struct admin {
318 struct admin *next, *prev; /* Links to next and previous */
319 unsigned f; /* Various useful flags */
321 unsigned seq; /* Sequence number for tracing */
323 char *pname; /* Peer name to create */
324 char *paddr; /* Address string to resolve */
325 obuf *o_head, *o_tail; /* Output buffer list */
326 selbuf b; /* Line buffer for commands */
327 sel_file w; /* Selector for write buffering */
328 bres_client r; /* Background resolver task */
329 sel_timer t; /* Timer for resolver */
330 const tunnel_ops *tops; /* Tunnel to use */
331 addr peer; /* Address to set */
332 size_t sasz; /* Size of the address */
335 #define AF_DEAD 1u /* Destroy this admin block */
336 #define AF_LOCK 2u /* Don't destroy it yet */
337 #define AF_NOTE 4u /* Catch notifications */
339 #define AF_TRACE 8u /* Catch tracing */
341 #define AF_WARN 16u /* Catch warning messages */
344 # define AF_ALLMSGS (AF_NOTE | AF_TRACE | AF_WARN)
346 # define AF_ALLMSGS (AF_NOTE | AF_WARN)
349 /*----- Global variables --------------------------------------------------*/
351 extern sel_state sel; /* Global I/O event state */
352 extern group *gg; /* The group we work in */
353 extern mp *kpriv; /* Our private key */
354 extern octet buf_i[PKBUFSZ], buf_o[PKBUFSZ], buf_t[PKBUFSZ];
355 extern const tunnel_ops *tunnels[]; /* Table of tunnels (0-term) */
356 extern const tunnel_ops *tun_default; /* Default tunnel to use */
359 extern const trace_opt tr_opts[]; /* Trace options array */
360 extern unsigned tr_flags; /* Trace options flags */
363 /*----- Other macros ------------------------------------------------------*/
365 #define TIMER noise_timer(RAND_GLOBAL)
367 /*----- Key management ----------------------------------------------------*/
369 /* --- @km_interval@ --- *
373 * Returns: Zero if OK, nonzero to force reloading of keys.
375 * Use: Called on the interval timer to perform various useful jobs.
378 extern int km_interval(void);
380 /* --- @km_init@ --- *
382 * Arguments: @const char *kr_priv@ = private keyring file
383 * @const char *kr_pub@ = public keyring file
384 * @const char *tag@ = tag to load
388 * Use: Initializes, and loads the private key.
391 extern void km_init(const char */*kr_priv*/, const char */*kr_pub*/,
392 const char */*tag*/);
394 /* --- @km_getpubkey@ --- *
396 * Arguments: @const char *tag@ = public key tag to load
397 * @ge *kpub@ = where to put the public key
398 * @time_t *t_exp@ = where to put the expiry time
400 * Returns: Zero if OK, nonzero if it failed.
402 * Use: Fetches a public key from the keyring.
405 extern int km_getpubkey(const char */*tag*/, ge */*kpub*/,
408 /*----- Key exchange ------------------------------------------------------*/
410 /* --- @kx_start@ --- *
412 * Arguments: @keyexch *kx@ = pointer to key exchange context
416 * Use: Stimulates a key exchange. If a key exchage is in progress,
417 * a new challenge is sent (unless the quiet timer forbids
418 * this); if no exchange is in progress, one is commenced.
421 extern void kx_start(keyexch */*kx*/);
423 /* --- @kx_message@ --- *
425 * Arguments: @keyexch *kx@ = pointer to key exchange context
426 * @unsigned msg@ = the message code
427 * @buf *b@ = pointer to buffer containing the packet
431 * Use: Reads a packet containing key exchange messages and handles
435 extern void kx_message(keyexch */*kx*/, unsigned /*msg*/, buf */*b*/);
437 /* --- @kx_free@ --- *
439 * Arguments: @keyexch *kx@ = pointer to key exchange context
443 * Use: Frees everything in a key exchange context.
446 extern void kx_free(keyexch */*kx*/);
448 /* --- @kx_newkeys@ --- *
450 * Arguments: @keyexch *kx@ = pointer to key exchange context
454 * Use: Informs the key exchange module that its keys may have
455 * changed. If fetching the new keys fails, the peer will be
456 * destroyed, we log messages and struggle along with the old
460 extern void kx_newkeys(keyexch */*kx*/);
462 /* --- @kx_init@ --- *
464 * Arguments: @keyexch *kx@ = pointer to key exchange context
465 * @peer *p@ = pointer to peer context
466 * @keyset **ks@ = pointer to keyset list
468 * Returns: Zero if OK, nonzero if it failed.
470 * Use: Initializes a key exchange module. The module currently
471 * contains no keys, and will attempt to initiate a key
475 extern int kx_init(keyexch */*kx*/, peer */*p*/, keyset **/*ks*/);
477 /*----- Keysets and symmetric cryptography --------------------------------*/
479 /* --- @ks_drop@ --- *
481 * Arguments: @keyset *ks@ = pointer to a keyset
485 * Use: Decrements a keyset's reference counter. If the counter hits
486 * zero, the keyset is freed.
489 extern void ks_drop(keyset */*ks*/);
491 /* --- @ks_gen@ --- *
493 * Arguments: @const void *k@ = pointer to key material
494 * @size_t x, y, z@ = offsets into key material (see below)
495 * @peer *p@ = pointer to peer information
497 * Returns: A pointer to the new keyset.
499 * Use: Derives a new keyset from the given key material. The
500 * offsets @x@, @y@ and @z@ separate the key material into three
501 * parts. Between the @k@ and @k + x@ is `my' contribution to
502 * the key material; between @k + x@ and @k + y@ is `your'
503 * contribution; and between @k + y@ and @k + z@ is a shared
504 * value we made together. These are used to construct two
505 * pairs of symmetric keys. Each pair consists of an encryption
506 * key and a message authentication key. One pair is used for
507 * outgoing messages, the other for incoming messages.
509 * The new key is marked so that it won't be selected for output
510 * by @ksl_encrypt@. You can still encrypt data with it by
511 * calling @ks_encrypt@ directly.
514 extern keyset *ks_gen(const void */*k*/,
515 size_t /*x*/, size_t /*y*/, size_t /*z*/,
518 /* --- @ks_tregen@ --- *
520 * Arguments: @keyset *ks@ = pointer to a keyset
522 * Returns: The time at which moves ought to be made to replace this key.
525 extern time_t ks_tregen(keyset */*ks*/);
527 /* --- @ks_activate@ --- *
529 * Arguments: @keyset *ks@ = pointer to a keyset
533 * Use: Activates a keyset, so that it can be used for encrypting
537 extern void ks_activate(keyset */*ks*/);
539 /* --- @ks_encrypt@ --- *
541 * Arguments: @keyset *ks@ = pointer to a keyset
542 * @unsigned ty@ = message type
543 * @buf *b@ = pointer to input buffer
544 * @buf *bb@ = pointer to output buffer
546 * Returns: Zero if OK, nonzero if the key needs replacing. If the
547 * encryption failed, the output buffer is broken and zero is
550 * Use: Encrypts a block of data using the key. Note that the `key
551 * ought to be replaced' notification is only ever given once
552 * for each key. Also note that this call forces a keyset to be
553 * used even if it's marked as not for data output.
556 extern int ks_encrypt(keyset */*ks*/, unsigned /*ty*/,
557 buf */*b*/, buf */*bb*/);
559 /* --- @ks_decrypt@ --- *
561 * Arguments: @keyset *ks@ = pointer to a keyset
562 * @unsigned ty@ = expected type code
563 * @buf *b@ = pointer to an input buffer
564 * @buf *bb@ = pointer to an output buffer
566 * Returns: Zero on success, or nonzero if there was some problem.
568 * Use: Attempts to decrypt a message using a given key. Note that
569 * requesting decryption with a key directly won't clear a
570 * marking that it's not for encryption.
573 extern int ks_decrypt(keyset */*ks*/, unsigned /*ty*/,
574 buf */*b*/, buf */*bb*/);
576 /* --- @ksl_free@ --- *
578 * Arguments: @keyset **ksroot@ = pointer to keyset list head
582 * Use: Frees (releases references to) all of the keys in a keyset.
585 extern void ksl_free(keyset **/*ksroot*/);
587 /* --- @ksl_link@ --- *
589 * Arguments: @keyset **ksroot@ = pointer to keyset list head
590 * @keyset *ks@ = pointer to a keyset
594 * Use: Links a keyset into a list. A keyset can only be on one list
595 * at a time. Bad things happen otherwise.
598 extern void ksl_link(keyset **/*ksroot*/, keyset */*ks*/);
600 /* --- @ksl_prune@ --- *
602 * Arguments: @keyset **ksroot@ = pointer to keyset list head
606 * Use: Prunes the keyset list by removing keys which mustn't be used
610 extern void ksl_prune(keyset **/*ksroot*/);
612 /* --- @ksl_encrypt@ --- *
614 * Arguments: @keyset **ksroot@ = pointer to keyset list head
615 * @unsigned ty@ = message type
616 * @buf *b@ = pointer to input buffer
617 * @buf *bb@ = pointer to output buffer
619 * Returns: Nonzero if a new key is needed.
621 * Use: Encrypts a packet.
624 extern int ksl_encrypt(keyset **/*ksroot*/, unsigned /*ty*/,
625 buf */*b*/, buf */*bb*/);
627 /* --- @ksl_decrypt@ --- *
629 * Arguments: @keyset **ksroot@ = pointer to keyset list head
630 * @unsigned ty@ = expected type code
631 * @buf *b@ = pointer to input buffer
632 * @buf *bb@ = pointer to output buffer
634 * Returns: Nonzero if the packet couldn't be decrypted.
636 * Use: Decrypts a packet.
639 extern int ksl_decrypt(keyset **/*ksroot*/, unsigned /*ty*/,
640 buf */*b*/, buf */*bb*/);
642 /*----- Administration interface ------------------------------------------*/
644 /* --- @a_warn@ --- *
646 * Arguments: @const char *fmt@ = pointer to format string
647 * @...@ = other arguments
651 * Use: Informs all admin connections of a warning.
654 extern void a_warn(const char */*fmt*/, ...);
656 /* --- @a_notify@ --- *
658 * Arguments: @const char *fmt@ = pointer to format string
659 * @...@ = other arguments
663 * Use: Sends a notification to interested admin connections.
666 extern void a_notify(const char */*fmt*/, ...);
668 /* --- @a_create@ --- *
670 * Arguments: @int fd_in, fd_out@ = file descriptors to use
671 * @unsigned f@ = initial flags to set
675 * Use: Creates a new admin connection.
678 extern void a_create(int /*fd_in*/, int /*fd_out*/, unsigned /*f*/);
680 /* --- @a_quit@ --- *
686 * Use: Shuts things down nicely.
689 extern void a_quit(void);
691 /* --- @a_daemon@ --- *
697 * Use: Informs the admin module that it's a daemon.
700 extern void a_daemon(void);
702 /* --- @a_init@ --- *
704 * Arguments: @const char *sock@ = socket name to create
708 * Use: Creates the admin listening socket.
711 extern void a_init(const char */*sock*/);
713 /*----- Peer management ---------------------------------------------------*/
715 /* --- @p_txstart@ --- *
717 * Arguments: @peer *p@ = pointer to peer block
718 * @unsigned msg@ = message type code
720 * Returns: A pointer to a buffer to write to.
722 * Use: Starts sending to a peer. Only one send can happen at a
726 extern buf *p_txstart(peer */*p*/, unsigned /*msg*/);
728 /* --- @p_txend@ --- *
730 * Arguments: @peer *p@ = pointer to peer block
734 * Use: Sends a packet to the peer.
737 extern void p_txend(peer */*p*/);
741 * Arguments: @peer *p@ = pointer to peer block
742 * @buf *b@ = buffer containing incoming packet
746 * Use: Handles a packet which needs to be sent to a peer.
749 extern void p_tun(peer */*p*/, buf */*b*/);
751 /* --- @p_interval@ --- *
757 * Use: Called periodically to do tidying.
760 extern void p_interval(void);
762 /* --- @p_stats@ --- *
764 * Arguments: @peer *p@ = pointer to a peer block
766 * Returns: A pointer to the peer's statistics.
769 extern stats *p_stats(peer */*p*/);
771 /* --- @p_ifname@ --- *
773 * Arguments: @peer *p@ = pointer to a peer block
775 * Returns: A pointer to the peer's interface name.
778 extern const char *p_ifname(peer */*p*/);
780 /* --- @p_addr@ --- *
782 * Arguments: @peer *p@ = pointer to a peer block
784 * Returns: A pointer to the peer's address.
787 extern const addr *p_addr(peer */*p*/);
789 /* --- @p_init@ --- *
791 * Arguments: @struct in_addr addr@ = address to bind to
792 * @unsigned port@ = port number to listen to
796 * Use: Initializes the peer system; creates the socket.
799 extern void p_init(struct in_addr /*addr*/, unsigned /*port*/);
801 /* --- @p_port@ --- *
805 * Returns: Port number used for socket.
808 unsigned p_port(void);
810 /* --- @p_create@ --- *
812 * Arguments: @const char *name@ = name for this peer
813 * @const tunnel_ops *tops@ = tunnel to use
814 * @struct sockaddr *sa@ = socket address of peer
815 * @size_t sz@ = size of socket address
817 * Returns: Pointer to the peer block, or null if it failed.
819 * Use: Creates a new named peer block. No peer is actually attached
823 extern peer *p_create(const char */*name*/, const tunnel_ops */*tops*/,
824 struct sockaddr */*sa*/, size_t /*sz*/);
826 /* --- @p_name@ --- *
828 * Arguments: @peer *p@ = pointer to a peer block
830 * Returns: A pointer to the peer's name.
833 extern const char *p_name(peer */*p*/);
835 /* --- @p_find@ --- *
837 * Arguments: @const char *name@ = name to look up
839 * Returns: Pointer to the peer block, or null if not found.
841 * Use: Finds a peer by name.
844 extern peer *p_find(const char */*name*/);
846 /* --- @p_destroy@ --- *
848 * Arguments: @peer *p@ = pointer to a peer
852 * Use: Destroys a peer.
855 extern void p_destroy(peer */*p*/);
857 /* --- @p_first@, @p_next@ --- *
859 * Arguments: @peer *p@ = a peer block
861 * Returns: @peer_first@ returns the first peer in some ordering;
862 * @peer_next@ returns the peer following a given one in the
863 * same ordering. Null is returned for the end of the list.
866 extern peer *p_first(void);
867 extern peer *p_next(peer */*p*/);
869 /*----- Tunnel drivers ----------------------------------------------------*/
872 extern const tunnel_ops tun_linux;
876 extern const tunnel_ops tun_unet;
880 extern const tunnel_ops tun_bsd;
883 extern const tunnel_ops tun_slip;
885 /*----- Other handy utilities ---------------------------------------------*/
889 * Arguments: @mp *m@ = a multiprecision integer
891 * Returns: A pointer to the integer's textual representation.
893 * Use: Converts a multiprecision integer to a string. Corrupts
897 extern const char *mpstr(mp */*m*/);
901 * Arguments: @group *g@ = a group
902 * @ge *x@ = a group element
904 * Returns: A pointer to the element's textual representation.
906 * Use: Converts a group element to a string. Corrupts
910 extern const char *gestr(group */*g*/, ge */*x*/);
912 /* --- @timestr@ --- *
914 * Arguments: @time_t t@ = a time to convert
916 * Returns: A pointer to a textual representation of the time.
918 * Use: Converts a time to a textual representation. Corrupts
922 extern const char *timestr(time_t /*t*/);
924 /* --- @mystrieq@ --- *
926 * Arguments: @const char *x, *y@ = two strings
928 * Returns: True if @x@ and @y are equal, up to case.
931 extern int mystrieq(const char */*x*/, const char */*y*/);
933 /*----- That's all, folks -------------------------------------------------*/