google / gopacket

Provides packet processing capabilities for Go
BSD 3-Clause "New" or "Revised" License
6.31k stars 1.13k forks source link

ARM portability #937

Open deakin-deep-dreamer opened 2 years ago

deakin-deep-dreamer commented 2 years ago

I was trying to build for ARM-based architecture but failed to do so since it depends for pcap to be cross compiled. Since this was not trivial, I am currently building on the raspberry pi itself, which seems not the best option in case someone has to do it for pi boards of different versions. Is there any suggestion to do host workstation base build?

yyy33 commented 2 years ago

I was trying to build for ARM-based architecture but failed to do so since it depends for pcap to be cross compiled. Since this was not trivial, I am currently building on the raspberry pi itself, which seems not the best option in case someone has to do it for pi boards of different versions. Is there any suggestion to do host workstation base build?

Is this library only support amd, I want to use it on arm64 android is it possible?

domdom82 commented 2 years ago

You could try using pcapgo instead of pcap. It is supposedly implemented in pure go without the libpcap dependency. Haven't tried it myself though. https://github.com/google/gopacket/blob/master/pcapgo/doc.go