-// Service represents VPP binary API services in acl module.
-type Service interface {
- DumpACL(ctx context.Context, in *ACLDump) ([]*ACLDetails, error)
- DumpACLInterfaceEtypeWhitelist(ctx context.Context, in *ACLInterfaceEtypeWhitelistDump) ([]*ACLInterfaceEtypeWhitelistDetails, error)
- DumpACLInterfaceList(ctx context.Context, in *ACLInterfaceListDump) ([]*ACLInterfaceListDetails, error)
- DumpMacipACL(ctx context.Context, in *MacipACLDump) ([]*MacipACLDetails, error)
- DumpMacipACLInterfaceList(ctx context.Context, in *MacipACLInterfaceListDump) ([]*MacipACLInterfaceListDetails, error)
- ACLAddReplace(ctx context.Context, in *ACLAddReplace) (*ACLAddReplaceReply, error)
- ACLDel(ctx context.Context, in *ACLDel) (*ACLDelReply, error)
- ACLInterfaceAddDel(ctx context.Context, in *ACLInterfaceAddDel) (*ACLInterfaceAddDelReply, error)
- ACLInterfaceSetACLList(ctx context.Context, in *ACLInterfaceSetACLList) (*ACLInterfaceSetACLListReply, error)
- ACLInterfaceSetEtypeWhitelist(ctx context.Context, in *ACLInterfaceSetEtypeWhitelist) (*ACLInterfaceSetEtypeWhitelistReply, error)
- ACLPluginControlPing(ctx context.Context, in *ACLPluginControlPing) (*ACLPluginControlPingReply, error)
- ACLPluginGetConnTableMaxEntries(ctx context.Context, in *ACLPluginGetConnTableMaxEntries) (*ACLPluginGetConnTableMaxEntriesReply, error)
- ACLPluginGetVersion(ctx context.Context, in *ACLPluginGetVersion) (*ACLPluginGetVersionReply, error)
- MacipACLAdd(ctx context.Context, in *MacipACLAdd) (*MacipACLAddReply, error)
- MacipACLAddReplace(ctx context.Context, in *MacipACLAddReplace) (*MacipACLAddReplaceReply, error)
- MacipACLDel(ctx context.Context, in *MacipACLDel) (*MacipACLDelReply, error)
- MacipACLInterfaceAddDel(ctx context.Context, in *MacipACLInterfaceAddDel) (*MacipACLInterfaceAddDelReply, error)
- MacipACLInterfaceGet(ctx context.Context, in *MacipACLInterfaceGet) (*MacipACLInterfaceGetReply, error)
-}
-
-type service struct {
- ch api.Channel
-}
-
-func NewService(ch api.Channel) Service {
- return &service{ch}
-}
-
-func (c *service) DumpACL(ctx context.Context, in *ACLDump) ([]*ACLDetails, error) {
- var dump []*ACLDetails
- req := c.ch.SendMultiRequest(in)
- for {
- m := new(ACLDetails)
- stop, err := req.ReceiveReply(m)
- if stop {
- break
- }
- if err != nil {
- return nil, err
- }
- dump = append(dump, m)
- }
- return dump, nil
-}
-
-func (c *service) DumpACLInterfaceEtypeWhitelist(ctx context.Context, in *ACLInterfaceEtypeWhitelistDump) ([]*ACLInterfaceEtypeWhitelistDetails, error) {
- var dump []*ACLInterfaceEtypeWhitelistDetails
- req := c.ch.SendMultiRequest(in)
- for {
- m := new(ACLInterfaceEtypeWhitelistDetails)
- stop, err := req.ReceiveReply(m)
- if stop {
- break
- }
- if err != nil {
- return nil, err
- }
- dump = append(dump, m)
- }
- return dump, nil
-}
-
-func (c *service) DumpACLInterfaceList(ctx context.Context, in *ACLInterfaceListDump) ([]*ACLInterfaceListDetails, error) {
- var dump []*ACLInterfaceListDetails
- req := c.ch.SendMultiRequest(in)
- for {
- m := new(ACLInterfaceListDetails)
- stop, err := req.ReceiveReply(m)
- if stop {
- break
- }
- if err != nil {
- return nil, err
- }
- dump = append(dump, m)
- }
- return dump, nil
-}
-
-func (c *service) DumpMacipACL(ctx context.Context, in *MacipACLDump) ([]*MacipACLDetails, error) {
- var dump []*MacipACLDetails
- req := c.ch.SendMultiRequest(in)
- for {
- m := new(MacipACLDetails)
- stop, err := req.ReceiveReply(m)
- if stop {
- break
- }
- if err != nil {
- return nil, err
- }
- dump = append(dump, m)
- }
- return dump, nil
-}
-
-func (c *service) DumpMacipACLInterfaceList(ctx context.Context, in *MacipACLInterfaceListDump) ([]*MacipACLInterfaceListDetails, error) {
- var dump []*MacipACLInterfaceListDetails
- req := c.ch.SendMultiRequest(in)
- for {
- m := new(MacipACLInterfaceListDetails)
- stop, err := req.ReceiveReply(m)
- if stop {
- break
- }
- if err != nil {
- return nil, err
- }
- dump = append(dump, m)
- }
- return dump, nil
-}
-
-func (c *service) ACLAddReplace(ctx context.Context, in *ACLAddReplace) (*ACLAddReplaceReply, error) {
- out := new(ACLAddReplaceReply)
- err := c.ch.SendRequest(in).ReceiveReply(out)
- if err != nil {
- return nil, err
- }
- return out, nil
-}
-
-func (c *service) ACLDel(ctx context.Context, in *ACLDel) (*ACLDelReply, error) {
- out := new(ACLDelReply)
- err := c.ch.SendRequest(in).ReceiveReply(out)
- if err != nil {
- return nil, err
- }
- return out, nil
-}
-
-func (c *service) ACLInterfaceAddDel(ctx context.Context, in *ACLInterfaceAddDel) (*ACLInterfaceAddDelReply, error) {
- out := new(ACLInterfaceAddDelReply)
- err := c.ch.SendRequest(in).ReceiveReply(out)
- if err != nil {
- return nil, err
- }
- return out, nil
-}
-
-func (c *service) ACLInterfaceSetACLList(ctx context.Context, in *ACLInterfaceSetACLList) (*ACLInterfaceSetACLListReply, error) {
- out := new(ACLInterfaceSetACLListReply)
- err := c.ch.SendRequest(in).ReceiveReply(out)
- if err != nil {
- return nil, err
- }
- return out, nil
-}
-
-func (c *service) ACLInterfaceSetEtypeWhitelist(ctx context.Context, in *ACLInterfaceSetEtypeWhitelist) (*ACLInterfaceSetEtypeWhitelistReply, error) {
- out := new(ACLInterfaceSetEtypeWhitelistReply)
- err := c.ch.SendRequest(in).ReceiveReply(out)
- if err != nil {
- return nil, err
- }
- return out, nil
-}
-
-func (c *service) ACLPluginControlPing(ctx context.Context, in *ACLPluginControlPing) (*ACLPluginControlPingReply, error) {
- out := new(ACLPluginControlPingReply)
- err := c.ch.SendRequest(in).ReceiveReply(out)
- if err != nil {
- return nil, err
- }
- return out, nil
-}
-
-func (c *service) ACLPluginGetConnTableMaxEntries(ctx context.Context, in *ACLPluginGetConnTableMaxEntries) (*ACLPluginGetConnTableMaxEntriesReply, error) {
- out := new(ACLPluginGetConnTableMaxEntriesReply)
- err := c.ch.SendRequest(in).ReceiveReply(out)
- if err != nil {
- return nil, err
- }
- return out, nil
-}
-
-func (c *service) ACLPluginGetVersion(ctx context.Context, in *ACLPluginGetVersion) (*ACLPluginGetVersionReply, error) {
- out := new(ACLPluginGetVersionReply)
- err := c.ch.SendRequest(in).ReceiveReply(out)
- if err != nil {
- return nil, err
- }
- return out, nil
-}
-
-func (c *service) MacipACLAdd(ctx context.Context, in *MacipACLAdd) (*MacipACLAddReply, error) {
- out := new(MacipACLAddReply)
- err := c.ch.SendRequest(in).ReceiveReply(out)
- if err != nil {
- return nil, err
- }
- return out, nil
-}
-
-func (c *service) MacipACLAddReplace(ctx context.Context, in *MacipACLAddReplace) (*MacipACLAddReplaceReply, error) {
- out := new(MacipACLAddReplaceReply)
- err := c.ch.SendRequest(in).ReceiveReply(out)
- if err != nil {
- return nil, err
- }
- return out, nil
-}
-
-func (c *service) MacipACLDel(ctx context.Context, in *MacipACLDel) (*MacipACLDelReply, error) {
- out := new(MacipACLDelReply)
- err := c.ch.SendRequest(in).ReceiveReply(out)
- if err != nil {
- return nil, err
- }
- return out, nil
-}
-
-func (c *service) MacipACLInterfaceAddDel(ctx context.Context, in *MacipACLInterfaceAddDel) (*MacipACLInterfaceAddDelReply, error) {
- out := new(MacipACLInterfaceAddDelReply)
- err := c.ch.SendRequest(in).ReceiveReply(out)
- if err != nil {
- return nil, err
- }
- return out, nil
-}
-
-func (c *service) MacipACLInterfaceGet(ctx context.Context, in *MacipACLInterfaceGet) (*MacipACLInterfaceGetReply, error) {
- out := new(MacipACLInterfaceGetReply)
- err := c.ch.SendRequest(in).ReceiveReply(out)
- if err != nil {
- return nil, err
- }
- return out, nil
-}