go.ligato.io/vpp-agent/v3@v3.5.0/plugins/vpp/ifplugin/vppcalls/vpp2202/ip6nd_vppcalls.go (about) 1 // Copyright (c) 2022 Cisco and/or its affiliates. 2 // 3 // Licensed under the Apache License, Version 2.0 (the "License"); 4 // you may not use this file except in compliance with the License. 5 // You may obtain a copy of the License at: 6 // 7 // http://www.apache.org/licenses/LICENSE-2.0 8 // 9 // Unless required by applicable law or agreed to in writing, software 10 // distributed under the License is distributed on an "AS IS" BASIS, 11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 // See the License for the specific language governing permissions and 13 // limitations under the License. 14 15 package vpp2202 16 17 import ( 18 "context" 19 20 "go.ligato.io/vpp-agent/v3/plugins/vpp/binapi/vpp2202/interface_types" 21 "go.ligato.io/vpp-agent/v3/plugins/vpp/binapi/vpp2202/rd_cp" 22 ) 23 24 func (h *InterfaceVppHandler) SetIP6ndAutoconfig(ctx context.Context, ifIdx uint32, enable, installDefaultRoutes bool) error { 25 _, err := h.rpcRdCp.IP6NdAddressAutoconfig(ctx, &rd_cp.IP6NdAddressAutoconfig{ 26 SwIfIndex: interface_types.InterfaceIndex(ifIdx), 27 Enable: enable, 28 InstallDefaultRoutes: installDefaultRoutes, 29 }) 30 if err != nil { 31 return err 32 } 33 return nil 34 }