Re: Errors when trying to build against VPP master


Rastislav Szabo -X (raszabo - PANTHEON TECHNOLOGIES@Cisco)
 

Hi Keith,

 

Nice to see you here again J

 

These examples are just showcasing the usage of GoVPP APIs. Anytime you use GoVPP, you have to generate the binary API bindings from your exact VPP version, as VPP binary APIs can change with each VPP commit.

 

If you are looking for more stable APIs that work between multiple VPP versions, take a look at Ligato Agent:

 

https://github.com/ligato/vpp-agent

 

https://docs.ligato.io/en/latest/intro/overview/

 

Rasto

 

From: govpp-dev@... <govpp-dev@...> On Behalf Of Keith Burns
Sent: Saturday, September 28, 2019 10:15 PM
To: govpp-dev@...
Subject: [govpp-dev] Errors when trying to build against VPP master

 

How does one reconcile:

func addIPAddress(ch api.Channel) {
  
fmt.Println("Adding IP address to interface")

   req
:= &interfaces.SwInterfaceAddDelAddress{
     
/*SwIfIndex:     1,
      IsAdd:         1,
      Address:       []byte{10, 10, 0, 1},
      AddressLength: 24,
      below for 20.01-rc0 */
     
IsAdd:     true,
     
Prefix: interfaces.Prefix{
         Address
: interfaces.Address{
            Af
: interfaces.ADDRESS_IP4,
           
Un: interfaces.AddressUnionIP4(interfaces.IP4Address{10, 10, 0, 1}),
        
},
        
Len: 24,
     
},
  
}
   reply
:= &interfaces.SwInterfaceAddDelAddressReply{}

  
if err := ch.SendRequest(req).ReceiveReply(reply); err != nil {
      logError(err
, "adding IP address to interface")
     
return
  
}
  
fmt.Printf("reply: %+v\n", reply)

  
fmt.Println("OK")
}

Both leaving the comments in as per downloaded source, and switching to the commented source generates errors.

Is there a version of go-vpp that works with vpp master?

Join govpp-dev@lists.fd.io to automatically receive all group messages.