Skip to content

Commit

Permalink
add htons() comment, fix createGratuitousARP() comment
Browse files Browse the repository at this point in the history
  • Loading branch information
pashagolub committed Jan 14, 2025
1 parent 37e7f38 commit 57770ee
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion ipmanager/basicConfigurer.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ const (
IPv4AddressSize = 4
)

// arpSendGratuitous is a function that sends gratuitous ARP requests
// createGratuitousARP prepares a packet with a gratuitous ARP request
func (c *BasicConfigurer) createGratuitousARP() ([]byte, error) {
// Create the Ethernet layer
ethLayer := &layers.Ethernet{
Expand Down
1 change: 1 addition & 0 deletions ipmanager/basicConfigurer_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import (
"syscall"
)

// htons converts uint16 to network byte order
func htons(i uint16) uint16 {
return (i<<8)&0xff00 | i>>8
}
Expand Down

0 comments on commit 57770ee

Please sign in to comment.