
Berkeley Packet Filter - Wikipedia
The Berkeley Packet Filter (BPF; also BSD Packet Filter, classic BPF or cBPF) is a network tap and packet filter which permits computer network packets to be captured and filtered at the operating system level.
BPF 进阶笔记(二):BPF Map 类型详解:使用场景、程序示例
内核目前支持 30 来种 BPF map 类型。 对于主要的类型,本文将介绍其: 使用场景:适合用来做什么? 程序示例:一些实际例子。 本文参考: 平时学习和使用 BPF 时所整理。 由于是笔记而非教程,因此内容不会追求连贯,有基础的 同学可作查漏补缺之用。 文中涉及的代码,如无特殊说明,均基于内核 5.8/5.10。 使用场景 场景一:将内核态得到的数据,传递给用户态程序 场景二:存放全局配置信息,供 BPF 程序使用 程序示例 1. 将内核态数据传递到用户 …
BPF 进阶笔记(一):BPF 程序(BPF Prog)类型详解:使用场景 …
2021年7月4日 · 内核目前支持 30 来种 BPF 程序类型。 对于主要的程序类型,本文将介绍其: 使用场景:适合用来做什么? Hook 位置:在 何处(where)、何时(when) 会触发执行? 例如在内核协议栈的哪个位置,或是什么事件触发执行。 传入参数:调用到 BPF 程序时,传给它的上下文(context,也就是函数参数)是什么? 返回值:返回值类型、含义、合法列表等。 传入参数:调用到 BPF 程序时,传给它的上下文(context,也就是函数参数)是什么? 返回值:返回 …
Berkeley packet filters - IBM
Berkeley Packet Filters (BPF) provide a powerful tool for intrusion detection analysis. Use BPF filtering to quickly reduce large packet captures to a reduced set of results by filtering based on a specific type of traffic. Both admin and non-admin users can create BPF filters.
BPF In Depth: BPF Helper Functions - Oracle Blogs
2019年1月10日 · Oracle Linux kernel developer Alan Maguire presents this six-part series on BPF, wherein he presents an in depth look at the kernel's "Berkeley Packet Filter" -- a useful and extensible kernel function for much more than packet filtering. Now that we have a list of program types, what can we do within programs we attach?
bpf2go原理和使用介绍 - Spoock
2023年9月2日 · go generate 是Go语言的一个命令,用于自动生成Go代码或执行自定义的代码生成操作。 它允许开发人员在Go源代码中添加特殊的注释指令(称为”generate directive”),以告诉Go编译器在构建过程中执行额外的代码生成任务。 通过使用 命令,您可以在构建过程中自动化执行一些常见的代码生成任务,例如根据模板生成代码、从其他源生成代码等。 这样可以减少手动重复的工作,提高开发效率。
Berkeley Packet Filters with Scapy (and Friends) - ACM Digital Library
Berkeley Packet Filter (BPF) is what comes to the rescue in the second case. Originally, BPF referred to both the capturing technology and its high-performance filtering capabilities. For some Unices (for instance, FreeBSD), this still holds true, and there is a /dev/bpf device from which you can read captured packets.
BPF In Depth: Communicating with Userspace - Oracle Blogs
2019年1月15日 · Oracle Linux kernel developer Alan Maguire presents this six-part series on BPF, wherein he presents an in depth look at the kernel's "Berkeley Packet Filter" -- a useful and extensible kernel function for much more than packet filtering.
BPF Packet Filtering Expressions — nProbe 10.1 documentation
There are three different kinds of qualifier: type. Qualifiers say what kind of thing the id name or number refers to. Possible types are host, net and port. E.g., host foo, net 128.3, port 20. If there is no type qualifier, host is assumed. dir. Qualifiers …
man bpf (4): Berkeley Packet Filter - Man Pages
The Berkeley Packet Filter provides a raw interface to data link layers in a protocol independent fashion. All packets on the network, even those destined for other hosts, are accessible through this mechanism.