Lost Password?

Go Back   CodeCall Programming Forum > Software Development > C# Programming

C# Programming C# (pronounced C-sharp) is a new object oriented language from Microsoft and is derived from C and C++. It also borrows a lot of concepts from Java too including garbage collection.

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 06-15-2007, 03:38 PM
hoser2001's Avatar   
hoser2001 hoser2001 is offline
Programmer
 
Join Date: Jul 2006
Posts: 175
Rep Power: 9
hoser2001 is on a distinguished road
Lightbulb Need Help with .NET code for scanning network

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.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

Sponsored Links
  #2 (permalink)  
Old 06-18-2007, 09:09 AM
hoser2001's Avatar   
hoser2001 hoser2001 is offline
Programmer
 
Join Date: Jul 2006
Posts: 175
Rep Power: 9
hoser2001 is on a distinguished road
Default

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
Code:
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????
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 06-18-2007, 10:31 AM
hoser2001's Avatar   
hoser2001 hoser2001 is offline
Programmer
 
Join Date: Jul 2006
Posts: 175
Rep Power: 9
hoser2001 is on a distinguished road
Default

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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 06-18-2007, 02:29 PM
hoser2001's Avatar   
hoser2001 hoser2001 is offline
Programmer
 
Join Date: Jul 2006
Posts: 175
Rep Power: 9
hoser2001 is on a distinguished road
Default

please disregard this topic, i found solution to my problem.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 06-20-2007, 09:33 AM
Crane's Avatar   
Crane Crane is offline
Programming Expert
 
Join Date: Nov 2005
Posts: 399
Rep Power: 13
Crane is on a distinguished road
Default

What was the answer?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

Sponsored Links
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Basic Calculator AfTriX VB Tutorials 3 02-29-2008 08:53 AM
Please Help With A C Program!! siren C and C++ 7 04-17-2007 08:45 AM
Microsoft .NET 3.0 Jordan General Programming 7 12-08-2006 09:18 AM
Code: Managed C++ .NET 2.0: Instant Messanger Server Lop C Tutorials 0 11-07-2006 08:35 PM


All times are GMT -5. The time now is 11:23 AM.

Contest Stats

John ........ 223.00000
dargueta ........ 168.00000
Xav ........ 164.00000
gaylo565 ........ 18.00000
WingedPanther ........ 15.00000
|pH| ........ 15.00000
Johnnyboy ........ 3.00000
navghost ........ 1.00000

Contest Rules

CodeCall Goal

Goal: 100,000 Posts
Complete: 66%

Ads