Class match

Lars Jacobsen lj at sydfynsel.dk
Wed Mar 29 14:06:03 UTC 2006


I have previusly tried to get help without luck, but there must be
someone that can help me with class match.
Im trying to write an expression that matches on circuit ID.

I need to make a match on 3.and 4. character is "21" AND 5. and 6.
character is between "01" and "16"

Something like:

 
match if  packet ( (option agent.circuit-id) , 3,2)  = "21" AND match if
packet ( (option agent.circuit-id) , 5,2)  = "01" to "16" THEN class "class one"

This part works but it only test  for "21":
match if  packet ( (option agent.circuit-id) , 3,2)  = "21"

This part also works but tests only for "01" and not 01>16
match if  packet ( (option agent.circuit-id) , 5,2)  = "01"

I now that  "" means text and im realy matching numbers, but that for
emphasising  what im tryng to match.
And yes I now I can make 16, like this but......

match if  packet ( (option agent.circuit-id) , 3,2)  = "21"
AND
match if  packet ( (option agent.circuit-id) , 5,2)  = "01" OR
match if  packet ( (option agent.circuit-id) , 5,2)  = "02" OR
match if  packet ( (option agent.circuit-id) , 5,2)  = "03" OR
match if  packet ( (option agent.circuit-id) , 5,2)  = "04" OR
match if  packet ( (option agent.circuit-id) , 5,2)  = "05" OR
match if  packet ( (option agent.circuit-id) , 5,2)  = "06" OR
match if  packet ( (option agent.circuit-id) , 5,2)  = "07" OR
match if  packet ( (option agent.circuit-id) , 5,2)  = "08" OR
match if  packet ( (option agent.circuit-id) , 5,2)  = "09" OR
match if  packet ( (option agent.circuit-id) , 5,2)  = "10" OR
match if  packet ( (option agent.circuit-id) , 5,2)  = "11" OR
match if  packet ( (option agent.circuit-id) , 5,2)  = "12" OR
match if  packet ( (option agent.circuit-id) , 5,2)  = "13" OR
match if  packet ( (option agent.circuit-id) , 5,2)  = "14" OR
match if  packet ( (option agent.circuit-id) , 5,2)  = "15" OR
match if  packet ( (option agent.circuit-id) , 5,2)  = "16"
THEN
class = "cllass one"

Anny ideas ?

 

 

/Lars

 




More information about the dhcp-users mailing list