mdlayher / raw

Package raw enables reading and writing data at the device driver level for a network interface. MIT Licensed.
MIT License
425 stars 71 forks source link

Workaround deprecated functionality on OpenBSD. #37

Closed arktos closed 5 years ago

arktos commented 5 years ago

Syscall BIOCSSEESENT as used in setBPFDirection is deprecated on OpenBSD. Some quick checking in CVS makes me wonder if it was ever supported. BIOCSDIRFILT however does work as intended.

mdlayher commented 5 years ago

I think a more maintainable approach in this case would be to have a single function that is compiled differently for OpenBSD rather than copying the entire file. Will that work?

arktos commented 5 years ago

You are quite right. I'm quiet new to Go and not yet used to the various “idioms”. Hopefully I got it right this time. Do I have to create a new pull request or is this request automatically pulling in the latest commit? I'm new to GitHub as well… On another note, your work on this package has saved me a lot of effort, thank you!

corny commented 5 years ago

There is no need to change the file attributes:

raw_bsd.go 100644 → 100755 

Please leave them non-executable.

arktos commented 5 years ago

Done. Edited the files over SMB and forgot to reset the file permissions.

mdlayher commented 5 years ago

On another note, your work on this package has saved me a lot of effort, thank you!

Glad to hear it by the way!

mdlayher commented 5 years ago

Not sure if you're totally done, but looks like this still isn't quite right.