Lines Matching refs:netns
145 static int recurse_dir(char *base_path, char *name, const char *netns) in recurse_dir() argument
167 if (*netns == '\0' || in recurse_dir()
168 (pdir && !strcmp(pdir+1, netns))) in recurse_dir()
183 rc = recurse_dir(path, name, netns); in recurse_dir()
196 static int ipvrf_get_netns(char *netns, int len) in ipvrf_get_netns() argument
198 if (netns_identify_pid("self", netns, len-3)) { in ipvrf_get_netns()
204 if (*netns != '\0') in ipvrf_get_netns()
205 strcat(netns, "-ns"); in ipvrf_get_netns()
213 char netns[256]; in ipvrf_pids() local
231 if (ipvrf_get_netns(netns, sizeof(netns)) < 0) in ipvrf_pids()
234 ret = recurse_dir(mnt, vrf, netns); in ipvrf_pids()
356 char vpath[PATH_MAX], netns[256]; in vrf_switch() local
373 if (ipvrf_get_netns(netns, sizeof(netns) - 1) < 0) in vrf_switch()
383 if (*netns != '\0') { in vrf_switch()
391 if (strcmp(pdir, netns) == 0) in vrf_switch()
394 strcat(netns, "/"); in vrf_switch()
402 mnt, vpath, netns, ifindex ? name : ""); in vrf_switch()