diff options
author | sotech117 <michael_foiani@brown.edu> | 2023-10-23 03:42:05 -0400 |
---|---|---|
committer | sotech117 <michael_foiani@brown.edu> | 2023-10-23 03:42:05 -0400 |
commit | 512c4c2785e6dbf53106b5a6f60e0e1992977016 (patch) | |
tree | 284ede052af9a1efc2a962d7da6f9abde588b7ac /cmd/vrouter | |
parent | 7ec4f310ec01100f648a42dd52cb0ac635ac0b10 (diff) |
add RIP request and reponse
Diffstat (limited to 'cmd/vrouter')
-rw-r--r-- | cmd/vrouter/main.go | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/cmd/vrouter/main.go b/cmd/vrouter/main.go index aacf786..7998e5d 100644 --- a/cmd/vrouter/main.go +++ b/cmd/vrouter/main.go @@ -80,9 +80,11 @@ func main() { for _, neighbor := range ipstack.GetNeighbors()[hop.Interface.Name] { if neighbor.VipAddr == netip.MustParseAddr(ipAddr) || neighbor.VipAddr == hop.VIP { - err = ipstack.SendIP(&myAddr, neighbor, ipstack.TEST_PROTOCOL, messageToSendBytes, ipAddr, nil) + bytesWritten, err := ipstack.SendIP(&myAddr, neighbor, ipstack.TEST_PROTOCOL, messageToSendBytes, ipAddr, nil) if err != nil { fmt.Println(err) + } else { + fmt.Printf("Sent %d bytes to %s\n", bytesWritten, neighbor.VipAddr.String()) } } } |