Lines 38-44
Link Here
|
38 |
#include <stdint.h> |
38 |
#include <stdint.h> |
39 |
#include <fnmatch.h> |
39 |
#include <fnmatch.h> |
40 |
#include <dirent.h> |
40 |
#include <dirent.h> |
41 |
#ifndef RESCUE |
41 |
#if !defined(RESCUE) && defined(WITH_BSNMP) |
42 |
#include <bsnmp/asn1.h> |
42 |
#include <bsnmp/asn1.h> |
43 |
#include <bsnmp/snmp.h> |
43 |
#include <bsnmp/snmp.h> |
44 |
#include <bsnmp/snmpclient.h> |
44 |
#include <bsnmp/snmpclient.h> |
Lines 444-450
Link Here
|
444 |
exit(1); |
444 |
exit(1); |
445 |
} |
445 |
} |
446 |
|
446 |
|
447 |
#ifndef RESCUE |
447 |
#if !defined(RESCUE) && defined(WITH_BSNMP) |
448 |
/* |
448 |
/* |
449 |
* Parse a server specification |
449 |
* Parse a server specification |
450 |
* |
450 |
* |
Lines 527-539
Link Here
|
527 |
int opt, i; |
527 |
int opt, i; |
528 |
const struct cmdtab *match, *cc, *tab; |
528 |
const struct cmdtab *match, *cc, *tab; |
529 |
|
529 |
|
530 |
#ifndef RESCUE |
530 |
#if !defined(RESCUE) && defined(WITH_BSNMP) |
531 |
snmp_client_init(&snmp_client); |
531 |
snmp_client_init(&snmp_client); |
532 |
snmp_client.trans = SNMP_TRANS_LOC_STREAM; |
532 |
snmp_client.trans = SNMP_TRANS_LOC_STREAM; |
533 |
snmp_client_set_host(&snmp_client, PATH_ILMI_SOCK); |
533 |
snmp_client_set_host(&snmp_client, PATH_ILMI_SOCK); |
534 |
#endif |
534 |
#endif |
535 |
|
535 |
|
536 |
#ifdef RESCUE |
536 |
#if defined(RESCUE) || !defined(WITH_BSNMP) |
537 |
#define OPTSTR "htv" |
537 |
#define OPTSTR "htv" |
538 |
#else |
538 |
#else |
539 |
#define OPTSTR "htvs:" |
539 |
#define OPTSTR "htvs:" |
Lines 545-551
Link Here
|
545 |
case 'h': |
545 |
case 'h': |
546 |
help_func(0, argv); |
546 |
help_func(0, argv); |
547 |
|
547 |
|
548 |
#ifndef RESCUE |
548 |
#if !defined(RESCUE) && defined(WITH_BSNMP) |
549 |
case 's': |
549 |
case 's': |
550 |
parse_server(optarg); |
550 |
parse_server(optarg); |
551 |
break; |
551 |
break; |
Lines 570-576
Link Here
|
570 |
err(1, NULL); |
570 |
err(1, NULL); |
571 |
memcpy(main_tab, static_main_tab, sizeof(static_main_tab)); |
571 |
memcpy(main_tab, static_main_tab, sizeof(static_main_tab)); |
572 |
|
572 |
|
573 |
#ifndef RESCUE |
573 |
#if !defined(RESCUE) && defined(WITH_BSNMP) |
574 |
/* XXX while this is compiled in */ |
574 |
/* XXX while this is compiled in */ |
575 |
device_register(); |
575 |
device_register(); |
576 |
#endif |
576 |
#endif |