
|
[openbeosnetteam]
||
[Date Prev]
[10-2004 Date Index]
[Date Next]
||
[Thread Prev]
[10-2004 Thread Index]
[Thread Next]
[openbeosnetteam] Re: DHCP Stay Alive Question
- From: Waldemar Kornewald <Waldemar.Kornewald@xxxxxx>
- To: openbeosnetteam@xxxxxxxxxxxxx
- Date: Sat, 23 Oct 2004 13:42:25 +0200
David Enderson wrote:
I guess we can consider DHCP being a protocol and making a network
protocol kernel module make sense to me. However, currently your
(C++) code can't be refactoring into a kernel module like this,
before move from socket API to internal API to send and receive
UDP packets, iterate and setup interfaces.
I agree. What you said makes perfect sense that the DHCP client should
be a protocol module.
But that makes the DHCP code vulnerable to buffer overflow attacks. Is
there any use in making DHCP really live (as a whole) in the kernel? I
mean, if speed were an issue I would do it, but I cannot imagine any
good reason to use that.
We could easily make the DHCP module run a dhcp_client userland app that
cares for everything and communicates with the kernel module.
I knew whatever I wrote would have to be switched all around and maybe
be converted from C++ to C code. I just tried to organize it well and
write something since I knew I wouldn't be able to guess the correct
format the first time. When I get the DHCP conversation completely
working, it looks like my next task will be to make a kernel protocol
module.
You can continue using C++ in the kernel. It makes the code look cleaner
and you can use BAutoLocker-like tools which simplify locking.
Which existing kernel protocol module would you suggest I use as an
example to make mine from?
Uhm, there is really nothing similar to DHCP in our kernel. Maybe, take
a look at our "route" module. The ethernet and ARP modules might be
interesting, too.
BTW, maybe it's a good occasion to write a kernel module exporting
the basic (without DNS resolver support at start) sockets API to
kernelland. That would help network-related drivers (netblock
devices?) and kernel add-ons (network filesystems) but also porting
your DHCP_client code...
Since I don't know the exact status of everything, I'll take your word
on the fact that its needed. Are you saying this is needed before I can
get my DHCP protocol module to work?
It would be rather difficult without such an API module (and you code
would not be portable).
Bye,
Waldemar
|

|