<div>Hi Anderson,</div>
<div> </div>
<div>   Yeah it works but i have some problem in understanding this concept.</div>
<div> </div>
<div>i gave { match if suffix (option dhcp-client-identifier, 8) =”\<a href="http://0abc.com/" target="_blank">0abc.com</a>” ;} which is not working, and changed the length to 7 as follwos </div>
<div>{ match if suffix (option dhcp-client-identifier, 7) =”\<a href="http://0abc.com/" target="_blank">0abc.com</a>” ;} this also not working i tried from 0 till 8 all length it's not working.</div>
<div> </div>
<div>but then i changed the domain as <a href="http://isc.com">isc.com</a> instead of <a href="http://abc.com">abc.com</a> and with length 6 this concept is working fine for variable length user name and also i checked for domain name <a href="http://pat.com">pat.com</a> with length 6 it is working </div>

<div> </div>
<div>{ match if suffix (option dhcp-client-identifier, 6) =”\<a href="http://0abc.com/" target="_blank">0isc.com</a>” ;}<br>{ match if suffix (option dhcp-client-identifier, 6) =”\<a href="http://0abc.com/" target="_blank">0pat.com</a>” ;}</div>

<div> </div>
<div>what i observerd is the length part should be (byte legth of data-expr less one) is this correct and why is it so ?</div>
<div> </div>
<div>still i don't find any explanation why for the domain <a href="http://abc.com">abc.com</a> it is not working, can any one explain this interesting scenario.</div>
<div> </div>
<div>Regards</div>
<div>Pat<br><br><br><br><br></div>
<div class="gmail_quote">On Wed, Jun 3, 2009 at 5:53 PM, Chuck Anderson <span dir="ltr"><<a href="mailto:cra@wpi.edu">cra@wpi.edu</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">
<div class="im">On Wed, Jun 03, 2009 at 04:05:31PM +0530, pat wrote:<br>> { match if substring (option dhcp-client-identifier, 6, 12) =”\<a href="http://0abc.com/" target="_blank">0abc.com</a>” ;}<br>><br></div>
<div class="im">> But the problem is identifying the various address allocation classes in the<br>> server using a substring match at character postions will cause problems<br>> with variable length user names. Is there a way to match anything after<br>
> the "@"? using a regular expression, maybe?<br><br></div>"suffix" might be what you want:<br><br>  suffix (data-expr, length)<br><br>         The suffix operator evaluates data-expr and returns the last  length<br>
         bytes  of the result of that evaluation. Length is a numeric expres-<br>         sion.  If data-expr or length evaluate to null, then the result  is<br>         also  null.  If suffix evaluates to a number greater than the length<br>
         of the evaluated data, then the evaluated data is returned.<br><br>{ match if suffix (option dhcp-client-identifier, 8) =”\<a href="http://0abc.com/" target="_blank">0abc.com</a>” ;}<br>_______________________________________________<br>
dhcp-users mailing list<br><a href="mailto:dhcp-users@lists.isc.org">dhcp-users@lists.isc.org</a><br><a href="https://lists.isc.org/mailman/listinfo/dhcp-users" target="_blank">https://lists.isc.org/mailman/listinfo/dhcp-users</a></blockquote>
</div><br>