remove code
This commit is contained in:
parent
e547ee2b51
commit
dc21a0d16b
65
mib.c
65
mib.c
@ -1,6 +1,7 @@
|
||||
/* $OpenBSD: mib.c,v 1.9 2024/05/22 08:44:02 martijn Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2025 Wolfgang Hottgenroth <woho@hottis.de>
|
||||
* Copyright (c) 2022 Martijn van Duren <martijn@openbsd.org>
|
||||
* Copyright (c) 2012 Joel Knight <joel@openbsd.org>
|
||||
* Copyright (c) 2007, 2008, 2012 Reyk Floeter <reyk@openbsd.org>
|
||||
@ -18,50 +19,50 @@
|
||||
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
#include <sys/types.h>
|
||||
//#include <sys/types.h>
|
||||
#include <sys/signal.h>
|
||||
#include <sys/queue.h>
|
||||
//#include <sys/queue.h>
|
||||
#include <sys/proc.h>
|
||||
#include <sys/stat.h>
|
||||
//#include <sys/stat.h>
|
||||
#include <sys/socket.h>
|
||||
#include <sys/un.h>
|
||||
#include <sys/time.h>
|
||||
#include <sys/tree.h>
|
||||
#include <sys/utsname.h>
|
||||
#include <sys/sysctl.h>
|
||||
#include <sys/sensors.h>
|
||||
#include <sys/sched.h>
|
||||
#include <sys/mount.h>
|
||||
#include <sys/ioctl.h>
|
||||
#include <sys/disk.h>
|
||||
//#include <sys/time.h>
|
||||
//#include <sys/tree.h>
|
||||
//#include <sys/utsname.h>
|
||||
//#include <sys/sysctl.h>
|
||||
//#include <sys/sensors.h>
|
||||
//#include <sys/sched.h>
|
||||
//#include <sys/mount.h>
|
||||
//#include <sys/ioctl.h>
|
||||
//#include <sys/disk.h>
|
||||
|
||||
#include <netinet/in.h>
|
||||
#include <netinet/ip.h>
|
||||
#include <netinet/ip_carp.h>
|
||||
#include <netinet/ip_var.h>
|
||||
#include <arpa/inet.h>
|
||||
#include <net/if.h>
|
||||
#include <net/if_types.h>
|
||||
#include <net/pfvar.h>
|
||||
#include <netinet/ip_ipsp.h>
|
||||
#include <net/if_pfsync.h>
|
||||
//#include <netinet/in.h>
|
||||
//#include <netinet/ip.h>
|
||||
//#include <netinet/ip_carp.h>
|
||||
//#include <netinet/ip_var.h>
|
||||
//#include <arpa/inet.h>
|
||||
//#include <net/if.h>
|
||||
//#include <net/if_types.h>
|
||||
//#include <net/pfvar.h>
|
||||
//#include <netinet/ip_ipsp.h>
|
||||
//#include <net/if_pfsync.h>
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <errno.h>
|
||||
#include <event.h>
|
||||
#include <fcntl.h>
|
||||
//#include <fcntl.h>
|
||||
#include <grp.h>
|
||||
#include <pwd.h>
|
||||
#include <string.h>
|
||||
#include <syslog.h>
|
||||
#include <time.h>
|
||||
//#include <time.h>
|
||||
#include <unistd.h>
|
||||
#include <libgen.h>
|
||||
#include <limits.h>
|
||||
#include <kvm.h>
|
||||
|
||||
#include "log.h"
|
||||
//#include <kvm.h>
|
||||
//
|
||||
//#include "log.h"
|
||||
#include "snmpd.h"
|
||||
#include "mib.h"
|
||||
|
||||
@ -69,10 +70,10 @@ struct event connev;
|
||||
const char *agentxsocket = NULL;
|
||||
int agentxfd = -1;
|
||||
|
||||
int pageshift;
|
||||
#define pagetok(size) ((size) << pageshift)
|
||||
//int pageshift;
|
||||
//#define pagetok(size) ((size) << pageshift)
|
||||
|
||||
void pageshift_init(void);
|
||||
//void pageshift_init(void);
|
||||
void snmp_connect(struct agentx *, void *, int);
|
||||
void snmp_tryconnect(int, short, void *);
|
||||
void snmp_read(int, short, void *);
|
||||
@ -172,7 +173,7 @@ main(int argc, char *argv[])
|
||||
fatal("agentx_context");
|
||||
|
||||
/* kr_init requires sac */
|
||||
pageshift_init();
|
||||
//pageshift_init();
|
||||
|
||||
if (agentxsocket != NULL) {
|
||||
if (strlcpy(agentxsocketdir, agentxsocket,
|
||||
@ -210,6 +211,7 @@ main(int argc, char *argv[])
|
||||
event_dispatch();
|
||||
}
|
||||
|
||||
#if 0
|
||||
#define LOG1024 10
|
||||
void
|
||||
pageshift_init(void)
|
||||
@ -225,6 +227,7 @@ pageshift_init(void)
|
||||
/* we only need the amount of log(2)1024 for our conversion */
|
||||
pageshift -= LOG1024;
|
||||
}
|
||||
#endif
|
||||
|
||||
void
|
||||
snmp_connect(struct agentx *sa, void *cookie, int close)
|
||||
|
Loading…
x
Reference in New Issue
Block a user