mclt Values, was 2 Instances of dhcp on Same Platform

Martin McCormick martin at dc.cis.okstate.edu
Tue Feb 27 21:12:49 UTC 2007


"David W. Hankins" writes:
> Groups maybe not, but classes, I don't see why it couldn't be
> done (with clever use of suffix() and/or substring()). *

exactly.  Something like

class "cisco-telephone" {
match substring (option vendor-class-identifier, 0, 19);

is it.  What's got me stuck is that the substring in the host
name is right-justified.  We know what it should be and how long
it is, but it starts at a different position due to the host's
computer name that is different for each host.  All the examples
I have seen reference a 0 or 1 position.  What I need is
something that works like strstr in C and finds the important
sequence anywhere in the string.  Because of what it is, it will
always be the right-most or last characters in the string as in
group1.okstate.edu.  Is there any string test that can find that
substring in a name like workstation1.group1.okstate.edu?  If we
can do that, the problem is solved.


More information about the dhcp-users mailing list