Fix codec fallback and generate type imports
[govpp.git] / examples / simple-client / simple_client.go
index fe7c109..096c222 100644 (file)
@@ -166,7 +166,7 @@ func addIPAddress(ch api.Channel, index interfaces.InterfaceIndex) {
        req := &interfaces.SwInterfaceAddDelAddress{
                SwIfIndex: index,
                IsAdd:     true,
-               Prefix: ip_types.AddressWithPrefix{
+               Prefix: interfaces.AddressWithPrefix{
                        Address: interfaces.Address{
                                Af: ip_types.ADDRESS_IP4,
                                Un: ip_types.AddressUnionIP4(interfaces.IP4Address{10, 10, 0, uint8(index)}),
@@ -190,7 +190,7 @@ func ipAddressDump(ch api.Channel, index interfaces.InterfaceIndex) {
        fmt.Printf("Dumping IP addresses for interface index %d\n", index)
 
        req := &ip.IPAddressDump{
-               SwIfIndex: index,
+               SwIfIndex: ip.InterfaceIndex(index),
        }
        reqCtx := ch.SendMultiRequest(req)