473,385 Members | 1,185 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Doing a DHCP Query

byte[] send = new byte[237];
byte[] recv = new byte[237];
send[0] = 1;
send[1] = 1;
send[2] = 6;
IPAddress ip = IPAddress.Parse("255.255.255.255");
IPEndPoint iep = new IPEndPoint(ip, 67);
IPEndPoint iep2 = new IPEndPoint(IPAddress.Parse(ip, 68);
UdpClient udp = new UdpClient();
udp.Send(send, send.Length, iep);
recv = udp.Receive(ref iep2); // Does not receive anything.
Console.WriteLine(recv.Length);

The above works. It discovers the DHCP server, and is even assigned an IP
Address, but when I listen on the client port, nothing happens at all.

Any ideas?

--
Wayne M Jackson
------
WWW: http://www.wjackson.cable.nu
Nov 17 '05 #1
0 683

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Wayne M J | last post by:
byte send = new byte; byte recv = new byte; send = 1; send = 1; send = 6; IPAddress ip = IPAddress.Parse("255.255.255.255"); IPEndPoint iep = new IPEndPoint(ip, 67); IPEndPoint iep2 = new...
0
by: Wayne M J | last post by:
byte send = new byte; byte recv = new byte; send = 1; send = 1; send = 6; IPAddress ip = IPAddress.Parse("255.255.255.255"); IPEndPoint iep = new IPEndPoint(ip, 67); IPEndPoint iep2 = new...
8
by: Richard D. Ford | last post by:
Does anyone know if VB has an exposed API that can be used to query DHCP for current address leases? I have seen threads that discuss DHCPObj.dll and have successfully used it. However, this only...
1
by: andrew_webby at hotmail | last post by:
Hi Anyone know a way I can (via .NET) query my dhcp server and enumerate all the scopes defined within? Been looking to no avail - it would appear a couple of guys asked this very question...
5
by: Richard | last post by:
Hello, I'm working on an application to allow our network team to use a small application to make DHCP reservations on our Microsoft DHCP Server. The problem is you have to use P/Invoke to do...
0
by: GHUM | last post by:
Hello, I need to get a list of active leases on a windows dhcp server. Experts from Microsoft statet: """" A: Go to the Address leases of each scope in the DHCP snap-in and dump the leases...
1
by: Screenbert | last post by:
After finding nothing anywhere in google I am posting this so everyone can benefit by it. The formating is not pretty since I copied it from my word document, but you should benefit by it. ...
0
by: screenbert | last post by:
Managing DHCP Servers using C# They said it was impossible. It couldn't be done. But you can in fact manage DHCP servers using C#. This includes creating and deleting Scopes, SuperScopes,...
0
by: okonita | last post by:
Hi all, I am having a DB2 connectivity problem that I hope someone can help me resolve. I need this to test Replication and such other things. What am I doing wrong here? Any help that I can get...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.