Re: Forcing DHCP release/renew
Re: Forcing DHCP release/renew
- Subject: Re: Forcing DHCP release/renew
- From: Justin Walker <email@hidden>
- Date: Wed, 29 Jan 2003 14:13:28 -0800
On Wednesday, Jan 29, 2003, at 10:58 US/Pacific, Eugene Lisitsyn wrote:
Hi all,
I need to force DHCP release/renew from within an ethernet driver ( in
both
OS9 and OSX ).
For OS9 I found MoreNetworkSetup sample which has DHCPRelease sample
code:
http://developer.apple.com/samplecode/Sample_Code/Networking/
MoreNetworkSetup
.htm
Is this a way of doing this or there are better ways?
For OS X - I've seen this question in darwin-development group, but
never saw
an answer. So, is there any known way to force DHCP release from within
IOEthernetController-based kext?
Sure; all you have to do is cobble up a DHCP_RELEASE packet and send it.
Of course, there are a number of things wrong with doing that:
- a device handler is *not* the place to deal with higher-level,
protocol- or system-specific policy issues
- how do you know that there's a DHCP server on the network attached
to your device?
- how do you know that any of the assigned IP addresses for your
interface were assigned by DHCP?
- how do you know *which* of the assigned IP addresses for your
interface were assigned by DHCP?
- how do you know that's what the user wants?
And, if I didn't mention it before, a device handler is *not* the place
to deal with higher-level, protocol- or system-specific policy issues.
:-}.
Regards,
Justin
--
/~\ The ASCII Justin C. Walker, Curmudgeon-at-Large
\ / Ribbon Campaign
X Help cure HTML Email
/ \
_______________________________________________
macnetworkprog mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/macnetworkprog
Do not post admin requests to the list. They will be ignored.