mirror of
https://github.com/vishvananda/netlink
synced 2024-12-27 00:52:11 +00:00
378a404a26
This patch implements both tc and filter chains. We also need to align tc filter delition implementation with iprote2 to delete filters withichain by passing additional bits during filter deletion call.
23 lines
341 B
Go
23 lines
341 B
Go
package netlink
|
|
|
|
import (
|
|
"fmt"
|
|
)
|
|
|
|
// Chain contains the attributes of a Chain
|
|
type Chain struct {
|
|
Parent uint32
|
|
Chain uint32
|
|
}
|
|
|
|
func (c Chain) String() string {
|
|
return fmt.Sprintf("{Parent: %d, Chain: %d}", c.Parent, c.Chain)
|
|
}
|
|
|
|
func NewChain(parent uint32, chain uint32) Chain {
|
|
return Chain{
|
|
Parent: parent,
|
|
Chain: chain,
|
|
}
|
|
}
|