From 8f3452988e7b400ad94fd801788e090ce4607ac6 Mon Sep 17 00:00:00 2001 From: Uriel Fanelli Date: Sat, 12 Aug 2023 23:49:38 +0200 Subject: [PATCH] Some more useful logs, to troubleshoot. --- arp.go | 3 --- orchestrator.go | 4 +++- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/arp.go b/arp.go index 16c218d..f21f534 100644 --- a/arp.go +++ b/arp.go @@ -135,9 +135,6 @@ func sendARP(iface *net.Interface, m *arpMessage) error { if m.opcode == opARPReply { target = m.targetHardwareAddress } - // for i := 0; i < len(target); i++ { - // ll.Addr[i] = target[i] - // } log.Println("Copied ARP: ", copy(ll.Addr[:], target)) diff --git a/orchestrator.go b/orchestrator.go index 904565e..3ca6f37 100644 --- a/orchestrator.go +++ b/orchestrator.go @@ -17,13 +17,15 @@ func (mip *AbstractMulticast) AddUniqueAndSort(hier int64) { } else { mip.HierarchyArray = append(mip.HierarchyArray, hier) sort.Slice(mip.HierarchyArray, func(i, j int) bool { return mip.HierarchyArray[i] < mip.HierarchyArray[j] }) - log.Println(mip.HierarchyArray) + log.Println("Here the numbers known:", mip.HierarchyArray) } } func (mip *AbstractMulticast) IsAlpha(hier int64) bool { + log.Println("Element 0 is :", mip.HierarchyArray[0]) + return mip.HierarchyArray[0] == hier }