Skip to content

Commit 46a0f24

Browse files
committed
add htons() comment, fix createGratuitousARP() comment
1 parent 6786229 commit 46a0f24

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

ipmanager/basicConfigurer.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ const (
5353
IPv4AddressSize = 4
5454
)
5555

56-
// arpSendGratuitous is a function that sends gratuitous ARP requests
56+
// createGratuitousARP prepares a packet with a gratuitous ARP request
5757
func (c *BasicConfigurer) createGratuitousARP() ([]byte, error) {
5858
// Create the Ethernet layer
5959
ethLayer := &layers.Ethernet{

ipmanager/basicConfigurer_linux.go

+1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import (
66
"syscall"
77
)
88

9+
// htons converts uint16 to network byte order
910
func htons(i uint16) uint16 {
1011
return (i<<8)&0xff00 | i>>8
1112
}

0 commit comments

Comments
 (0)