aboutsummaryrefslogtreecommitdiffstats
path: root/net/unix/unix_bpf.c
diff options
context:
space:
mode:
authorKuniyuki Iwashima <[email protected]>2021-08-14 01:57:17 +0000
committerAndrii Nakryiko <[email protected]>2021-08-15 07:19:06 +0000
commit04e928180c14332fb15a1b8c64418b602978a51e (patch)
treec96b6d5b4e844e7d9280eb5fa3ad1d42ac4019c0 /net/unix/unix_bpf.c
parentbpf: Support "%c" in bpf_bprintf_prepare(). (diff)
downloadkernel-04e928180c14332fb15a1b8c64418b602978a51e.tar.gz
kernel-04e928180c14332fb15a1b8c64418b602978a51e.zip
selftest/bpf: Implement sample UNIX domain socket iterator program.
The iterator can output almost the same result compared to /proc/net/unix. The header line is aligned, and the Inode column uses "%8lu" because "%5lu" can be easily overflown. # cat /sys/fs/bpf/unix Num RefCount Protocol Flags Type St Inode Path ffff963c06689800: 00000002 00000000 00010000 0001 01 18697 private/defer ffff963c7c979c00: 00000002 00000000 00000000 0001 01 598245 @Hello@World@ # cat /proc/net/unix Num RefCount Protocol Flags Type St Inode Path ffff963c06689800: 00000002 00000000 00010000 0001 01 18697 private/defer ffff963c7c979c00: 00000002 00000000 00000000 0001 01 598245 @Hello@World@ Signed-off-by: Kuniyuki Iwashima <[email protected]> Signed-off-by: Andrii Nakryiko <[email protected]> Acked-by: Yonghong Song <[email protected]> Link: https://lore.kernel.org/bpf/[email protected]
Diffstat (limited to 'net/unix/unix_bpf.c')
0 files changed, 0 insertions, 0 deletions