+/*
+ * Copyright (C) 1996-2017 The Squid Software Foundation and contributors
+ *
+ * Squid software is distributed under GPLv2+ license and includes
+ * contributions from numerous individuals and organizations.
+ * Please see the COPYING and CONTRIBUTORS files for details.
+ */
/***********************************************************
- Copyright 1988, 1989 by Carnegie Mellon University
+ Copyright 1988, 1989 by Carnegie Mellon University
All Rights Reserved
SOFTWARE.
******************************************************************/
-#define SQUID_NO_STRING_BUFFER_PROTECT 1
#include "squid.h"
-#include <stdio.h>
-
#if HAVE_UNISTD_H
#include <unistd.h>
#endif
read_objid(input, output, out_len)
char *input;
oid *output;
-int *out_len; /* number of subid's in "output" */
+int *out_len; /* number of subid's in "output" */
{
struct snmp_mib_tree *root = Mib;
oid *op = output;
void
print_objid(objid, objidlen)
oid *objid;
-int objidlen; /* number of subidentifiers */
+int objidlen; /* number of subidentifiers */
{
char buf[256];
struct snmp_mib_tree *subtree = Mib;
- *buf = '.'; /* this is a fully qualified name */
+ *buf = '.'; /* this is a fully qualified name */
get_symbol(objid, objidlen, subtree, buf + 1);
snmplib_debug(7, "%s\n", buf);
sprint_objid(buf, objid, objidlen)
char *buf;
oid *objid;
-int objidlen; /* number of subidentifiers */
+int objidlen; /* number of subidentifiers */
{
struct snmp_mib_tree *subtree = Mib;
- *buf = '.'; /* this is a fully qualified name */
+ *buf = '.'; /* this is a fully qualified name */
get_symbol(objid, objidlen, subtree, buf + 1);
}
}
/* subtree not found */
- while (objidlen--) { /* output rest of name, uninterpreted */
+ while (objidlen--) { /* output rest of name, uninterpreted */
sprintf(buf, "%u.", *objid++);
while (*buf)
buf++;
}
- *(buf - 1) = '\0'; /* remove trailing dot */
+ *(buf - 1) = '\0'; /* remove trailing dot */
return NULL;
found:
for (x = 0; x < len; x++)
printf(".%u", O[x]);
}
+