From 9f27eeff53ee501b8641595baa7cbc2f0014a68c Mon Sep 17 00:00:00 2001 From: Ondrej Fabry Date: Wed, 18 Mar 2020 10:18:03 +0100 Subject: Fix import path in examples/binapi Change-Id: I6af1ae2778b73f37be09c64a2948417e576f02ab Signed-off-by: Ondrej Fabry --- examples/simple-client/simple_client.go | 23 +++++++++-------------- 1 file changed, 9 insertions(+), 14 deletions(-) (limited to 'examples/simple-client') diff --git a/examples/simple-client/simple_client.go b/examples/simple-client/simple_client.go index 3ed811d..6d96ca8 100644 --- a/examples/simple-client/simple_client.go +++ b/examples/simple-client/simple_client.go @@ -27,8 +27,10 @@ import ( "git.fd.io/govpp.git/adapter/socketclient" "git.fd.io/govpp.git/api" "git.fd.io/govpp.git/core" + "git.fd.io/govpp.git/examples/binapi/interface_types" "git.fd.io/govpp.git/examples/binapi/interfaces" "git.fd.io/govpp.git/examples/binapi/ip" + "git.fd.io/govpp.git/examples/binapi/ip_types" "git.fd.io/govpp.git/examples/binapi/vpe" ) @@ -153,19 +155,15 @@ 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 + SwIfIndex: 1, IsAdd: true, - Prefix: interfaces.Prefix{ + Prefix: ip_types.AddressWithPrefix{ Address: interfaces.Address{ - Af: interfaces.ADDRESS_IP4, - Un: interfaces.AddressUnionIP4(interfaces.IP4Address{10, 10, 0, 1}), + Af: ip_types.ADDRESS_IP4, + Un: ip_types.AddressUnionIP4(interfaces.IP4Address{10, 10, 0, 1}), }, Len: 24, - },*/ + }, } reply := &interfaces.SwInterfaceAddDelAddressReply{} @@ -236,11 +234,8 @@ func interfaceNotifications(ch api.Channel) { return } err = ch.SendRequest(&interfaces.SwInterfaceSetFlags{ - SwIfIndex: 1, - AdminUpDown: 1, - /* below for 20.01-rc0 - AdminUpDown: true, - Flags: interfaces.IF_STATUS_API_FLAG_ADMIN_UP,*/ + SwIfIndex: 1, + Flags: interface_types.IF_STATUS_API_FLAG_ADMIN_UP, }).ReceiveReply(&interfaces.SwInterfaceSetFlagsReply{}) if err != nil { logError(err, "setting interface flags") -- cgit 1.2.3-korg