Home | History | Annotate | Line # | Download | only in include
parse_conf.h revision 1.6
      1  1.6  christos /*	$NetBSD: parse_conf.h,v 1.6 2020/05/25 20:47:20 christos Exp $	*/
      2  1.1    kardel 
      3  1.1    kardel /*
      4  1.1    kardel  * /src/NTP/ntp4-dev/include/parse_conf.h,v 4.7 2005/06/25 10:58:45 kardel RELEASE_20050625_A
      5  1.1    kardel  *
      6  1.1    kardel  * parse_conf.h,v 4.7 2005/06/25 10:58:45 kardel RELEASE_20050625_A
      7  1.1    kardel  *
      8  1.1    kardel  * Copyright (c) 1995-2005 by Frank Kardel <kardel <AT> ntp.org>
      9  1.3  christos  * Copyright (c) 1989-1994 by Frank Kardel, Friedrich-Alexander Universitaet Erlangen-Nuernberg, Germany
     10  1.1    kardel  *
     11  1.1    kardel  * Redistribution and use in source and binary forms, with or without
     12  1.1    kardel  * modification, are permitted provided that the following conditions
     13  1.1    kardel  * are met:
     14  1.1    kardel  * 1. Redistributions of source code must retain the above copyright
     15  1.1    kardel  *    notice, this list of conditions and the following disclaimer.
     16  1.1    kardel  * 2. Redistributions in binary form must reproduce the above copyright
     17  1.1    kardel  *    notice, this list of conditions and the following disclaimer in the
     18  1.1    kardel  *    documentation and/or other materials provided with the distribution.
     19  1.1    kardel  * 3. Neither the name of the author nor the names of its contributors
     20  1.1    kardel  *    may be used to endorse or promote products derived from this software
     21  1.1    kardel  *    without specific prior written permission.
     22  1.1    kardel  *
     23  1.1    kardel  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
     24  1.1    kardel  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
     25  1.1    kardel  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
     26  1.1    kardel  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
     27  1.1    kardel  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
     28  1.1    kardel  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
     29  1.1    kardel  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
     30  1.1    kardel  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
     31  1.1    kardel  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
     32  1.1    kardel  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
     33  1.1    kardel  * SUCH DAMAGE.
     34  1.1    kardel  *
     35  1.1    kardel  */
     36  1.1    kardel 
     37  1.1    kardel #ifndef __PARSE_CONF_H__
     38  1.1    kardel #define __PARSE_CONF_H__
     39  1.1    kardel #if	!(defined(lint) || defined(__GNUC__))
     40  1.1    kardel   static char prshrcsid[] = "parse_conf.h,v 4.7 2005/06/25 10:58:45 kardel RELEASE_20050625_A";
     41  1.1    kardel #endif
     42  1.1    kardel 
     43  1.1    kardel /*
     44  1.1    kardel  * field location structure
     45  1.1    kardel  */
     46  1.3  christos #define O_DAY   0
     47  1.1    kardel #define O_MONTH 1
     48  1.3  christos #define O_YEAR  2
     49  1.3  christos #define O_HOUR  3
     50  1.3  christos #define O_MIN   4
     51  1.3  christos #define O_SEC   5
     52  1.3  christos #define O_WDAY  6
     53  1.1    kardel #define O_FLAGS 7
     54  1.1    kardel #define O_ZONE  8
     55  1.1    kardel #define O_UTCHOFFSET 9
     56  1.1    kardel #define O_UTCMOFFSET 10
     57  1.1    kardel #define O_UTCSOFFSET 11
     58  1.1    kardel #define O_COUNT (O_UTCSOFFSET+1)
     59  1.1    kardel 
     60  1.1    kardel #define MBG_EXTENDED	0x00000001
     61  1.1    kardel 
     62  1.1    kardel /*
     63  1.1    kardel  * see below for field offsets
     64  1.1    kardel  */
     65  1.1    kardel 
     66  1.1    kardel struct format
     67  1.1    kardel {
     68  1.1    kardel   struct foff
     69  1.1    kardel     {
     70  1.1    kardel       unsigned short offset;		/* offset into buffer */
     71  1.1    kardel       unsigned short length;		/* length of field */
     72  1.1    kardel     }         field_offsets[O_COUNT];
     73  1.1    kardel   const unsigned char *fixed_string;		/* string with must be chars (blanks = wildcards) */
     74  1.1    kardel   u_long      flags;
     75  1.1    kardel };
     76  1.1    kardel #endif
     77  1.1    kardel 
     78  1.1    kardel /*
     79  1.1    kardel  * History:
     80  1.1    kardel  *
     81  1.1    kardel  * parse_conf.h,v
     82  1.1    kardel  * Revision 4.7  2005/06/25 10:58:45  kardel
     83  1.1    kardel  * add missing log keywords
     84  1.1    kardel  *
     85  1.1    kardel  */
     86