-
Notifications
You must be signed in to change notification settings - Fork 373
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Do not delete IPv6 link-local route in reconciler
Signed-off-by: wenyingd <wenyingd@vmware.com>
- Loading branch information
Showing
3 changed files
with
69 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
package wfp | ||
|
||
import ( | ||
"net" | ||
|
||
"golang.org/x/sys/windows" | ||
) | ||
|
||
type RuleID windows.GUID | ||
|
||
type WFPProvider interface { | ||
CreateSublayer(name string) windows.GUID | ||
ListSublayers() []Sublayer | ||
SubscribeNetEvents(eventCh chan wf.FwpmNetEvent) | ||
Close() error | ||
} | ||
|
||
type Sublayer interface { | ||
Name() string | ||
ID() windows.GUID | ||
NewL4RuleBuilder(direction Direction, stateful bool) L4RuleBuilder | ||
NewMacRuleBuilder() L2RuleBuilder | ||
ListRules(sublayerID windows.GUID) []*Rule | ||
AddRules(rules []Rule) error | ||
DeleteRules(rules []windows.GUID) error | ||
} | ||
|
||
type Rule interface { | ||
Allow() | ||
Block() | ||
Reject() | ||
|
||
IsStateful() bool | ||
Direction() Direction | ||
} | ||
|
||
type L4RuleBuilder interface { | ||
MatchSrcIP(ip net.IP) L4RuleBuilder | ||
MatchSrcIPNet(cidr net.IPNet) L4RuleBuilder | ||
MatchDstIP(ip net.IP) L4RuleBuilder | ||
MatchDstIPNet(cidr net.IPNet) L4RuleBuilder | ||
MatchProtocol(ipProto uint8) L4RuleBuilder | ||
MatchSrcPort(port uint16) L4RuleBuilder | ||
MatchDstPort(port uint16) L4RuleBuilder | ||
MatchDNS(dns string) L4RuleBuilder | ||
Done() Rule | ||
} | ||
|
||
type L2RuleBuilder interface { | ||
MatchSrcMAC(mac net.HardwareAddr) L4RuleBuilder | ||
MatchDstMAC(mac net.HardwareAddr) L4RuleBuilder | ||
Done() Rule | ||
} | ||
|
||
type statefulRule struct { | ||
} | ||
|
||
type statelessRule struct { | ||
} | ||
|
||
type l2Rule struct { | ||
} |