1 Star 0 Fork 0

zhangjungang/beats

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
pfring_stub.go 700 Bytes
一键复制 编辑 原始数据 按行查看 历史
// +build !linux !havepfring
package sniffer
import (
"fmt"
"github.com/tsg/gopacket"
)
type PfringHandle struct {
}
func NewPfringHandle(device string, snaplen int, promisc bool) (*PfringHandle, error) {
return nil, fmt.Errorf("Pfring sniffing is not compiled in")
}
func (h *PfringHandle) ReadPacketData() (data []byte, ci gopacket.CaptureInfo, err error) {
return data, ci, fmt.Errorf("Pfring sniffing is not compiled in")
}
func (h *PfringHandle) SetBPFFilter(expr string) (_ error) {
return fmt.Errorf("Pfring sniffing is not compiled in")
}
func (h *PfringHandle) Enable() (_ error) {
return fmt.Errorf("Pfring sniffing is not compiled in")
}
func (h *PfringHandle) Close() {
}
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/zhangjungang/beats.git
git@gitee.com:zhangjungang/beats.git
zhangjungang
beats
beats
v1.2.2

搜索帮助