- android - 多次调用 OnPrimaryClipChangedListener
- android - 无法更新 RecyclerView 中的 TextView 字段
- android.database.CursorIndexOutOfBoundsException : Index 0 requested, 光标大小为 0
- android - 使用 AppCompat 时,我们是否需要明确指定其 UI 组件(Spinner、EditText)颜色
这个链接器错误让我束手无策。几天来我一直在网上搜索和挑选大脑,但我完全不知所措。我通过可下载的二进制文件为 Windows 安装了 Net-SNMP (net-snmp-5.5.0-2.x64.exe),并尝试运行示例程序。编译步骤表明没有错误,但我收到了一大堆 LNK2001:未解析的外部符号错误。这表明我没有正确链接库,但我感觉现在希望有人能看到我哪里出错了。我确定它很小,但我就是找不到它。
非常感谢您的帮助;你不知道这会减轻我肩上的重量。
其他包含目录:C:\net-snmp\include
附加库目录:C:\net-snmp\lib; C:\net-snmp\bin
附加依赖项:netsnmp.lib netsnmpagent.lib netsnmphelpers.lib netsnmmpmibs.lib netsnmptrapd.lib(我已经尝试只包含 netsnmp.lib,因为这就是我需要的,但目前我采用的是鸟枪方法)
注意:Net-SNMP 安装到 C:\net-snmp 并通过命令行使用内置的 Net-SNMP 实用程序可以完美运行。
来源:
#include <net-snmp/net-snmp-config.h>
#include <net-snmp/net-snmp-includes.h>
#include <string.h>
int main(int argc, char ** argv)
{
struct snmp_session session;
struct snmp_session *sess_handle;
struct snmp_pdu *pdu;
struct snmp_pdu *response;
struct variable_list *vars;
oid id_oid[MAX_OID_LEN];
oid serial_oid[MAX_OID_LEN];
size_t id_len = MAX_OID_LEN;
size_t serial_len = MAX_OID_LEN;
int status;
struct tree * mib_tree;
/*********************/
if(argv[1] == NULL){
printf("Please supply a hostname\n");
exit(1);
}
init_snmp("Den Dolphin 2 Check");
snmp_sess_init( &session );
session.version = SNMP_VERSION_1;
session.community = (u_char*) "public";
session.community_len = strlen((const char *)session.community);
session.peername = argv[1]; //172.20.2.103 - Den Dolphin 2
sess_handle = snmp_open(&session);
add_mibdir(".");
mib_tree = read_mib("xiden.txt");
pdu = snmp_pdu_create(SNMP_MSG_GET);
read_objid("PowerNet-MIB::upsBasicIdentModel.0", id_oid, &id_len);
snmp_add_null_var(pdu, id_oid, id_len);
read_objid("PowerNet-MIB::upsAdvIdentSerialNumber.0", serial_oid, &serial_len);
snmp_add_null_var(pdu, serial_oid, serial_len);
status = snmp_synch_response(sess_handle, pdu, &response);
for(vars = response->variables; vars; vars = vars->next_variable)
print_value(vars->name, vars->name_length, vars);
snmp_free_pdu(response);
snmp_close(sess_handle);
return (0);
}
链接器错误:
Error 1 error LNK2001: unresolved external symbol _snmp_add_null_var W:\SNMP Depot\NetSMNP\snmp_test\snmp_test\snmp_test.obj snmp_test
Error 2 error LNK2001: unresolved external symbol _add_mibdir W:\SNMP Depot\NetSMNP\snmp_test\snmp_test\snmp_test.obj snmp_test
Error 3 error LNK2001: unresolved external symbol _snmp_synch_response W:\SNMP Depot\NetSMNP\snmp_test\snmp_test\snmp_test.obj snmp_test
Error 4 error LNK2001: unresolved external symbol _snmp_sess_init W:\SNMP Depot\NetSMNP\snmp_test\snmp_test\snmp_test.obj snmp_test
Error 5 error LNK2001: unresolved external symbol _snmp_pdu_create W:\SNMP Depot\NetSMNP\snmp_test\snmp_test\snmp_test.obj snmp_test
Error 6 error LNK2001: unresolved external symbol _snmp_close W:\SNMP Depot\NetSMNP\snmp_test\snmp_test\snmp_test.obj snmp_test
Error 7 error LNK2001: unresolved external symbol _read_objid W:\SNMP Depot\NetSMNP\snmp_test\snmp_test\snmp_test.obj snmp_test
Error 8 error LNK2001: unresolved external symbol _init_snmp W:\SNMP Depot\NetSMNP\snmp_test\snmp_test\snmp_test.obj snmp_test
Error 9 error LNK2001: unresolved external symbol _print_value W:\SNMP Depot\NetSMNP\snmp_test\snmp_test\snmp_test.obj snmp_test
Error 10 error LNK2001: unresolved external symbol _snmp_free_pdu W:\SNMP Depot\NetSMNP\snmp_test\snmp_test\snmp_test.obj snmp_test
Error 11 error LNK2001: unresolved external symbol _read_mib W:\SNMP Depot\NetSMNP\snmp_test\snmp_test\snmp_test.obj snmp_test
Error 12 error LNK2001: unresolved external symbol _snmp_open W:\SNMP Depot\NetSMNP\snmp_test\snmp_test\snmp_test.obj snmp_test
Error 13 error LNK1120: 12 unresolved externals W:\SNMP Depot\NetSMNP\snmp_test\snmp_test\Release\snmp_test.exe snmp_test
Build Output:
1>------ Build started: Project: snmp_test, Configuration: Release Win32 ------
1>
1> Starting pass 1
1> Processed /DEFAULTLIB:uuid.lib
1> Processed /DEFAULTLIB:MSVCRT
1> Processed /DEFAULTLIB:OLDNAMES
1>
1> Searching libraries
1> Searching netsnmp.lib:
1> Searching C:\net-snmp\lib\netsnmpagent.lib:
1> Searching C:\net-snmp\lib\netsnmphelpers.lib:
1> Searching C:\net-snmp\lib\netsnmpmibs.lib:
1> Searching C:\net-snmp\lib\netsnmptrapd.lib:
1> Searching C:\Program Files (x86)\Windows Kits\8.0\lib\win8\um\x86\kernel32.lib:
1> Searching C:\Program Files (x86)\Windows Kits\8.0\lib\win8\um\x86\user32.lib:
1> Searching C:\Program Files (x86)\Windows Kits\8.0\lib\win8\um\x86\gdi32.lib:
1> Searching C:\Program Files (x86)\Windows Kits\8.0\lib\win8\um\x86\winspool.lib:
1> Searching C:\Program Files (x86)\Windows Kits\8.0\lib\win8\um\x86\comdlg32.lib:
1> Searching C:\Program Files (x86)\Windows Kits\8.0\lib\win8\um\x86\advapi32.lib:
1> Searching C:\Program Files (x86)\Windows Kits\8.0\lib\win8\um\x86\shell32.lib:
1> Searching C:\Program Files (x86)\Windows Kits\8.0\lib\win8\um\x86\ole32.lib:
1> Searching C:\Program Files (x86)\Windows Kits\8.0\lib\win8\um\x86\oleaut32.lib:
1> Searching C:\Program Files (x86)\Windows Kits\8.0\lib\win8\um\x86\uuid.lib:
1> Searching C:\Program Files (x86)\Windows Kits\8.0\lib\win8\um\x86\odbc32.lib:
1> Searching C:\Program Files (x86)\Windows Kits\8.0\lib\win8\um\x86\odbccp32.lib:
1> Searching C:\net-snmp\lib\netsnmp.lib:
1> Searching C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\lib\MSVCRT.lib:
1> Found @__security_check_cookie@4
1> Referenced in snmp_test.obj
1> Loaded MSVCRT.lib(secchk.obj)
1> Found __imp__printf
1> Referenced in snmp_test.obj
1> Loaded MSVCRT.lib(MSVCR110.dll)
1> Found __imp__exit
1> Referenced in snmp_test.obj
1> Loaded MSVCRT.lib(MSVCR110.dll)
1> Found _mainCRTStartup
1> Loaded MSVCRT.lib(crtexe.obj)
1> Found ___report_gsfailure
1> Referenced in MSVCRT.lib(secchk.obj)
1> Loaded MSVCRT.lib(gs_report.obj)
1> Found ___security_cookie
1> Referenced in MSVCRT.lib(secchk.obj)
1> Referenced in MSVCRT.lib(gs_report.obj)
1> Loaded MSVCRT.lib(gs_cookie.obj)
1> Found __IMPORT_DESCRIPTOR_MSVCR110
1> Referenced in MSVCRT.lib(MSVCR110.dll)
1> Referenced in MSVCRT.lib(MSVCR110.dll)
1> Loaded MSVCRT.lib(MSVCR110.dll)
1> Found ___CxxSetUnhandledExceptionFilter
1> Referenced in MSVCRT.lib(crtexe.obj)
1> Loaded MSVCRT.lib(unhandld.obj)
1> Found __XcptFilter
1> Referenced in MSVCRT.lib(crtexe.obj)
1> Loaded MSVCRT.lib(MSVCR110.dll)
1> Found __amsg_exit
1> Referenced in MSVCRT.lib(crtexe.obj)
1> Loaded MSVCRT.lib(MSVCR110.dll)
1> Found __setargv
1> Referenced in MSVCRT.lib(crtexe.obj)
1> Loaded MSVCRT.lib(dllargv.obj)
1> Found __imp____getmainargs
1> Referenced in MSVCRT.lib(crtexe.obj)
1> Loaded MSVCRT.lib(MSVCR110.dll)
1> Found __imp____set_app_type
1> Referenced in MSVCRT.lib(crtexe.obj)
1> Loaded MSVCRT.lib(MSVCR110.dll)
1> Found __IsNonwritableInCurrentImage
1> Referenced in MSVCRT.lib(crtexe.obj)
1> Loaded MSVCRT.lib(pesect.obj)
1> Found __imp___exit
1> Referenced in MSVCRT.lib(crtexe.obj)
1> Loaded MSVCRT.lib(MSVCR110.dll)
1> Found __imp___cexit
1> Referenced in MSVCRT.lib(crtexe.obj)
1> Loaded MSVCRT.lib(MSVCR110.dll)
1> Found ___security_init_cookie
1> Referenced in MSVCRT.lib(crtexe.obj)
1> Loaded MSVCRT.lib(gs_support.obj)
1> Found __matherr
1> Referenced in MSVCRT.lib(crtexe.obj)
1> Loaded MSVCRT.lib(merr.obj)
1> Found _atexit
1> Referenced in MSVCRT.lib(crtexe.obj)
1> Loaded MSVCRT.lib(atonexit.obj)
1> Found __RTC_Initialize
1> Referenced in MSVCRT.lib(crtexe.obj)
1> Loaded MSVCRT.lib(initsect.obj)
1> Found __imp___configthreadlocale
1> Referenced in MSVCRT.lib(crtexe.obj)
1> Loaded MSVCRT.lib(MSVCR110.dll)
1> Found __setdefaultprecision
1> Referenced in MSVCRT.lib(crtexe.obj)
1> Loaded MSVCRT.lib(fp8.obj)
1> Found __imp____setusermatherr
1> Referenced in MSVCRT.lib(crtexe.obj)
1> Loaded MSVCRT.lib(MSVCR110.dll)
1> Found __initterm_e
1> Referenced in MSVCRT.lib(crtexe.obj)
1> Loaded MSVCRT.lib(MSVCR110.dll)
1> Found __initterm
1> Referenced in MSVCRT.lib(crtexe.obj)
1> Loaded MSVCRT.lib(MSVCR110.dll)
1> Found __SEH_epilog4
1> Referenced in MSVCRT.lib(crtexe.obj)
1> Referenced in MSVCRT.lib(atonexit.obj)
1> Loaded MSVCRT.lib(sehprolg4.obj)
1> Found __except_handler4
1> Referenced in MSVCRT.lib(crtexe.obj)
1> Referenced in MSVCRT.lib(pesect.obj)
1> Referenced in MSVCRT.lib(atonexit.obj)
1> Referenced in MSVCRT.lib(sehprolg4.obj)
1> Loaded MSVCRT.lib(chandler4gs.obj)
1> Found ___globallocalestatus
1> Referenced in MSVCRT.lib(crtexe.obj)
1> Loaded MSVCRT.lib(xthdloc.obj)
1> Found __commode
1> Referenced in MSVCRT.lib(crtexe.obj)
1> Loaded MSVCRT.lib(xncommod.obj)
1> Found __dowildcard
1> Referenced in MSVCRT.lib(crtexe.obj)
1> Loaded MSVCRT.lib(wildcard.obj)
1> Found __newmode
1> Referenced in MSVCRT.lib(crtexe.obj)
1> Loaded MSVCRT.lib(_newmode.obj)
1> Found __imp____initenv
1> Referenced in MSVCRT.lib(crtexe.obj)
1> Loaded MSVCRT.lib(MSVCR110.dll)
1> Found ___native_startup_state
1> Referenced in MSVCRT.lib(crtexe.obj)
1> Loaded MSVCRT.lib(natstart.obj)
1> Found __fmode
1> Referenced in MSVCRT.lib(crtexe.obj)
1> Loaded MSVCRT.lib(xtxtmode.obj)
1> Found __imp___fmode
1> Referenced in MSVCRT.lib(crtexe.obj)
1> Loaded MSVCRT.lib(MSVCR110.dll)
1> Found __imp___commode
1> Referenced in MSVCRT.lib(crtexe.obj)
1> Loaded MSVCRT.lib(MSVCR110.dll)
1> Found ___xi_a
1> Referenced in MSVCRT.lib(crtexe.obj)
1> Loaded MSVCRT.lib(cinitexe.obj)
1> Processed /DEFAULTLIB:kernel32.lib
1> Processed /DISALLOWLIB:libcmt.lib
1> Processed /DISALLOWLIB:libcmtd.lib
1> Processed /DISALLOWLIB:msvcrtd.lib
1> Found __crt_debugger_hook
1> Referenced in MSVCRT.lib(gs_report.obj)
1> Loaded MSVCRT.lib(MSVCR110.dll)
1> Found ___crtUnhandledException
1> Referenced in MSVCRT.lib(gs_report.obj)
1> Loaded MSVCRT.lib(MSVCR110.dll)
1> Found ___crtTerminateProcess
1> Referenced in MSVCRT.lib(gs_report.obj)
1> Loaded MSVCRT.lib(MSVCR110.dll)
1> Found __NULL_IMPORT_DESCRIPTOR
1> Referenced in MSVCRT.lib(MSVCR110.dll)
1> Loaded MSVCRT.lib(MSVCR110.dll)
1> Found MSVCR110_NULL_THUNK_DATA
1> Referenced in MSVCRT.lib(MSVCR110.dll)
1> Loaded MSVCRT.lib(MSVCR110.dll)
1> Found "void __cdecl terminate(void)" (?terminate@@YAXXZ)
1> Referenced in MSVCRT.lib(unhandld.obj)
1> Loaded MSVCRT.lib(MSVCR110.dll)
1> Found ___crtSetUnhandledExceptionFilter
1> Referenced in MSVCRT.lib(unhandld.obj)
1> Loaded MSVCRT.lib(MSVCR110.dll)
1> Found __lock
1> Referenced in MSVCRT.lib(atonexit.obj)
1> Loaded MSVCRT.lib(MSVCR110.dll)
1> Found __unlock
1> Referenced in MSVCRT.lib(atonexit.obj)
1> Loaded MSVCRT.lib(MSVCR110.dll)
1> Found __imp___calloc_crt
1> Referenced in MSVCRT.lib(atonexit.obj)
1> Loaded MSVCRT.lib(MSVCR110.dll)
1> Found ___dllonexit
1> Referenced in MSVCRT.lib(atonexit.obj)
1> Loaded MSVCRT.lib(MSVCR110.dll)
1> Found __imp___onexit
1> Referenced in MSVCRT.lib(atonexit.obj)
1> Loaded MSVCRT.lib(MSVCR110.dll)
1> Found __invoke_watson
1> Referenced in MSVCRT.lib(fp8.obj)
1> Loaded MSVCRT.lib(MSVCR110.dll)
1> Found __controlfp_s
1> Referenced in MSVCRT.lib(fp8.obj)
1> Loaded MSVCRT.lib(MSVCR110.dll)
1> Found __except_handler4_common
1> Referenced in MSVCRT.lib(chandler4gs.obj)
1> Loaded MSVCRT.lib(MSVCR110.dll)
1> Searching C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\lib\OLDNAMES.lib:
1> Searching netsnmp.lib:
1> Searching C:\net-snmp\lib\netsnmpagent.lib:
1> Searching C:\net-snmp\lib\netsnmphelpers.lib:
1> Searching C:\net-snmp\lib\netsnmpmibs.lib:
1> Searching C:\net-snmp\lib\netsnmptrapd.lib:
1> Searching C:\Program Files (x86)\Windows Kits\8.0\lib\win8\um\x86\kernel32.lib:
1> Found __imp__EncodePointer@4
1> Referenced in MSVCRT.lib(crtexe.obj)
1> Referenced in MSVCRT.lib(atonexit.obj)
1> Loaded kernel32.lib(KERNEL32.dll)
1> Found __imp__IsDebuggerPresent@0
1> Referenced in MSVCRT.lib(gs_report.obj)
1> Loaded kernel32.lib(KERNEL32.dll)
1> Found _IsProcessorFeaturePresent@4
1> Referenced in MSVCRT.lib(gs_report.obj)
1> Loaded kernel32.lib(KERNEL32.dll)
1> Found __imp__QueryPerformanceCounter@4
1> Referenced in MSVCRT.lib(gs_support.obj)
1> Loaded kernel32.lib(KERNEL32.dll)
1> Found __imp__GetCurrentProcessId@0
1> Referenced in MSVCRT.lib(gs_support.obj)
1> Loaded kernel32.lib(KERNEL32.dll)
1> Found __imp__GetCurrentThreadId@0
1> Referenced in MSVCRT.lib(gs_support.obj)
1> Loaded kernel32.lib(KERNEL32.dll)
1> Found __imp__GetSystemTimeAsFileTime@4
1> Referenced in MSVCRT.lib(gs_support.obj)
1> Loaded kernel32.lib(KERNEL32.dll)
1> Found __imp__DecodePointer@4
1> Referenced in MSVCRT.lib(atonexit.obj)
1> Loaded kernel32.lib(KERNEL32.dll)
1> Found __IMPORT_DESCRIPTOR_KERNEL32
1> Referenced in kernel32.lib(KERNEL32.dll)
1> Referenced in kernel32.lib(KERNEL32.dll)
1> Referenced in kernel32.lib(KERNEL32.dll)
1> Referenced in kernel32.lib(KERNEL32.dll)
1> Referenced in kernel32.lib(KERNEL32.dll)
1> Referenced in kernel32.lib(KERNEL32.dll)
1> Referenced in kernel32.lib(KERNEL32.dll)
1> Referenced in kernel32.lib(KERNEL32.dll)
1> Loaded kernel32.lib(KERNEL32.dll)
1> Found KERNEL32_NULL_THUNK_DATA
1> Referenced in kernel32.lib(KERNEL32.dll)
1> Loaded kernel32.lib(KERNEL32.dll)
1> Searching C:\Program Files (x86)\Windows Kits\8.0\lib\win8\um\x86\user32.lib:
1> Searching C:\Program Files (x86)\Windows Kits\8.0\lib\win8\um\x86\gdi32.lib:
1> Searching C:\Program Files (x86)\Windows Kits\8.0\lib\win8\um\x86\winspool.lib:
1> Searching C:\Program Files (x86)\Windows Kits\8.0\lib\win8\um\x86\comdlg32.lib:
1> Searching C:\Program Files (x86)\Windows Kits\8.0\lib\win8\um\x86\advapi32.lib:
1> Searching C:\Program Files (x86)\Windows Kits\8.0\lib\win8\um\x86\shell32.lib:
1> Searching C:\Program Files (x86)\Windows Kits\8.0\lib\win8\um\x86\ole32.lib:
1> Searching C:\Program Files (x86)\Windows Kits\8.0\lib\win8\um\x86\oleaut32.lib:
1> Searching C:\Program Files (x86)\Windows Kits\8.0\lib\win8\um\x86\uuid.lib:
1> Searching C:\Program Files (x86)\Windows Kits\8.0\lib\win8\um\x86\odbc32.lib:
1> Searching C:\Program Files (x86)\Windows Kits\8.0\lib\win8\um\x86\odbccp32.lib:
1> Searching C:\net-snmp\lib\netsnmp.lib:
1> Searching C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\lib\MSVCRT.lib:
1> Searching C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\lib\OLDNAMES.lib:
1> Searching netsnmp.lib:
1> Searching C:\net-snmp\lib\netsnmpagent.lib:
1> Searching C:\net-snmp\lib\netsnmphelpers.lib:
1> Searching C:\net-snmp\lib\netsnmpmibs.lib:
1> Searching C:\net-snmp\lib\netsnmptrapd.lib:
1>
1> Finished searching libraries
1>
1> Finished pass 1
1>
1>snmp_test.obj : error LNK2001: unresolved external symbol _snmp_add_null_var
1>snmp_test.obj : error LNK2001: unresolved external symbol _add_mibdir
1>snmp_test.obj : error LNK2001: unresolved external symbol _snmp_synch_response
1>snmp_test.obj : error LNK2001: unresolved external symbol _snmp_sess_init
1>snmp_test.obj : error LNK2001: unresolved external symbol _snmp_pdu_create
1>snmp_test.obj : error LNK2001: unresolved external symbol _snmp_close
1>snmp_test.obj : error LNK2001: unresolved external symbol _read_objid
1>snmp_test.obj : error LNK2001: unresolved external symbol _init_snmp
1>snmp_test.obj : error LNK2001: unresolved external symbol _print_value
1>snmp_test.obj : error LNK2001: unresolved external symbol _snmp_free_pdu
1>snmp_test.obj : error LNK2001: unresolved external symbol _read_mib
1>snmp_test.obj : error LNK2001: unresolved external symbol _snmp_open
1>W:\SNMP Depot\NetSMNP\snmp_test\snmp_test\Release\snmp_test.exe : fatal error LNK1120: 12 unresolved externals
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
链接器配置命令行:
/OUT:"W:\SNMP Depot\NetSMNP\snmp_test\snmp_test\Release\snmp_test.exe" /MANIFEST /LTCG
/NXCOMPAT /PDB:"W:\SNMP Depot\NetSMNP\snmp_test\snmp_test\Release\snmp_test.pdb"
/DYNAMICBASE "netsnmp.lib" "netsnmpagent.lib" "netsnmphelpers.lib" "netsnmpmibs.lib"
"netsnmptrapd.lib" "kernel32.lib" "user32.lib" "gdi32.lib" "winspool.lib" "comdlg32.lib"
"advapi32.lib" "shell32.lib" "ole32.lib" "oleaut32.lib" "uuid.lib" "odbc32.lib"
"odbccp32.lib" /DEBUG /MACHINE:X86 /OPT:REF /SAFESEH /PGD:"W:\SNMP
Depot\NetSMNP\snmp_test\snmp_test\Release\snmp_test.pgd" /MANIFESTUAC:"level='asInvoker'
uiAccess='false'" /ManifestFile:"Release\snmp_test.exe.intermediate.manifest" /OPT:ICF
/ERRORREPORT:PROMPT /NOLOGO /VERBOSE /LIBPATH:"C:\net-snmp\lib" /LIBPATH:"C:\net-snmp\bin"
/TLBID:1
最佳答案
似乎推荐的构建和链接 net-snmp 应用程序的方法如下:
gcc `net-snmp-config --cflags` `net-snmp-config --libs` `net-snmp-config --external-libs` snmp_test.c -o snmp_test
反引号适用于 *nix 平台。但是您也可以在 Windows 平台上获得必要的值。在 shell 中执行以下命令,并确保您使用的是 CFLAGS 和库的输出值。
net-snmp-config --cflags
net-snmp-config --libs
net-snmp-config --external-libs
请参阅man page for net-snmp-config用于列出所需标志和库的其他选项。
关于c - LNK2001 VS2012 Net-SNMP,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18667718/
我正在尝试通过 SNMP 发送陷阱消息。 网上的例子提到了'sysUpTime'值的设置,但都没有说明。在这种情况下 sysUpTime 的作用是什么? 谢谢! 最佳答案 sysUpTime 是: T
我正在使用一些 SNMP 陷阱来监视应用程序。现在我被告知,如果陷阱中的属性顺序与 MIB 中定义的不同,某些监控系统可能会出现问题。由于 OID 的复杂性可以很容易地用于对属性进行重新排序,我对此感
我想使用 net-snmp 为 PowerPC 板实现 SNMP 代理。 以前它是使用 SMASH 实现的。 SMASH 有一个解析器 它可以读取 MIB 并生成 C 代码(空白函数实现) 我该如何开
在我的网络中,我想扫描启用 snmp 的设备。那么是否有任何单行 snmp 命令,以获取特定 IP 地址范围(如 172.26.1.1 到 172.26.1.255)中启用 snmp 的设备列表。 我
如何使用 C 或 C++ 和 net-snmp 模块接收陷阱。我需要示例代码,但示例位于 http://www.net-snmp.org/使用系统调用但不使用 API 方法。 最佳答案 net-snm
所以我还在学习SNMP,请放轻松。我正在使用 snmp4j,不仅是库,而且我已经加载了源代码,如果它满足我的需要,我不反对修改源代码。我已经编写了一个代理和一个测试客户端。我想要做的是能够检查来自测试
我正在尝试使用 SNMP 从 Brother MCF-9465CDN 获取碳粉量,以便最终使用 Munin 将它们绘制在图表中。我没有得到墨水量。 虽然我对 SNMP 有点陌生,但我认为我正在尝试的应
在我开始之前,我意识到这里已经有一些与 SNMP 相关的问题,但似乎没有多少人得到回答——这可能意味着我问错了地方,但我现在不知道还能去哪里. 这几天我一直在尽我所能阅读有关 SNMP 的内容,但我发
就目前情况而言,这个问题不太适合我们的问答形式。我们希望答案得到事实、引用资料或专业知识的支持,但这个问题可能会引发辩论、争论、民意调查或扩展讨论。如果您觉得这个问题可以改进并可能重新开放,visit
已结束。此问题正在寻求书籍、工具、软件库等的推荐。它不满足Stack Overflow guidelines 。目前不接受答案。 我们不允许提出寻求书籍、工具、软件库等推荐的问题。您可以编辑问题,以便
在我开始之前,我意识到这里已经有一些与 SNMP 相关的问题,但似乎没有多少人得到回答——这可能意味着我问错了地方,但我现在不知道还能去哪里. 这几天我一直在尽我所能阅读有关 SNMP 的内容,但我发
我可以快速完成 snmp 安装,它工作正常。 在我目前正在研究并尝试修改源的代理模块之一中。我遇到了一个问题,我需要通过代理删除用户。 坚持完成这个: 就像 net-snmp-create-v3-us
去年在我看来,找到一个网页,其中有使用 SNMP 设置工作中心 5755 公共(public)地址簿(姓名、电子邮件)的示例。 现在我的 google-fu 有点生锈了,你能帮帮我吗? 是否有标准化的
如果我试图找到安装了 openWRT 的 Linksys WRT54G 的路由表,我需要哪个 MIB? 最佳答案 那应该是 MIB II。 SNMP 对象 ID (OID) 是 .1.3.6.1.2.
我对 SNMP 有一点了解,但还不够。我需要开发一个可以读取标准 SNMP MIB 并读取/写入各种属性的应用程序。网络端没问题,但实际的 MIB 以及它们可能包含的确切内容对我来说是一种黑色艺术。
我是 SNMP 新手。我必须培养一个经理。我一直在寻找如何为经理编程。我遇到过 WinSNMP、SNMP++ 和 Net-SNMP。 Net-SNMP 的优点是它可以转换来自 MIB 的陷阱内容(它可
在软件定义的网络中,有些东西我仍然没有得到:在传统网络中,我们使用 CLI 或 NETCONF 或者 SNMP 来配置设备,在 SDN 中,我们使用 Openflow 来这样做,但是检索信息呢? 之前
在软件定义的网络中,有些东西我仍然没有得到:在传统网络中,我们使用 CLI 或 NETCONF 或者 SNMP 来配置设备,在 SDN 中,我们使用 Openflow 来这样做,但是检索信息呢? 之前
我正在尝试使用 snmp4j 模拟 SNMP 代理。 我正在尝试向代理注册 MO。 下面是代码片段: static final OID mo1= new OID("1.3.6.1.4.1.1234.1
我希望在 Java 中使用 SNMP 为项目设置监控。我环顾四周,发现了一些软件包:JBossSNMPAdapter和SNMP4J-Agent。我不确定这两者之间有什么区别。 最佳答案 SNMP4j-
我是一名优秀的程序员,十分优秀!