diff options
author | Ondrej Fabry <ofabry@cisco.com> | 2020-06-23 14:10:53 +0200 |
---|---|---|
committer | Ondrej Fabry <ofabry@cisco.com> | 2020-06-24 08:17:33 +0200 |
commit | ceed73403bdb61387d04be8b47183e9c4a970749 (patch) | |
tree | 3f48a49051672efb44945b279b9f69693bc48540 /examples/simple-client | |
parent | 94620e85f0bdbb054af07ce3670fadc1f76cfdf0 (diff) |
Fix codec fallback and generate type imports
Change-Id: Idd76c7f19d952939caf153928ac60175845078ff
Signed-off-by: Ondrej Fabry <ofabry@cisco.com>
Diffstat (limited to 'examples/simple-client')
-rw-r--r-- | examples/simple-client/simple_client.go | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/examples/simple-client/simple_client.go b/examples/simple-client/simple_client.go index 0017eac..096c222 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" ) @@ -166,8 +168,8 @@ func addIPAddress(ch api.Channel, index interfaces.InterfaceIndex) { IsAdd: true, Prefix: interfaces.AddressWithPrefix{ Address: interfaces.Address{ - Af: interfaces.ADDRESS_IP4, - Un: interfaces.AddressUnionIP4(interfaces.IP4Address{10, 10, 0, uint8(index)}), + Af: ip_types.ADDRESS_IP4, + Un: ip_types.AddressUnionIP4(interfaces.IP4Address{10, 10, 0, uint8(index)}), }, Len: 32, }, @@ -244,7 +246,7 @@ func interfaceNotifications(ch api.Channel, index interfaces.InterfaceIndex) { // generate some events in VPP err = ch.SendRequest(&interfaces.SwInterfaceSetFlags{ SwIfIndex: index, - Flags: interfaces.IF_STATUS_API_FLAG_ADMIN_UP, + Flags: interface_types.IF_STATUS_API_FLAG_ADMIN_UP, }).ReceiveReply(&interfaces.SwInterfaceSetFlagsReply{}) if err != nil { logError(err, "setting interface flags") |