]> git.ipfire.org Git - thirdparty/squid.git/blame - include/parse.h
add Id keyword
[thirdparty/squid.git] / include / parse.h
CommitLineData
d60c11be 1#ifndef _HAVE_PARSE_H_
2#define _HAVE_PARSE_H_
3
9067f855 4/***********************************************************
5 Copyright 1989 by Carnegie Mellon University
6
7 All Rights Reserved
8
9Permission to use, copy, modify, and distribute this software and its
10documentation for any purpose and without fee is hereby granted,
11provided that the above copyright notice appear in all copies and that
12both that copyright notice and this permission notice appear in
13supporting documentation, and that the name of CMU not be
14used in advertising or publicity pertaining to distribution of the
15software without specific, written prior permission.
16
17CMU DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
18ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
19CMU BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
20ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
21WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
22ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
23SOFTWARE.
24******************************************************************/
9067f855 25/*
26 * parse.h
27 */
28
9067f855 29/*
30 * A linked list of tag-value pairs for enumerated integers.
31 */
32struct enum_list {
33 struct enum_list *next;
43d4303e 34 int value;
9067f855 35 char *label;
36};
37
9067f855 38/*
39 * A tree in the format of the tree structure of the MIB.
40 */
d60c11be 41struct snmp_mib_tree {
42 struct snmp_mib_tree *child_list; /* list of children of this node */
43 struct snmp_mib_tree *next_peer; /* Next node in list of peers */
44 struct snmp_mib_tree *parent;
45 char label[64]; /* This node's textual name */
46 u_int subid; /* This node's integer subidentifier */
9067f855 47 int type; /* This node's object type */
d60c11be 48 struct enum_list *enums; /* (optional) list of enumerated integers (otherwise NULL) */
43d4303e 49 void (*printer) (); /* Value printing function */
9067f855 50};
51
52/* non-aggregate types for tree end nodes */
53#define TYPE_OTHER 0
54#define TYPE_OBJID 1
55#define TYPE_OCTETSTR 2
56#define TYPE_INTEGER 3
57#define TYPE_NETADDR 4
58#define TYPE_IPADDR 5
59#define TYPE_COUNTER 6
60#define TYPE_GAUGE 7
61#define TYPE_TIMETICKS 8
d60c11be 62#define TYPE_OPAQUE 9
9067f855 63#define TYPE_NULL 10
9067f855 64
d60c11be 65#ifdef __cplusplus
66extern "C" {
67#endif
9067f855 68
43d4303e 69 void init_mib(char *);
70 int read_objid(char *, oid *, int *);
71 void print_objid(oid *, int);
72 void sprint_objid(char *, oid *, int);
73 void print_variable(oid *, int, struct variable_list *);
74 void sprint_variable(char *, oid *, int, struct variable_list *);
75 void sprint_value(char *, oid *, int, struct variable_list *);
76 void print_value(oid *, int, struct variable_list *);
9067f855 77
43d4303e 78/*void print_variable_list(struct variable_list *); */
79/*void print_variable_list_value(struct variable_list *); */
80/*void print_type(struct variable_list *); */
81 void print_oid_nums(oid *, int);
d60c11be 82
43d4303e 83 struct snmp_mib_tree *read_mib();
d60c11be 84
85#ifdef __cplusplus
86}
d60c11be 87
43d4303e 88#endif
89#endif /* _HAVE_PARSE_H_ */