Encapsulated match if

John Hascall john at iastate.edu
Wed Mar 5 14:25:34 UTC 2008



I've never used this one, but it looks like you can just say:

   if exists option-67 {
   }

if you want to know if the client requested option-67 -- no
need to manually poke around in dhcp-parameter-request-list.

John

> I just read the eval man page.
> If I don't misunderstand it, exists check if the content of an option is =
> not null, ie :
> if exists dhcp-parameter-request-list {
>                # Always send the PXELINUX options (specified in =
> hexadecimal)
>                option dhcp-parameter-request-list =3D concat(option =
> dhcp-parameter-request-list,d0,d1,d2,d3);
> }
> 
> But, what I want is to check if a given code option is present in the =
> option 55 (dhcp-parameter-request-list) which contains in fact a =
> concatenation of option codes (requested by the client).
> 
> Thx for all
> 
> Olivier
> -----Message d'origine-----
> De : dhcp-users-bounce at isc.org [mailto:dhcp-users-bounce at isc.org] De la =
> part de John Hascall
> Envoy=E9 : mercredi 5 mars 2008 14:56
> =C0 : dhcp-users at isc.org
> Objet : Re: Encapsulated match if=20
> 
> 
> 
> I think you want 'exists' -- see 'man dhcp-eval'.
> 
> John
> 
> 
> ------_=_NextPart_001_01C87ECA.E221AA90
> Content-Type: text/html;
> 	charset="iso-8859-1"
> Content-Transfer-Encoding: quoted-printable
> 
> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
> <HTML>
> <HEAD>
> <META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; =
> charset=3Diso-8859-1">
> <META NAME=3D"Generator" CONTENT=3D"MS Exchange Server version =
> 6.5.7652.24">
> <TITLE>RE: Encapsulated match if </TITLE>
> </HEAD>
> <BODY>
> <!-- Converted from text/rtf format -->
> 
> <P DIR=3DLTR><SPAN LANG=3D"fr"></SPAN><SPAN LANG=3D"en-gb"><FONT =
> SIZE=3D2 FACE=3D"Courier New">I just read the eval man =
> page.</FONT></SPAN></P>
> 
> <P DIR=3DLTR><SPAN LANG=3D"fr"></SPAN><SPAN LANG=3D"en-gb"><FONT =
> SIZE=3D2 FACE=3D"Courier New">If I don't misunderstand it, exists check =
> if the content of an option is not null, ie :</FONT></SPAN></P>
> 
> <P DIR=3DLTR><SPAN LANG=3D"fr"></SPAN><SPAN LANG=3D"en-gb"><FONT =
> SIZE=3D2 FACE=3D"Courier New">if</FONT></SPAN><SPAN =
> LANG=3D"fr"><B></B></SPAN><B><SPAN LANG=3D"en-gb"> <FONT SIZE=3D2 =
> FACE=3D"Courier New">exists</FONT></SPAN></B><SPAN =
> LANG=3D"fr"></SPAN><SPAN LANG=3D"en-gb"><FONT SIZE=3D2 FACE=3D"Courier =
> New"> dhcp-parameter-request-list {</FONT></SPAN></P>
> 
> <P DIR=3DLTR><SPAN LANG=3D"en-gb"><FONT SIZE=3D2 FACE=3D"Courier =
> New">           &n=
> bsp;   # Always send the PXELINUX options (specified in =
> hexadecimal)</FONT></SPAN></P>
> 
> <P DIR=3DLTR><SPAN LANG=3D"en-gb"><FONT SIZE=3D2 FACE=3D"Courier =
> New">           &n=
> bsp;   option dhcp-parameter-request-list =3D concat(option =
> dhcp-parameter-request-list,d0,d1,d2,d3);</FONT></SPAN></P>
> 
> <P DIR=3DLTR><SPAN LANG=3D"en-gb"><FONT SIZE=3D2 FACE=3D"Courier =
> New">}</FONT></SPAN><SPAN LANG=3D"fr"></SPAN><SPAN =
> LANG=3D"en-gb"></SPAN></P>
> 
> <P DIR=3DLTR><SPAN LANG=3D"fr"></SPAN><SPAN LANG=3D"en-gb"></SPAN></P>
> 
> <P DIR=3DLTR><SPAN LANG=3D"en-gb"><FONT SIZE=3D2 FACE=3D"Courier =
> New">But, what I want is to check if a</FONT></SPAN><SPAN =
> LANG=3D"fr"></SPAN><SPAN LANG=3D"en-gb"> <FONT SIZE=3D2 FACE=3D"Courier =
> New">given</FONT></SPAN><SPAN LANG=3D"fr"></SPAN><SPAN LANG=3D"en-gb"> =
> <FONT SIZE=3D2 FACE=3D"Courier New">code option is present =
> in</FONT></SPAN><SPAN LANG=3D"fr"></SPAN><SPAN LANG=3D"en-gb"> <FONT =
> SIZE=3D2 FACE=3D"Courier New">the option 55</FONT></SPAN><SPAN =
> LANG=3D"fr"></SPAN><SPAN LANG=3D"en-gb"><FONT SIZE=3D2 FACE=3D"Courier =
> New"> (</FONT></SPAN><SPAN LANG=3D"fr"></SPAN><SPAN LANG=3D"en-gb"><FONT =
> SIZE=3D2 FACE=3D"Courier =
> New">dhcp-parameter-request-list</FONT></SPAN><SPAN =
> LANG=3D"fr"></SPAN><SPAN LANG=3D"en-gb"><FONT SIZE=3D2 FACE=3D"Courier =
> New">) which contains in fact a concatenation of option codes (requested =
> by the client).</FONT></SPAN></P>
> 
> <P DIR=3DLTR><SPAN LANG=3D"fr"></SPAN><SPAN LANG=3D"en-gb"><FONT =
> SIZE=3D2 FACE=3D"Courier New">Thx for all</FONT></SPAN></P>
> 
> <P DIR=3DLTR><SPAN LANG=3D"en-gb"><FONT SIZE=3D2 FACE=3D"Courier =
> New">Olivier</FONT></SPAN><SPAN LANG=3D"fr"></SPAN><SPAN =
LANG=3D"en-gb"></SPAN></P>
> 
> <P DIR=3DLTR><SPAN LANG=3D"fr"><FONT SIZE=3D2 FACE=3D"Courier =
> New">-----Message d'origine-----<BR>
> De=A0: dhcp-users-bounce at isc.org [<A =
> HREF=3D"mailto:dhcp-users-bounce at isc.org">mailto:dhcp-users-bounce at isc.or=
> g</A>] De la part de John Hascall<BR>
> Envoy=E9=A0: mercredi 5 mars 2008 14:56<BR>
> =C0=A0: dhcp-users at isc.org<BR>
> Objet=A0: Re: Encapsulated match if</FONT></SPAN><SPAN LANG=3D"fr"> =
> </SPAN></P>
> 
> <P DIR=3DLTR><SPAN LANG=3D"fr"></SPAN></P>
> 
> <P DIR=3DLTR><SPAN LANG=3D"fr"><FONT SIZE=3D2 FACE=3D"Courier New">I =
> think you want 'exists' -- see 'man dhcp-eval'.</FONT></SPAN></P>
> 
> <P DIR=3DLTR><SPAN LANG=3D"fr"><FONT SIZE=3D2 FACE=3D"Courier =
> New">John</FONT></SPAN></P>
> 
> <P DIR=3DLTR><SPAN LANG=3D"fr"></SPAN></P>
> 
> </BODY>
> </HTML>
> ------_=_NextPart_001_01C87ECA.E221AA90--
> 



More information about the dhcp-users mailing list