Subnet declaration for each interface
Ned W. Rhodes (E-mail)
dhcp at softsysgrp.com
Fri Jun 21 18:37:18 UTC 2002
I am porting the dhcp server to an embedded system and do not have a
standard unix runtime envorinment.
I see that one can start the dhcp server and specify an interface, which
will create an instance of an interface. Then in the discover_interfaces
code, I see where you can walk through all available interfaces to populate
a link list of interfaces.
Once you have discovered all the interfaces, you then walk through some
code that will eventually allow you to register the interface. But before
you can do that, you reach some code that has a comment that says:
/* We must have a subnet declaration for each
interface. */
if (!tmp -> shared_network && (state ==
DISCOVER_SERVER)) {
and then you error out if tmp -> shared_network is NULL.
My question is how does tmp -> shared_network get filled?
I see from the code where you can define shared networks and subnets in the
.config file and how it processes that and actually makes a shared_network
link list, but how is the link list from the config file associated with an
interface?
And it is not entirely clear that one needs a shared interface declaration
if you specify the interface on the command line. I am just not getting the
association. Can anyone point me to the routines that make this association?
Thanks.
More information about the dhcp-hackers
mailing list