MCPcopy Create free account
hub / github.com/google/nftables / unmarshal

Method unmarshal

expr/queue.go:68–85  ·  view source on GitHub ↗
(fam byte, data []byte)

Source from the content-addressed store, hash-verified

66}
67
68func (e *Queue) unmarshal(fam byte, data []byte) error {
69 ad, err := netlink.NewAttributeDecoder(data)
70 if err != nil {
71 return err
72 }
73 ad.ByteOrder = binary.BigEndian
74 for ad.Next() {
75 switch ad.Type() {
76 case unix.NFTA_QUEUE_NUM:
77 e.Num = ad.Uint16()
78 case unix.NFTA_QUEUE_TOTAL:
79 e.Total = ad.Uint16()
80 case unix.NFTA_QUEUE_FLAGS:
81 e.Flag = QueueFlag(ad.Uint16())
82 }
83 }
84 return ad.Err()
85}

Callers

nothing calls this directly

Calls 2

QueueFlagTypeAlias · 0.85
Uint16Method · 0.65

Tested by

no test coverage detected