Encapsulated match if

Simon Hobson dhcp1 at thehobsons.co.uk
Tue Mar 4 11:06:35 UTC 2008


Olivier Bax de Keating wrote:

>In each classes, I put 2 "match if", and I know 
>that this syntax is probably not correct. I'm 
>searching for the good one, I mean, a way to 
>encapsulate 2 conditions of match, with "if Š" 
>if it exists, or subclasses (but it seems to me 
>that they are not done for that ?)


Have you checked 'man dhcp-eval' ?

Two features you probably want to look at :


AND : if match if ( condition 1 AND condition 2 )

Fairly obvious, matches if both conditions are true.


match-first-value : match-first-value ( expression 1, expression 2, ... )

Function that returns the first non-null value. 
So if expression 1 has a value then it is 
returned, but if it is null then expression 2 is 
returned, and so on. I'm not sure you need this, 
as I'm not entirely sure what the question is !


More information about the dhcp-users mailing list