Categorygithub.com/threatmate/darwinpacket
modulepackage
1.0.0
Repository: https://github.com/threatmate/darwinpacket.git
Documentation: pkg.go.dev

# README

packet Test Status Go Reference Go Report Card

Package darwinpacket provides access to MacOS sockets via BPF.

It provides a net.PacketConn interface that can be used, in particular, with github.com/mdlayher/arp.

Golang GOOS targets:

  • darwin

Usage

conn, err := darwinpacket.Listen(iface, protocol, &darwinpacket.Config{})

History

github.com/mdlayher has specifically said that github.com/mdlayher/packet will only support Linux and recommended that we create variants for any other operating systems that we are interested in (in this case, MacOS).

This package is based on github.com/synfinatic/packet, but this version specifically limits support to MacOS in keeping with github.com/mdlayher's design wishes.

# Functions

Listen opens a packet sockets connection on the specified interface, using the given protocol value.

# Constants

No description provided by the author
No description provided by the author
No description provided by the author

# Structs

An Addr is a physical-layer address.
Config contains options for a Conn.
A Conn is an Linux packet sockets (AF_PACKET) implementation of a net.PacketConn.
Stats contains statistics about a Conn reported by the Linux kernel.

# Type aliases

Clone PCAP_D_* values from pcap/pcap.h.