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