google / google/gopacket

API does not provide a way to inject to an inactive handle

Open
#585 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Go
Stars
6.8k
Forks
1.2k
PR merge metrics
No merged PRs in 30d

Description

I am using a Myricom snf library which allows packet injection through an inactive handle. This allows for packet injection without the need for any read buffers to be established. In my use case, I need to inject IGMP packets to subscribe to data which is then read by a different process which is doing the sniffing.

I was able to accomplish this by adding the following method to the InactiveHandle interface. https://github.com/nicknezis/gopacket/commit/0d080624a354db2e7758064076a811e8da1e5017#diff-69b81a223850b8b6476f978036525756

I'm not sure if there is a better way to accomplish this, but it seems like a limitation of the `gopacket` abstraction above the lower `libpcap` library. I'm open to suggestions if there are better approaches (i.e. should there be a third interface type? `WriteableInactiveHandle`)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.