Parsing options
Erik Alapää
alapaa at operax.com
Thu Jun 16 13:18:20 UTC 2005
Hello! I am using the ISC relay code as a basis for developing a
special-purpose DHCP relay that, in addition to normal relay
functionality also will sniff some info from the DHCP packets and pass
that info to an LDAP server. Now my question: Can anyone offer me some
advice on how to get the lease time, circuit and remote id:s from the
options part of a packet? I have looked at the functions used by the
ISC DHCP client and server, but these seem to be EXTREMELY complicated
for some reason, and they require strange input parameters that the
relay does not have access to. They use client states, dhcp universe
structs, option caches and whatnot :| What I need is a routine that
simply takes a raw dhcp_packet or a dhcp packet struct as defined in
includes/dhcpd.h and gets me lease time, circuit and remote id. Looks
like I will have to build one from scratch :(
Regards,
--
Erik Alapää
Software Engineer M. Sc., Lic. Ind. Math.
Aurorum Science Park 8
SE 997 75 Luleå
Sweden
+46 70 535 17 14 (mobile)
+46 920 75510 (fax)
http://www.operax.com
More information about the dhcp-hackers
mailing list