]> git.ipfire.org Git - thirdparty/squid.git/blame - include/parse.h
Cleanup: zap CVS Id tags
[thirdparty/squid.git] / include / parse.h
CommitLineData
0e2cd867 1/*
262a0e14 2 * $Id$
0e2cd867 3 */
b5638623 4#ifndef SQUID_PARSE_H
5#define SQUID_PARSE_H
d60c11be 6
9067f855 7/***********************************************************
8 Copyright 1989 by Carnegie Mellon University
9
10 All Rights Reserved
11
c5dd4956
AJ
12Permission to use, copy, modify, and distribute this software and its
13documentation for any purpose and without fee is hereby granted,
9067f855 14provided that the above copyright notice appear in all copies and that
c5dd4956 15both that copyright notice and this permission notice appear in
9067f855 16supporting documentation, and that the name of CMU not be
17used in advertising or publicity pertaining to distribution of the
c5dd4956 18software without specific, written prior permission.
9067f855 19
20CMU DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
21ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
22CMU BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
23ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
24WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
25ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
26SOFTWARE.
27******************************************************************/
9067f855 28
e1f7507e
AJ
29/* NP: we only need struct variable_list and typedef oid from SNMP library */
30/* we use as ptrs. If this was true C++ we could pre-define their classes. */
31#include "snmp_vars.h"
32
33/**
9067f855 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
e1f7507e 42/**
9067f855 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
e1f7507e 66#define TYPE_OPAQUE 9
9067f855 67#define TYPE_NULL 10
9067f855 68
d60c11be 69#ifdef __cplusplus
c5dd4956
AJ
70extern "C"
71{
d60c11be 72#endif
9067f855 73
43d4303e 74 void init_mib(char *);
75 int read_objid(char *, oid *, int *);
76 void print_objid(oid *, int);
77 void sprint_objid(char *, oid *, int);
78 void print_variable(oid *, int, struct variable_list *);
79 void sprint_variable(char *, oid *, int, struct variable_list *);
80 void sprint_value(char *, oid *, int, struct variable_list *);
81 void print_value(oid *, int, struct variable_list *);
9067f855 82
c5dd4956
AJ
83 /*void print_variable_list(struct variable_list *); */
84 /*void print_variable_list_value(struct variable_list *); */
85 /*void print_type(struct variable_list *); */
43d4303e 86 void print_oid_nums(oid *, int);
d60c11be 87
2f232128 88 struct snmp_mib_tree *read_mib(char *);
d60c11be 89
90#ifdef __cplusplus
91}
d60c11be 92
43d4303e 93#endif
b5638623 94
95#endif /* SQUID_PARSE_H */