-// aclDump shows an example where SendRequest and ReceiveReply are not chained together.
-func setIpUnnumbered(ch api.Channel) {
- req := &interfaces.SwInterfaceSetUnnumbered{
- SwIfIndex: 1,
- UnnumberedSwIfIndex: 2,
- IsAdd: 1,
+// addIPAddress sends request to add IP address to interface.
+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,
+ },*/