mirror of
https://github.com/maride/pancap.git
synced 2024-11-22 16:54:25 +00:00
23 lines
499 B
Go
23 lines
499 B
Go
package dhcpv4
|
|
|
|
import (
|
|
"fmt"
|
|
"git.darknebu.la/maride/pancap/common"
|
|
"github.com/google/gopacket/layers"
|
|
)
|
|
|
|
var (
|
|
requestMAC []string
|
|
)
|
|
|
|
// Processes the DHCP request packet handed over
|
|
func processRequestPacket(dhcppacket layers.DHCPv4) {
|
|
requestMAC = common.AppendIfUnique(dhcppacket.ClientHWAddr.String(), requestMAC)
|
|
}
|
|
|
|
// Prints the summary of all DHCP request packets
|
|
func printRequestSummary() {
|
|
fmt.Printf("%d unique DHCP requests\n", len(requestMAC))
|
|
common.PrintTree(requestMAC)
|
|
}
|