INNER CODE UNIT · Go

DEFAULT_FRAME_SIZE

deepflowio/deepflow · server/libs/xdppacket/cmd/afpacket/main.go:43

	DEFAULT_FRAME_SIZE     = 1 << 16 // only
	DEFULT_AFPACKET_BLOCKS = 1 * units.KiB
	POLL_TIMEOUT           = 100 * time.Millisecond
	DIR_RX                 = 0
	DIR_TX                 = 1
)

var log = logging.MustGetLogger(os.Args[0])

var direction = flag.Int("r", 0, "Specify receive or send, "+
	"af_packet rx:0, af_packet tx:1")

func AfPacketRxTx() {
	var pkts, bytes uint64

	afPacket, err := afpacket.NewTPacket(
		afpacket.OptPollTimeout(POLL_TIMEOUT),
		afpacket.OptBlockSize(DEFAULT_BLOCK_SIZE),

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…