|
Description
|
The dhcp server use the SIOCGI* series of ioctls to query the configuration
of the interfaces on the system on which it is running. The ioctl in question
needs a file descriptor that is connected to IP in order to run. To get this
fiel descriptor, the dhcp server explicitly opens /dev/ip. Unfortunately, directly
opening /dev/ip requires net_rawaccess privilege. Another way to get such a file
descriptor is to create it with the socket syscall like so:
ip = socket(AF_INET, SOCK_DGRAM, 0)
|