I'm using VisualStudio 2005 and I want to create an application that simply scans my LAN for all available MAC addresses.
I believe I need to somehow implement SNMP. But am having problems finding understandable references online. I am wondering if anyone here has had to develop anything similiar to this.
Need Help with .NET code for scanning network
Started by hoser2001, Jun 15 2007 12:38 PM
4 replies to this topic
#1
Posted 15 June 2007 - 12:38 PM
|
|
|
#2
Posted 18 June 2007 - 06:09 AM
Ok guys, I found some help online and have this application, however I can't seem to get it to work right. I'm running into this problem calling argv[] in a function. The complier is throwing a "Index was outside the bounds of the array" message. Here is some code
The last line of code there is where I get the error.
Any ideas????
public static void Main(string[] argv)
{
int commlength, miblength, datastart, datalength;
string nextmib, value;
SNMP conn = new SNMP();
string mib = "1.3.6.1.2.1.17.4.3.1.1";
int orgmiblength = mib.Length;
byte[] response = new byte[1024];
System.Console.WriteLine(argv[1]);
nextmib = mib;
while (true)
{
response = conn.get("getnext", argv[0], argv[1], nextmib);
The last line of code there is where I get the error.
Any ideas????
#3
Posted 18 June 2007 - 07:31 AM
nevermind the last post, it was a stupid error on my part.
I abandoned the sample application I was testing and am moving on to find a new solution to my problem. Again, if anyone has any suggestions please feel free to post a comment
I abandoned the sample application I was testing and am moving on to find a new solution to my problem. Again, if anyone has any suggestions please feel free to post a comment
#4
Posted 18 June 2007 - 11:29 AM
please disregard this topic, i found solution to my problem.
#5
Posted 20 June 2007 - 06:33 AM
What was the answer?


Sign In
Create Account


Back to top









