dhcpd code changes

Jeffrey Hutzelman jhutz at cmu.edu
Wed Nov 4 18:45:03 UTC 2009


--On Tuesday, November 03, 2009 06:41:03 PM +0530 Ashmath Khan 
<hashmat.email at gmail.com> wrote:

> I wanted to modify dhcpd code for the following:
> 1) to introduce wild chars in match if statements i.e, in the string, rhs.

You can do this already; see dhcp-eval(5) and the descriptions of the ~= 
and ~~ operators, which do regular expression matching.

> 2) to add ranges to mac addresess checking in expressions using ethernet,
> maybe by introducing < and > in expressions.

Yes, it would be nice to have a full range of inequalities on integers and 
data expressions, and not very hard to add, either.


> 3) a way to scan option 55, to see which options client is requesting.

Tricky.  The current configuration language has no looping, which is 
probably a feature.  However, the regex match operations I mention above 
operate on data expressions, so if you're interested in determining whether 
a particular option is named, you could probably construct an RE to match 
against the option 55 data to answer that.

-- Jeffrey T. Hutzelman (N3NHS) <jhutz+ at cmu.edu>
   Carnegie Mellon University - Pittsburgh, PA




More information about the dhcp-hackers mailing list