Changeset View
Changeset View
Standalone View
Standalone View
head/usr.sbin/bsnmpd/tools/libbsnmptools/bsnmpimport.c
Show First 20 Lines • Show All 75 Lines • ▼ Show 20 Lines | |||||
#include <sys/param.h> | #include <sys/param.h> | ||||
#include <sys/queue.h> | #include <sys/queue.h> | ||||
#include <sys/uio.h> | #include <sys/uio.h> | ||||
#include <ctype.h> | #include <ctype.h> | ||||
#include <err.h> | #include <err.h> | ||||
#include <errno.h> | #include <errno.h> | ||||
#include <fcntl.h> | #include <fcntl.h> | ||||
#include <paths.h> | |||||
#include <stdio.h> | #include <stdio.h> | ||||
#include <stdlib.h> | #include <stdlib.h> | ||||
#include <string.h> | #include <string.h> | ||||
#include <syslog.h> | #include <syslog.h> | ||||
#include <unistd.h> | #include <unistd.h> | ||||
#include <bsnmp/asn1.h> | #include <bsnmp/asn1.h> | ||||
#include <bsnmp/snmp.h> | #include <bsnmp/snmp.h> | ||||
▲ Show 20 Lines • Show All 51 Lines • ▼ Show 20 Lines | |||||
static LIST_HEAD(, input) inputs = LIST_HEAD_INITIALIZER(inputs); | static LIST_HEAD(, input) inputs = LIST_HEAD_INITIALIZER(inputs); | ||||
static struct input *input = NULL; | static struct input *input = NULL; | ||||
static int32_t pbchar = -1; | static int32_t pbchar = -1; | ||||
#define MAX_PATHS 100 | #define MAX_PATHS 100 | ||||
static const char *paths[MAX_PATHS + 1] = { | static const char *paths[MAX_PATHS + 1] = { | ||||
"/usr/share/snmp/defs", | "/usr/share/snmp/defs", | ||||
"/usr/local/share/snmp/defs", | _PATH_LOCALBASE "/share/snmp/defs", | ||||
NULL | NULL | ||||
}; | }; | ||||
static void | static void | ||||
input_new(FILE *fp, const char *path, const char *fname) | input_new(FILE *fp, const char *path, const char *fname) | ||||
{ | { | ||||
struct input *ip; | struct input *ip; | ||||
▲ Show 20 Lines • Show All 809 Lines • Show Last 20 Lines |