63#include <sys/socket.h>
66#include <netinet/in.h>
113 for (tp = root; tp; tp = tp->
next_peer) {
114 if (tp->
subid == *op) {
140 return ((c1 - c2) > 0 ? 1 : -1);
155 char buf[128], *to = buf;
163 if ((*input ==
'\0') ||
173 subid += *input++ -
'0';
175 for (tp = subtree; tp; tp = tp->
next_peer) {
184 while ((*input !=
'\0') &&
193 for (tp = subtree; tp; tp = tp->
next_peer) {
214 if ((*out_len)-- <= 0) {
241 if ((*out_len)-- > 0)
254 if ((*out_len =
parse_subtree(root, input, output, out_len)) == 0)
256 *out_len += output - op;
269 get_symbol(objid, objidlen, subtree, buf + 1);
281 get_symbol(objid, objidlen, subtree, buf + 1);
289 for (; subtree; subtree = subtree->
next_peer) {
290 if (*objid == subtree->
subid) {
291 strcpy(buf, subtree->
label);
298 sprintf(buf,
"%u.", *objid++);
313 if (return_tree !=
NULL)
324 for (x = 0; x < len; x++)
struct snmp_mib_tree * Mib
unsigned char RFC1066_MIB_text[]
void print_objid(oid *objid, int objidlen)
static int parse_subtree(struct snmp_mib_tree *subtree, char *input, oid *output, int *out_len)
int read_objid(char *input, oid *output, int *out_len)
static struct snmp_mib_tree * find_rfc1066_mib(struct snmp_mib_tree *root)
void init_mib(char *file)
static struct snmp_mib_tree * get_symbol(oid *objid, int objidlen, struct snmp_mib_tree *subtree, char *buf)
void print_oid_nums(oid *O, int len)
void sprint_objid(char *buf, oid *objid, int objidlen)
static int lc_cmp(const char *s1, const char *s2)
struct snmp_mib_tree * read_mib(char *)
SQUIDCEXTERN void snmplib_debug(int, const char *,...) PRINTF_FORMAT_ARG2
struct snmp_mib_tree * next_peer
struct snmp_mib_tree * child_list