aboutsummaryrefslogtreecommitdiff
path: root/cmd
diff options
context:
space:
mode:
authorDavid Doan <daviddoan@Davids-MacBook-Pro-70.local>2023-10-20 12:24:59 -0400
committerDavid Doan <daviddoan@Davids-MacBook-Pro-70.local>2023-10-20 12:24:59 -0400
commit6618f59d55ae5bbf99426b06e3cdd891f9a0f0c4 (patch)
tree413ebd5ea736631ab0abc9c78fe9004de5348154 /cmd
parenta7f9da2bb4ce6649ca38ab808a7b263aff9afbd7 (diff)
bug fixing
Diffstat (limited to 'cmd')
-rw-r--r--cmd/vhost/main.go4
-rw-r--r--cmd/vrouter/main.go8
2 files changed, 7 insertions, 5 deletions
diff --git a/cmd/vhost/main.go b/cmd/vhost/main.go
index f5016a1..02158c4 100644
--- a/cmd/vhost/main.go
+++ b/cmd/vhost/main.go
@@ -68,7 +68,7 @@ func main() {
for _, interfaces := range ipstack.GetInterfaces() {
if interfaces.Name == iface.Name {
- err = ipstack.SendIP(interfaces, iface, 0, messageToSendBytes, ipAddr)
+ err = ipstack.SendIP(interfaces, iface, 0, messageToSendBytes, ipAddr, nil)
if err != nil {
fmt.Println(err)
}
@@ -79,7 +79,7 @@ func main() {
}
for _, interfaces := range ipstack.GetInterfaces() {
if interfaces.Name == iface.Name {
- err = ipstack.SendIP(interfaces, iface, 0, messageToSendBytes, ipAddr)
+ err = ipstack.SendIP(interfaces, iface, 0, messageToSendBytes, ipAddr, nil)
if err != nil {
fmt.Println(err)
}
diff --git a/cmd/vrouter/main.go b/cmd/vrouter/main.go
index 1239ca1..eb7a1eb 100644
--- a/cmd/vrouter/main.go
+++ b/cmd/vrouter/main.go
@@ -24,7 +24,9 @@ func main() {
go func() {
for {
ipstack.RequestRip()
- time.Sleep(5 * time.Second)
+ // takes time to compute I think
+ // TODO @ MICHAEL
+ time.Sleep(2 * time.Second)
}
}()
@@ -80,7 +82,7 @@ func main() {
// get the interface to send from
for _, interfaces := range ipstack.GetInterfaces() {
if interfaces.Name == iface.Name {
- err = ipstack.SendIP(interfaces, iface, 0, messageToSendBytes, ipAddr)
+ err = ipstack.SendIP(interfaces, iface, 0, messageToSendBytes, ipAddr, nil)
if err != nil {
fmt.Println(err)
}
@@ -92,7 +94,7 @@ func main() {
// neighbor was found, send to neighbor
for _, interfaces := range ipstack.GetInterfaces() {
if interfaces.Name == iface.Name {
- err = ipstack.SendIP(interfaces, iface, 0, messageToSendBytes, ipAddr)
+ err = ipstack.SendIP(interfaces, iface, 0, messageToSendBytes, ipAddr, nil)
if err != nil {
fmt.Println(err)
}