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

Method marshal

expr/objref.go:30–40  ·  view source on GitHub ↗
(fam byte)

Source from the content-addressed store, hash-verified

28}
29
30func (e *Objref) marshal(fam byte) ([]byte, error) {
31 data, err := e.marshalData(fam)
32 if err != nil {
33 return nil, err
34 }
35
36 return netlink.MarshalAttributes([]netlink.Attribute{
37 {Type: unix.NFTA_EXPR_NAME, Data: []byte("objref\x00")},
38 {Type: unix.NLA_F_NESTED | unix.NFTA_EXPR_DATA, Data: data},
39 })
40}
41
42func (e *Objref) marshalData(fam byte) ([]byte, error) {
43 return netlink.MarshalAttributes([]netlink.Attribute{

Callers

nothing calls this directly

Calls 1

marshalDataMethod · 0.95

Tested by

no test coverage detected