mirror of
https://github.com/vishvananda/netlink
synced 2024-12-28 09:32:17 +00:00
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,
|
||
|
}
|
||
|
}
|