(* HCoop Domtool (http://hcoop.sourceforge.net/)
* Copyright (c) 2006-2007, Adam Chlipala
(* HCoop Domtool (http://hcoop.sourceforge.net/)
* Copyright (c) 2006-2007, Adam Chlipala
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
fun formatOutputRule (Client (ports, hosts)) = "dport " ^ formatPorts ports ^ (case hosts of
[] => ""
| _ => " daddr " ^ formatHosts hosts) ^ " ACCEPT;"
fun formatOutputRule (Client (ports, hosts)) = "dport " ^ formatPorts ports ^ (case hosts of
[] => ""
| _ => " daddr " ^ formatHosts hosts) ^ " ACCEPT;"
fun formatInputRule (Server (ports, hosts)) = "dport " ^ formatPorts ports ^ (case hosts of
[] => ""
| _ => " saddr " ^ formatHosts hosts) ^ " ACCEPT;"
fun formatInputRule (Server (ports, hosts)) = "dport " ^ formatPorts ports ^ (case hosts of
[] => ""
| _ => " saddr " ^ formatHosts hosts) ^ " ACCEPT;"
type ferm_lines = { input_rules : (string list) DataStructures.StringMap.map,
output_rules : (string list) DataStructures.StringMap.map }
type ferm_lines = { input_rules : (string list) DataStructures.StringMap.map,
output_rules : (string list) DataStructures.StringMap.map }