Expand PMF_FN_* macros.
[netbsd-mini2440.git] / dist / ntp / include / ntp_filegen.h
blob5b9676eba1d4bfba4932099051272d6c4f66b9cf
1 /* $NetBSD: ntp_filegen.h,v 1.2 2003/12/04 16:23:36 drochner Exp $ */
3 /*
4 * ntp_filegen.h,v 3.9 1996/12/01 16:02:45 kardel Exp
6 * definitions for NTP file generations support
9 * Copyright (C) 1992, 1996 by Rainer Pruy
10 * Friedrich-Alexander Universität Erlangen-Nürnberg, Germany
12 * This code may be modified and used freely
13 * provided the credits remain intact.
16 #include "ntp_types.h"
19 * supported file generation types
22 #define FILEGEN_NONE 255 /* no generations - use plain file name */
23 #define FILEGEN_PID 1 /* one filegen per process incarnation */
24 #define FILEGEN_DAY 2 /* one filegen per day */
25 #define FILEGEN_WEEK 3 /* one filegen per week */
26 #define FILEGEN_MONTH 4 /* one filegen per month */
27 #define FILEGEN_YEAR 5 /* one filegen per year */
28 #define FILEGEN_AGE 6 /* change filegen each FG_AGE_SECS */
31 * supported file generation flags
34 #define FGEN_FLAG_LINK 0x01 /* make a link to base name */
36 #define FGEN_FLAG_ENABLED 0x80 /* set this to really create files */
37 /* without this, open is suppressed */
39 typedef struct FILEGEN
41 FILE *fp; /* file referring to current generation */
42 char *prefix; /* filename prefix and basename to be used*/
43 char *basename; /* for constructing filename of generation file */
44 /* WARNING: must be malloced !!! will be fed to free()*/
45 u_long id; /* id of current generation */
46 u_char type; /* type of file generation */
47 u_char flag; /* flags modifying processing of file generation */
48 } FILEGEN;
50 extern void filegen_setup P((FILEGEN *, u_long));
51 extern void filegen_config P((FILEGEN *, char *, u_int, u_int));
52 extern FILEGEN *filegen_get P((char *));
53 extern void filegen_register P((char *, const char *, FILEGEN *));