@@ -17,6 +17,7 @@ static const char * const link_type_name[] = {
17
17
[BPF_LINK_TYPE_TRACING ] = "tracing" ,
18
18
[BPF_LINK_TYPE_CGROUP ] = "cgroup" ,
19
19
[BPF_LINK_TYPE_ITER ] = "iter" ,
20
+ [BPF_LINK_TYPE_NETNS ] = "netns" ,
20
21
};
21
22
22
23
static int link_parse_fd (int * argc , char * * * argv )
@@ -122,6 +123,11 @@ static int show_link_close_json(int fd, struct bpf_link_info *info)
122
123
info -> cgroup .cgroup_id );
123
124
show_link_attach_type_json (info -> cgroup .attach_type , json_wtr );
124
125
break ;
126
+ case BPF_LINK_TYPE_NETNS :
127
+ jsonw_uint_field (json_wtr , "netns_ino" ,
128
+ info -> netns .netns_ino );
129
+ show_link_attach_type_json (info -> netns .attach_type , json_wtr );
130
+ break ;
125
131
default :
126
132
break ;
127
133
}
@@ -190,6 +196,10 @@ static int show_link_close_plain(int fd, struct bpf_link_info *info)
190
196
printf ("\n\tcgroup_id %zu " , (size_t )info -> cgroup .cgroup_id );
191
197
show_link_attach_type_plain (info -> cgroup .attach_type );
192
198
break ;
199
+ case BPF_LINK_TYPE_NETNS :
200
+ printf ("\n\tnetns_ino %u " , info -> netns .netns_ino );
201
+ show_link_attach_type_plain (info -> netns .attach_type );
202
+ break ;
193
203
default :
194
204
break ;
195
205
}
0 commit comments