Advertisement
cosminBoaca

Untitled

Apr 24th, 2015
191
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.35 KB | None | 0 0
  1. modify device flows =
  2. let match = fst device
  3. modify = snd device
  4. in
  5. filter (/= VoidFlow) $ map (\x -> if match x then modify x else VoidFlow) flows
  6.  
  7. reachability network src dst =
  8. let flow = Flow $ Or [And [Eq "Src" $ Val src, Eq "Dst" $ Val dst, Eq "Port" Any]] in
  9. foldl (\acc device -> modify device acc) [flow] network
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement