Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/share/man/man4 bpf(4): spaces around + in instruction tables
details: https://anonhg.NetBSD.org/src/rev/f271c3908c39
branches: trunk
changeset: 373457:f271c3908c39
user: uwe <uwe%NetBSD.org@localhost>
date: Sat Feb 11 12:39:44 2023 +0000
description:
bpf(4): spaces around + in instruction tables
Makes them easier on the eyes.
diffstat:
share/man/man4/bpf.4 | 94 ++++++++++++++++++++++++++--------------------------
1 files changed, 47 insertions(+), 47 deletions(-)
diffs (153 lines):
diff -r 358283fcf19f -r f271c3908c39 share/man/man4/bpf.4
--- a/share/man/man4/bpf.4 Sat Feb 11 11:49:02 2023 +0000
+++ b/share/man/man4/bpf.4 Sat Feb 11 12:39:44 2023 +0000
@@ -1,6 +1,6 @@
.\" -*- nroff -*-
.\"
-.\" $NetBSD: bpf.4,v 1.70 2023/02/11 11:49:02 uwe Exp $
+.\" $NetBSD: bpf.4,v 1.71 2023/02/11 12:39:44 uwe Exp $
.\"
.\" Copyright (c) 1990, 1991, 1992, 1993, 1994
.\" The Regents of the University of California. All rights reserved.
@@ -602,18 +602,18 @@
the filter program and the packet is ignored.
The semantics of all the recognized BPF_LD instructions follow.
.\" to make all instruction tables align nicely, use common max width
-.ds max-insn .Sy BPF_LDX+BPF_W+BPF_WWW
+.ds max-insn .Sy BPF_LDX + BPF_W + BPF_WWW
.\"
.Bl -column "\*[max-insn]" -offset indent
-.It Sy BPF_LD+BPF_W+BPF_ABS Ta A \[<-] P[k:4]
-.It Sy BPF_LD+BPF_H+BPF_ABS Ta A \[<-] P[k:2]
-.It Sy BPF_LD+BPF_B+BPF_ABS Ta A \[<-] P[k:1]
-.It Sy BPF_LD+BPF_W+BPF_IND Ta A \[<-] P[X+k:4]
-.It Sy BPF_LD+BPF_H+BPF_IND Ta A \[<-] P[X+k:2]
-.It Sy BPF_LD+BPF_B+BPF_IND Ta A \[<-] P[X+k:1]
-.It Sy BPF_LD+BPF_W+BPF_LEN Ta A \[<-] len
-.It Sy BPF_LD+BPF_IMM Ta A \[<-] k
-.It Sy BPF_LD+BPF_MEM Ta A \[<-] M[k]
+.It Sy BPF_LD + BPF_W + BPF_ABS Ta A \[<-] P[k:4]
+.It Sy BPF_LD + BPF_H + BPF_ABS Ta A \[<-] P[k:2]
+.It Sy BPF_LD + BPF_B + BPF_ABS Ta A \[<-] P[k:1]
+.It Sy BPF_LD + BPF_W + BPF_IND Ta A \[<-] P[X+k:4]
+.It Sy BPF_LD + BPF_H + BPF_IND Ta A \[<-] P[X+k:2]
+.It Sy BPF_LD + BPF_B + BPF_IND Ta A \[<-] P[X+k:1]
+.It Sy BPF_LD + BPF_W + BPF_LEN Ta A \[<-] len
+.It Sy BPF_LD + BPF_IMM Ta A \[<-] k
+.It Sy BPF_LD + BPF_MEM Ta A \[<-] M[k]
.El
.It Sy BPF_LDX
These instructions load a value into the index register.
@@ -622,10 +622,10 @@
.Sy BPF_MSH ,
a hack for efficiently loading the IP header length.
.Bl -column "\*[max-insn]" -offset indent
-.It Sy BPF_LDX+BPF_W+BPF_IMM Ta X \[<-] k
-.It Sy BPF_LDX+BPF_W+BPF_MEM Ta X \[<-] M[k]
-.It Sy BPF_LDX+BPF_W+BPF_LEN Ta X \[<-] len
-.It Sy BPF_LDX+BPF_B+BPF_MSH Ta X \[<-] 4*(P[k:1]&0xf)
+.It Sy BPF_LDX + BPF_W + BPF_IMM Ta X \[<-] k
+.It Sy BPF_LDX + BPF_W + BPF_MEM Ta X \[<-] M[k]
+.It Sy BPF_LDX + BPF_W + BPF_LEN Ta X \[<-] len
+.It Sy BPF_LDX + BPF_B + BPF_MSH Ta X \[<-] 4*(P[k:1]&0xf)
.El
.It Sy BPF_ST
This instruction stores the accumulator into the scratch memory.
@@ -647,23 +647,23 @@
or
.Sy BPF_X ) .
.Bl -column "\*[max-insn]" -offset indent
-.It Sy BPF_ALU+BPF_ADD+BPF_K Ta A \[<-] A + k
-.It Sy BPF_ALU+BPF_SUB+BPF_K Ta A \[<-] A \- k
-.It Sy BPF_ALU+BPF_MUL+BPF_K Ta A \[<-] A * k
-.It Sy BPF_ALU+BPF_DIV+BPF_K Ta A \[<-] A / k
-.It Sy BPF_ALU+BPF_AND+BPF_K Ta A \[<-] A & k
-.It Sy BPF_ALU+BPF_OR+BPF_K Ta A \[<-] A | k
-.It Sy BPF_ALU+BPF_LSH+BPF_K Ta A \[<-] A \[<<] k
-.It Sy BPF_ALU+BPF_RSH+BPF_K Ta A \[<-] A \[>>] k
-.It Sy BPF_ALU+BPF_ADD+BPF_X Ta A \[<-] A + X
-.It Sy BPF_ALU+BPF_SUB+BPF_X Ta A \[<-] A \- X
-.It Sy BPF_ALU+BPF_MUL+BPF_X Ta A \[<-] A * X
-.It Sy BPF_ALU+BPF_DIV+BPF_X Ta A \[<-] A / X
-.It Sy BPF_ALU+BPF_AND+BPF_X Ta A \[<-] A & X
-.It Sy BPF_ALU+BPF_OR+BPF_X Ta A \[<-] A | X
-.It Sy BPF_ALU+BPF_LSH+BPF_X Ta A \[<-] A \[<<] X
-.It Sy BPF_ALU+BPF_RSH+BPF_X Ta A \[<-] A \[>>] X
-.It Sy BPF_ALU+BPF_NEG Ta A \[<-] \-A
+.It Sy BPF_ALU + BPF_ADD + BPF_K Ta A \[<-] A + k
+.It Sy BPF_ALU + BPF_SUB + BPF_K Ta A \[<-] A \- k
+.It Sy BPF_ALU + BPF_MUL + BPF_K Ta A \[<-] A * k
+.It Sy BPF_ALU + BPF_DIV + BPF_K Ta A \[<-] A / k
+.It Sy BPF_ALU + BPF_AND + BPF_K Ta A \[<-] A & k
+.It Sy BPF_ALU + BPF_OR + BPF_K Ta A \[<-] A | k
+.It Sy BPF_ALU + BPF_LSH + BPF_K Ta A \[<-] A \[<<] k
+.It Sy BPF_ALU + BPF_RSH + BPF_K Ta A \[<-] A \[>>] k
+.It Sy BPF_ALU + BPF_ADD + BPF_X Ta A \[<-] A + X
+.It Sy BPF_ALU + BPF_SUB + BPF_X Ta A \[<-] A \- X
+.It Sy BPF_ALU + BPF_MUL + BPF_X Ta A \[<-] A * X
+.It Sy BPF_ALU + BPF_DIV + BPF_X Ta A \[<-] A / X
+.It Sy BPF_ALU + BPF_AND + BPF_X Ta A \[<-] A & X
+.It Sy BPF_ALU + BPF_OR + BPF_X Ta A \[<-] A | X
+.It Sy BPF_ALU + BPF_LSH + BPF_X Ta A \[<-] A \[<<] X
+.It Sy BPF_ALU + BPF_RSH + BPF_X Ta A \[<-] A \[>>] X
+.It Sy BPF_ALU + BPF_NEG Ta A \[<-] \-A
.El
.It Sy BPF_JMP
The jump instructions alter flow of control.
@@ -681,15 +681,15 @@
field as the offset, allowing arbitrarily distant destinations.
All conditionals use unsigned comparison conventions.
.Bl -column "\*[max-insn]" -offset indent
-.It Sy BPF_JMP+BPF_JA Ta pc += k
-.It Sy BPF_JMP+BPF_JGT+BPF_K Ta "pc += (A > k) ? jt : jf"
-.It Sy BPF_JMP+BPF_JGE+BPF_K Ta "pc += (A \*[Ge] k) ? jt : jf"
-.It Sy BPF_JMP+BPF_JEQ+BPF_K Ta "pc += (A == k) ? jt : jf"
-.It Sy BPF_JMP+BPF_JSET+BPF_K Ta "pc += (A & k) ? jt : jf"
-.It Sy BPF_JMP+BPF_JGT+BPF_X Ta "pc += (A > X) ? jt : jf"
-.It Sy BPF_JMP+BPF_JGE+BPF_X Ta "pc += (A \*[Ge] X) ? jt : jf"
-.It Sy BPF_JMP+BPF_JEQ+BPF_X Ta "pc += (A == X) ? jt : jf"
-.It Sy BPF_JMP+BPF_JSET+BPF_X Ta "pc += (A & X) ? jt : jf"
+.It Sy BPF_JMP + BPF_JA Ta pc += k
+.It Sy BPF_JMP + BPF_JGT + BPF_K Ta "pc += (A > k) ? jt : jf"
+.It Sy BPF_JMP + BPF_JGE + BPF_K Ta "pc += (A \*[Ge] k) ? jt : jf"
+.It Sy BPF_JMP + BPF_JEQ + BPF_K Ta "pc += (A == k) ? jt : jf"
+.It Sy BPF_JMP + BPF_JSET + BPF_K Ta "pc += (A & k) ? jt : jf"
+.It Sy BPF_JMP + BPF_JGT + BPF_X Ta "pc += (A > X) ? jt : jf"
+.It Sy BPF_JMP + BPF_JGE + BPF_X Ta "pc += (A \*[Ge] X) ? jt : jf"
+.It Sy BPF_JMP + BPF_JEQ + BPF_X Ta "pc += (A == X) ? jt : jf"
+.It Sy BPF_JMP + BPF_JSET + BPF_X Ta "pc += (A & X) ? jt : jf"
.El
.It Sy BPF_RET
The return instructions terminate the filter program and specify the amount
@@ -701,8 +701,8 @@
or the accumulator
.Sy ( BPF_A ) .
.Bl -column "\*[max-insn]" -offset indent
-.It Sy BPF_RET+BPF_A Ta accept A bytes
-.It Sy BPF_RET+BPF_K Ta accept k bytes
+.It Sy BPF_RET + BPF_A Ta accept A bytes
+.It Sy BPF_RET + BPF_K Ta accept k bytes
.El
.It Sy BPF_MISC
The miscellaneous category was created for anything that doesn't
@@ -711,16 +711,16 @@
Currently, these are the register transfer instructions
that copy the index register to the accumulator or vice versa.
.Bl -column "\*[max-insn]" -offset indent
-.It Sy BPF_MISC+BPF_TAX Ta X \[<-] A
-.It Sy BPF_MISC+BPF_TXA Ta A \[<-] X
+.It Sy BPF_MISC + BPF_TAX Ta X \[<-] A
+.It Sy BPF_MISC + BPF_TXA Ta A \[<-] X
.El
.Pp
Also, two instructions to call a "coprocessor" if initialized by the kernel
component.
There is no coprocessor by default.
.Bl -column "\*[max-insn]" -offset indent
-.It Sy BPF_MISC+BPF_COP Ta A \[<-] funcs[k](..)
-.It Sy BPF_MISC+BPF_COPX Ta A \[<-] funcs[X](..)
+.It Sy BPF_MISC + BPF_COP Ta A \[<-] funcs[k](..)
+.It Sy BPF_MISC + BPF_COPX Ta A \[<-] funcs[X](..)
.El
.Pp
If the coprocessor is not set or the function index is out of range, these
Home |
Main Index |
Thread Index |
Old Index