/tool/sniffer/quick
quick
Shows the matching packets live, until you stop it with Q or for the time given in duration. The filter arguments are the filter- settings of /tool/sniffer without the filter- prefix, and vlan-id for filter-vlan....
tool/sniffer/quick
Type: Command
实时显示匹配的数据包,直到您按 <kbd>Q</kbd> 停止或达到 duration 指定的时间。过滤器参数是 /tool/sniffer 的 filter-* 设置去掉 filter- 前缀,以及用于 filter-vlan 的 vlan-id。没有过滤器参数时,使用已保存的过滤器;有过滤器参数时,仅使用给定的过滤器,并且已保存的设置不会更改。嗅探器运行时无法运行 quick(already running)。proplist 选择列,例如 proplist=interface,time,dir,src-address,dst-address,protocol,size。参见 数据包嗅探器。
| 参数 | 类型 | 描述 |
|---|---|---|
rows | num | 输出中显示的最大数据包数。默认值:quick-rows 设置(20)。 |
show-frame | bool | 是否在输出中显示原始帧内容。默认值:quick-show-frame 设置(no)。 |
interface | object { interface: iface_enum } | 要捕获流量的接口或接口列表。当同时包含网桥和网桥端口时,经过网桥的数据包会在两者上各显示一次。 |
mac-address | object { mac-address-element: super { ! , mac-address-with-mask: composite { mac: macAddr , mask: [ macAddr] } } } | 过滤器:仅捕获具有匹配 MAC 地址或带掩码 MAC 地址的帧。 |
src-mac-address | object { mac-address-element: super { ! , mac-address-with-mask: composite { mac: macAddr , mask: [ macAddr] } } } | 过滤器:仅捕获具有匹配源 MAC 地址或带掩码 MAC 地址的帧。 |
dst-mac-address | object { mac-address-element: super { ! , mac-address-with-mask: composite { mac: macAddr , mask: [ macAddr] } } } | 过滤器:仅捕获具有匹配目标 MAC 地址或带掩码 MAC 地址的帧。 |
mac-protocol | object { mac-protocol-element: super { ! , protocol: alt { mac-protocol: enum () , protocol-number: num [ .. 65535] } } } | 过滤器:仅捕获具有匹配 MAC(二层)协议的帧。 |
ip-protocol | object { ip-protocol-element: super { ! , ip-protocol: enum () } } | 过滤器:仅捕获具有匹配 IP 协议的数据包。 |
ip-address | object { ip-address-element: super { ! , ip-address-with-mask: composite { ip: ipAddr , mask: [ num [ .. 32]] } } } | 过滤器:仅捕获具有匹配 IP 地址或子网的数据包。 |
src-ip-address | object { ip-address-element: super { ! , ip-address-with-mask: composite { ip: ipAddr , mask: [ num [ .. 32]] } } } | 过滤器:仅捕获具有匹配源 IP 地址或子网的数据包。 |
dst-ip-address | object { ip-address-element: super { ! , ip-address-with-mask: composite { ip: ipAddr , mask: [ num [ .. 32]] } } } | 过滤器:仅捕获具有匹配目标 IP 地址或子网的数据包。 |
ipv6-address | object { ipv6-address-element: super { ! , ipv6-prefix: ip6Prefix } } | 过滤器:仅捕获具有匹配 IPv6 地址或前缀的数据包。 |
src-ipv6-address | object { ipv6-address-element: super { ! , ipv6-prefix: ip6Prefix } } | 过滤器:仅捕获具有匹配源 IPv6 地址或前缀的数据包。 |
dst-ipv6-address | object { ipv6-address-element: super { ! , ipv6-prefix: ip6Prefix } } | 过滤器:仅捕获具有匹配目标 IPv6 地址或前缀的数据包。 |
port | object { port-element: super { ! , port: enum () } } | 过滤器:仅捕获具有匹配源或目标端口的数据包。 |
src-port | object { port-element: super { ! , port: enum () } } | 过滤器:仅捕获具有匹配源端口的数据包。 |
dst-port | object { port-element: super { ! , port: enum () } } | 过滤器:仅捕获具有匹配目标端口的数据包。 |
vlan-id | object { vlan-element: super { ! , vlan: num [ .. 4095] } } | 过滤器:仅捕获具有匹配 VLAN ID 的帧。 |
direction | enum (any | tx | rx) { any:0, tx:1, rx:2 } | 过滤器:要捕获的方向。 - any(默认)- 接收和发送的数据包。 - rx - 接收的数据包。它们在防火墙之前被捕获,因此被防火墙规则丢弃的数据包仍会被捕获。 - tx - 发送的数据包,在防火墙之后捕获。 |
operator-between-entries | enum (or | and) { or:0, and:1 } | 一个过滤器的各条目如何组合。 - or(默认)- 当数据包匹配过滤器中的任一条目时,即匹配该过滤器。 - and - 仅当数据包匹配过滤器中的所有条目时才匹配该过滤器。 |
cpu | object { cpu-element: super { ! , cpu: num } } | 过滤器:仅捕获由给定 CPU 核心处理的数据包。 |
size | object { size-element: super { ! , size-range: range [0 .. 65535] } } | 过滤器:仅捕获具有匹配大小或大小范围(字节)的数据包。 |
| 只读参数 | 类型 | 描述 |
|---|---|---|
interface | iface_enum | 捕获数据包的接口。 |
time | num | 数据包相对于捕获开始的时间偏移,以秒为单位,精确到微秒。 |
num | num | 数据包序号,从第一个捕获的数据包开始为 0。 |
dir | enum (<- | ->) { <-:0, ->:1 } | Direction of the packet, <- received, -> sent. |
src-mac | macAddr | 帧的源 MAC 地址,仅对具有 MAC 地址的接口显示,例如 Ethernet、WiFi、EoIP、VXLAN 或 VLAN。 |
dst-mac | macAddr | 帧的目标 MAC 地址,仅对具有 MAC 地址的接口显示,例如 Ethernet、WiFi、EoIP、VXLAN 或 VLAN。 |
vlan | composite { id: num [ .. 4095] , priority: num [ .. 7] } | 帧的 VLAN 标记,显示为 id:priority。 |
src-address | composite { address: alt { ip: ipAddr , ipv6: ip6Addr , descr: string } , port: enum () } | 数据包的源 IP 地址和源端口,显示为 address:port。 |
dst-address | composite { address: alt { ip: ipAddr , ipv6: ip6Addr } , port: enum () } | 数据包的目标 IP 地址和目标端口,显示为 address:port。 |
protocol | composite { mac-protocol: enum () , ip-protocol: enum (ip) { ip:0 } } | 帧的 MAC(二层)协议及其 IP 协议,例如 ip:icmp。 |
size | num | 帧总大小(字节),包括二层头。 |
cpu | num | 处理数据包的 CPU 核心。 |
fp | bool | 数据包是否在 fast path 中处理。 |
raw | string | 原始帧内容,十六进制格式,在启用 show-frame 参数时显示。 |
dscp | num | IP 头的 DSCP(区分服务代码点)字段。 |
ecn | num | IP 头的 ECN(显式拥塞通知)字段。 |
fragment-offset | num | IP 头的分片偏移字段。 |
identification | num | IP 头的标识字段。 |
ip-header-size | num | IP 头大小(字节)。 |
ip-packet-size | num | IP 数据包大小(字节)。 |
tcp-flags | super { tcp-flags: multi { array-id, flag: enum (fin | syn | rst | psh | ack | urg | ece | cwr) { fin:0, syn:1, rst:2, psh:3, ack:4, urg:5, ece:6, cwr:7 } } } | 数据包的 TCP 标志:fin、syn、rst、psh、ack、urg、ece 或 cwr。 |
ttl | num | IP 头的生存时间字段。 |