Scroll to navigation

DEV_CHANGE_NET_NAMES(9) Network device support DEV_CHANGE_NET_NAMES(9)

NAME

dev_change_net_namespace - move device to different nethost namespace

SYNOPSIS

int dev_change_net_namespace(struct net_device * dev, struct net * net, const char * pat);

ARGUMENTS

struct net_device * dev
device

struct net * net

network namespace

const char * pat

If not NULL name pattern to try if the current device name is already taken in the destination network namespace.

DESCRIPTION

This function shuts down a device interface and moves it to a new network namespace. On success 0 is returned, on a failure a netagive errno code is returned.

Callers must hold the rtnl semaphore.

COPYRIGHT

July 2017 Kernel Hackers Manual 4.11