summaryrefslogtreecommitdiffstats
path: root/man2/bpf.2
diff options
context:
space:
mode:
Diffstat (limited to 'man2/bpf.2')
-rw-r--r--man2/bpf.228
1 files changed, 14 insertions, 14 deletions
diff --git a/man2/bpf.2 b/man2/bpf.2
index d05b73ec2..84d1b62e5 100644
--- a/man2/bpf.2
+++ b/man2/bpf.2
@@ -169,34 +169,34 @@ commands:
.EX
union bpf_attr {
struct { /* Used by BPF_MAP_CREATE */
- __u32 map_type;
- __u32 key_size; /* size of key in bytes */
- __u32 value_size; /* size of value in bytes */
- __u32 max_entries; /* maximum number of entries
+ uint32_t map_type;
+ uint32_t key_size; /* size of key in bytes */
+ uint32_t value_size; /* size of value in bytes */
+ uint32_t max_entries; /* maximum number of entries
in a map */
};
struct { /* Used by BPF_MAP_*_ELEM and BPF_MAP_GET_NEXT_KEY
commands */
- __u32 map_fd;
+ uint32_t map_fd;
__aligned_u64 key;
union {
__aligned_u64 value;
__aligned_u64 next_key;
};
- __u64 flags;
+ uint64_t flags;
};
struct { /* Used by BPF_PROG_LOAD */
- __u32 prog_type;
- __u32 insn_cnt;
+ uint32_t prog_type;
+ uint32_t insn_cnt;
__aligned_u64 insns; /* \(aqconst struct bpf_insn *\(aq */
__aligned_u64 license; /* \(aqconst char *\(aq */
- __u32 log_level; /* verbosity level of verifier */
- __u32 log_size; /* size of user buffer */
+ uint32_t log_level; /* verbosity level of verifier */
+ uint32_t log_size; /* size of user buffer */
__aligned_u64 log_buf; /* user supplied \(aqchar *\(aq
buffer */
- __u32 kern_version;
+ uint32_t kern_version;
/* checked when prog_type=kprobe
(since Linux 4.1) */
.\" commit 2541517c32be2531e0da59dfd7efc1ce844644f5
@@ -317,7 +317,7 @@ of 1 and the eBPF program contains
.in +4n
.EX
value = bpf_map_lookup_elem(...);
-*(u32 *) value = 1;
+*(uint32_t *) value = 1;
.EE
.in
.IP
@@ -1212,7 +1212,7 @@ main(int argc, char *argv[])
BPF_LD_ABS(BPF_B, ETH_HLEN + offsetof(struct iphdr, protocol)),
/* r0 = ip\->proto */
BPF_STX_MEM(BPF_W, BPF_REG_10, BPF_REG_0, \-4),
- /* *(u32 *)(fp \- 4) = r0 */
+ /* *(uint32_t *)(fp \- 4) = r0 */
BPF_MOV64_REG(BPF_REG_2, BPF_REG_10), /* r2 = fp */
BPF_ALU64_IMM(BPF_ADD, BPF_REG_2, \-4), /* r2 = r2 \- 4 */
BPF_LD_MAP_FD(BPF_REG_1, map_fd), /* r1 = map_fd */
@@ -1222,7 +1222,7 @@ main(int argc, char *argv[])
/* if (r0 == 0) goto pc+2 */
BPF_MOV64_IMM(BPF_REG_1, 1), /* r1 = 1 */
BPF_XADD(BPF_DW, BPF_REG_0, BPF_REG_1, 0, 0),
- /* lock *(u64 *) r0 += r1 */
+ /* lock *(uint64_t *) r0 += r1 */
.\" == atomic64_add
BPF_MOV64_IMM(BPF_REG_0, 0), /* r0 = 0 */
BPF_EXIT_INSN(), /* return r0 */