any policy role, type and/or range transition rules applied,
and is therefore a useful reference.
.TP
+.B \-N NSNAME, \-\-net=NSNAME
+Switch to the specified network namespace name.
+.TP
.B \-b, \-\-bpf
Show socket BPF filters (only administrators are allowed to get these information).
.TP
#include "rt_names.h"
#include "ll_map.h"
#include "libnetlink.h"
+#include "namespace.h"
#include "SNAPSHOT.h"
#include <linux/tcp.h>
" -b, --bpf show bpf filter socket information\n"
" -Z, --context display process SELinux security contexts\n"
" -z, --contexts display process and socket SELinux security contexts\n"
+" -N, --net switch to the specified network namespace name\n"
"\n"
" -4, --ipv4 display only IP version 4 sockets\n"
" -6, --ipv6 display only IP version 6 sockets\n"
{ "help", 0, 0, 'h' },
{ "context", 0, 0, 'Z' },
{ "contexts", 0, 0, 'z' },
+ { "net", 1, 0, 'N' },
{ 0 }
};
struct filter dbs_filter = {};
int state_filter = 0;
- while ((ch = getopt_long(argc, argv, "dhaletuwxnro460spbf:miA:D:F:vVzZ",
+ while ((ch = getopt_long(argc, argv, "dhaletuwxnro460spbf:miA:D:F:vVzZN:",
long_opts, NULL)) != EOF) {
switch(ch) {
case 'n':
show_proc_ctx++;
user_ent_hash_build();
break;
+ case 'N':
+ if (netns_switch(optarg))
+ exit(1);
+ break;
case 'h':
case '?':
help();