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

Method marshal

expr/expr.go:266–276  ·  view source on GitHub ↗
(fam byte)

Source from the content-addressed store, hash-verified

264}
265
266func (e *Meta) marshal(fam byte) ([]byte, error) {
267 exprData, err := e.marshalData(fam)
268 if err != nil {
269 return nil, err
270 }
271
272 return netlink.MarshalAttributes([]netlink.Attribute{
273 {Type: unix.NFTA_EXPR_NAME, Data: []byte("meta\x00")},
274 {Type: unix.NLA_F_NESTED | unix.NFTA_EXPR_DATA, Data: exprData},
275 })
276}
277
278func (e *Meta) marshalData(fam byte) ([]byte, error) {
279 var regData []byte

Callers

nothing calls this directly

Calls 1

marshalDataMethod · 0.95

Tested by

no test coverage detected