func (cc *Conn) GetObjects(t *Table) ([]Obj, error) {
	return cc.getObj(nil, t, unix.NFT_MSG_GETOBJ)
}
GetObjects get all the Obj that belongs to the given table
package nftables
import (
	"encoding/binary"
	"fmt"
	"github.com/mdlayher/netlink"
	"golang.org/x/sys/unix"
)
var objHeaderType = netlink.HeaderType((unix.NFNL_SUBSYS_NFTABLES << 8) | unix.NFT_MSG_NEWOBJ)
type Obj interface {
	table() *Table
	family() TableFamily
	unmarshal(*netlink.AttributeDecoder) error
	marshal(data bool) ([]byte, error)
}
func (cc *Conn) AddObject(o Obj) Obj {
	return cc.AddObj(o)
}
func (cc *Conn) AddObj(o Obj) Obj {
	cc.Lock()
	defer cc.Unlock()
	data, err := o.marshal(true)
	if err != nil {
		cc.setErr(err)
		return nil
	}
	cc.messages = append(cc.messages, netlink.Message{
		Header: netlink.Header{
			Type:  netlink.HeaderType((unix.NFNL_SUBSYS_NFTABLES << 8) | unix.NFT_MSG_NEWOBJ),
			Flags: netlink.Request | netlink.Acknowledge | netlink.Create,
		},
		Data: append(extraHeader(uint8(o.family()), 0), data...),
	})
	return o
}
func (cc *Conn) DeleteObject(o Obj) {
	cc.Lock()
	defer cc.Unlock()
	data, err := o.marshal(false)
	if err != nil {
		cc.setErr(err)
		return
	}
	data = append(data, cc.marshalAttr([]netlink.Attribute{{Type: unix.NLA_F_NESTED | unix.NFTA_OBJ_DATA}})...)
	cc.messages = append(cc.messages, netlink.Message{
		Header: netlink.Header{
			Type:  netlink.HeaderType((unix.NFNL_SUBSYS_NFTABLES << 8) | unix.NFT_MSG_DELOBJ),
			Flags: netlink.Request | netlink.Acknowledge,
		},
		Data: append(extraHeader(uint8(o.family()), 0), data...),
	})
}
func (cc *Conn) GetObj(o Obj) ([]Obj, error) {
	return cc.getObj(nil, o.table(), unix.NFT_MSG_GETOBJ)
}
func (cc *Conn) GetObjReset(o Obj) ([]Obj, error) {
	return cc.getObj(nil, o.table(), unix.NFT_MSG_GETOBJ_RESET)
}
func (cc *Conn) GetObject(o Obj) (Obj, error) {
	objs, err := cc.getObj(o, o.table(), unix.NFT_MSG_GETOBJ)
	if len(objs) == 0 {
		return nil, err
	}
	return objs[0], err
}