update netlink dependencies

Signed-off-by: Antonio Ojea <aojea@redhat.com>
This commit is contained in:
Antonio Ojea
2020-11-17 23:32:35 +01:00
parent 8aad9739d8
commit c41c78b600
182 changed files with 9111 additions and 4756 deletions

View File

@ -12,6 +12,7 @@ type Rule struct {
Table int
Mark int
Mask int
Tos uint
TunID uint
Goto int
Src *net.IPNet
@ -22,6 +23,8 @@ type Rule struct {
SuppressIfgroup int
SuppressPrefixlen int
Invert bool
Dport *RulePortRange
Sport *RulePortRange
}
func (r Rule) String() string {
@ -40,3 +43,14 @@ func NewRule() *Rule {
Flow: -1,
}
}
// NewRulePortRange creates rule sport/dport range.
func NewRulePortRange(start, end uint16) *RulePortRange {
return &RulePortRange{Start: start, End: end}
}
// RulePortRange represents rule sport/dport range.
type RulePortRange struct {
Start uint16
End uint16
}