Skip to content

Add af_packet capture engine#950

Merged
buger merged 1 commit into
masterfrom
af_packet
Jun 26, 2021
Merged

Add af_packet capture engine#950
buger merged 1 commit into
masterfrom
af_packet

Conversation

@buger

@buger buger commented Jun 26, 2021

Copy link
Copy Markdown
Collaborator

It is a high performant alternative to libpcap engine.
Only Linux supported.

Performance gain can be up to 50% depending on traffic type.
Can be enabled using:

--input-raw-engine af_packet

It is a high performant alternative to libpcap engine.
Only Linux supported.

Performance gain can be up to 50% depending on traffic type.
Can be enabled using:

`--input-raw-engine af_packet`
@buger buger merged commit 05d09ce into master Jun 26, 2021
@buger buger deleted the af_packet branch June 26, 2021 20:03
Comment thread capture/af_packet.go
TPacket *afpacket.TPacket
}

func newAfpacketHandle(device string, snaplen int, block_size int, num_blocks int,

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

don't use underscores in Go names; func parameter block_size should be blockSize
don't use underscores in Go names; func parameter num_blocks should be numBlocks

Comment thread capture/af_packet.go
"github.com/google/gopacket/pcap"
"golang.org/x/net/bpf"

_ "github.com/google/gopacket/layers"

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

a blank import should be only in a main or test package, or have a comment justifying it

xingren23 referenced this pull request in xingren23/goreplay Sep 4, 2021
It is a high performant alternative to libpcap engine.
Only Linux supported.

Performance gain can be up to 50% depending on traffic type.
Can be enabled using:

`--input-raw-engine af_packet`
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

Successfully merging this pull request may close these issues.

2 participants