Files
lneto/x/xnet/xnet_debug_pcap.go
T
Pat Whittingslow 157a8537a2 testing.B.Loop() standardization and StackAsync.Debug improvement (#156)
* testing.B.Loop() standardization and StackAsync.Debug heap debugging improvement

* apply @MDr164 fixes

* @MDr164 great suggestions to prevent panic and print correct mallocs
2026-07-17 11:59:27 -03:00

25 lines
344 B
Go

//go:build xnetdebug
package xnet
import (
"os"
"github.com/soypat/lneto/internal"
)
var _pcap CapturePrinter
func init() {
_pcap.Configure(os.Stdout, CapturePrinterConfig{
NamespaceWidth: 3,
})
}
func debugPacket(msg string, b []byte) {
_pcap.PrintEthernet(msg, b)
if internal.HeapAllocDebugging {
internal.LogAllocs(msg)
}
}