Documentation ¶
Index ¶
- func CreateAllowedNetworkChainRule(chain string, net string) string
- func CreateDefaultNetworkChainRule(chain string) string
- func CreateEmptyChainRule(chainName string) string
- func CreateRestrictedPortsAddRule(chain string, ports []string) string
- func CreateRestrictedPortsDeleteRule(chain string, ports []string) string
- func CreateRestrictedPortsMatchRule(chain string, ports []string) string
- func DiffSets(old map[string]bool, new map[string]bool) (added map[string]bool, deleted map[string]bool)
- func GetRestrictedPortsFromTablesData(data []byte, chain string) []string
- func JoinWords(words ...string) string
- func Matched(a1, a2 []string) bool
- func ToSet(a []string) map[string]bool
- func ValidateNetworks(nets []string) error
- func ValidatePorts(ports []string) error
- func WriteLine(lines *bytes.Buffer, line string)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateEmptyChainRule ¶
func DiffSets ¶
func DiffSets(old map[string]bool, new map[string]bool) (added map[string]bool, deleted map[string]bool)
Compare two sets, old and new, and get added and deleted elements
func ValidateNetworks ¶
Validate slice of IP networks (addresses or CIDRs)
func ValidatePorts ¶
Validate slice of IP port numbers in string form
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.