我尝试编写一些代码来检索objectID,结果是2B-06-01-04-01-82-31-01-03-01-01.这个值不正确吗?
// Send a SysObjectId SNMP request
response = conn.get("get", argv[0], argv[1], "1.3.6.1.2.1.1.2.0");
if (response[0] == 0xff)
{
Console.WriteLine("No response from {0}", argv[0]);
return;
}
// Get the community and MIB lengths of the response
commlength = Convert.ToInt16(response[6]);
miblength = Convert.ToInt16(response[23 + commlength]);
// Extract the MIB data from the SNMp response
datatype = Convert.ToInt16(response[24 + commlength + miblength]);
datalength = Convert.ToInt16(response[25 + commlength + miblength]);
datastart = 26 + commlength + miblength;
output= BitConverter.ToString(response, datastart, datalength);
Console.WriteLine(" …Run Code Online (Sandbox Code Playgroud) 我知道这不是一个新问题..但是我尝试按照解决方案从其他帖子中解决...但是我的文本区域没有任何内容可以打印...如果我直接在我的文本文件上打印一个句子..它的工作......为什么?
#!/usr/local/bin/perl
use Tk;
use File::Tail;
#Main Window
my $mw = new MainWindow;
$mw-> title ("Packet Analyzer Tool");
my $frm_1 = $mw -> Frame() -> pack();
my $frm_2 = $mw -> Frame() -> pack();
my $frm_3 = $mw -> Frame() -> pack();
my $frm_4 = $frm_3 -> Frame(-relief => 'groove', -borderwidth =>2) -> pack(-side => "left");
my $frm_5 = $frm_3 -> Frame() -> pack(-side => "right",-after => $frm_4);
my $but1 = $frm_1 -> Button(-text => "Start",
-command =>\&push_start)
-> pack(-side …Run Code Online (Sandbox Code Playgroud)