Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

not enough arguments in call to raw.ListenPacket #11

Open
spenco100 opened this issue Feb 18, 2019 · 1 comment
Open

not enough arguments in call to raw.ListenPacket #11

spenco100 opened this issue Feb 18, 2019 · 1 comment

Comments

@spenco100
Copy link

I am using MacOS Mojave trying to use your package. When I run
go install main.go
All I get is:
'./main.go:256:32: not enough arguments in call to raw.ListenPacket
./main.go:256:38: undefined: raw.ProtocolARP'
I am suspecting there is some problem with my Go installation or PCAP since I am a total noob to Go and programming in general. Can anyone offer some help?

@jcherniak
Copy link

ProtocolARP doesn't appear to be defined. I changed that line to read:
conn, err := raw.ListenPacket(ifc, 54, nil)

and it compiled fine. 54 is the protocol number for ARP according to https://www.iana.org/assignments/protocol-numbers/protocol-numbers.xhtml

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants