trireme-lib: Index | Files

package windows

import ""


Package Files

rulespec_windows.go utils.go

func MakeRuleSpecText Uses

func MakeRuleSpecText(winRuleSpec *WindowsRuleSpec, validate bool) (string, error)

MakeRuleSpecText converts a WindowsRuleSpec back into a string for an iptables rule

func WideCharPointerToString Uses

func WideCharPointerToString(pszWide *uint16) string

WideCharPointerToString converts a pointer to a zero-terminated wide character string to a golang string

type WindowsRuleMatchSet Uses

type WindowsRuleMatchSet struct {
    MatchSetName    string
    MatchSetNegate  bool
    MatchSetDstIP   bool
    MatchSetDstPort bool
    MatchSetSrcIP   bool
    MatchSetSrcPort bool

WindowsRuleMatchSet represents result of parsed --match-set

func (*WindowsRuleMatchSet) Equal Uses

func (w *WindowsRuleMatchSet) Equal(other *WindowsRuleMatchSet) bool

Equal compares a WindowsRuleMatchSet to another for equality

type WindowsRulePortRange Uses

type WindowsRulePortRange struct {
    PortStart int
    PortEnd   int

WindowsRulePortRange represents parsed port range

func ParsePortString Uses

func ParsePortString(portString string) ([]*WindowsRulePortRange, error)

ParsePortString parses comma-separated list of port or port ranges

func (*WindowsRulePortRange) Equal Uses

func (w *WindowsRulePortRange) Equal(other *WindowsRulePortRange) bool

Equal compares a WindowsRulePortRange to another for equality

type WindowsRuleSpec Uses

type WindowsRuleSpec struct {
    Protocol         int
    Action           int // FilterAction (allow, drop, nfq, proxy)
    ProxyPort        int
    Mark             int
    Log              bool
    LogPrefix        string
    GroupID          int
    MatchSrcPort     []*WindowsRulePortRange
    MatchDstPort     []*WindowsRulePortRange
    MatchBytes       []byte
    MatchBytesOffset int
    MatchSet         []*WindowsRuleMatchSet

WindowsRuleSpec represents result of parsed iptables rule

func ParseRuleSpec Uses

func ParseRuleSpec(rulespec ...string) (*WindowsRuleSpec, error)

ParseRuleSpec parses a windows iptable rule

func (*WindowsRuleSpec) Equal Uses

func (w *WindowsRuleSpec) Equal(other *WindowsRuleSpec) bool

Equal compares a WindowsRuleSpec to another for equality

Package windows imports 12 packages (graph). Updated 2020-07-03 with GOOS=windows. Refresh now. Tools for package owners.