func SetupInterface(ifaceName, tempName string, conn *connection.Connection, isDst bool) (string, error) {
	var err error
	link := &LinkData{name: ifaceName, tempName: tempName}
	netNsInode := conn.GetMechanism().GetParameters()[common.NetNsInodeKey]
	link.neighbors = conn.GetContext().GetIpContext().GetIpNeighbors()
	if isDst {
		link.ip = conn.GetContext().GetIpContext().GetDstIpAddr()
		link.routes = conn.GetContext().GetIpContext().GetSrcRoutes()
	} else {
		link.ip = conn.GetContext().GetIpContext().GetSrcIpAddr()
		link.routes = conn.GetContext().GetIpContext().GetDstRoutes()
	}
	link.nsHandle, err = fs.GetNsHandleFromInode(netNsInode)
	if err != nil {
		logrus.Errorf("local: failed to get source namespace handle - %v", err)
		return netNsInode, err
	}
	defer func() {
		if err = link.nsHandle.Close(); err != nil {
			logrus.Error("local: error when closing source handle: ", err)
		}
		logrus.Debug("local: closed source handle: ", link.nsHandle, netNsInode)
	}()
	logrus.Debug("local: opened source handle: ", link.nsHandle, netNsInode)
	if err = setupLinkInNs(link, true); err != nil {
		logrus.Errorf("local: failed to setup interface - source - %q: %v", link.name, err)
		return netNsInode, err
	}
	return netNsInode, nil
}
SetupInterface - setup interface to namespace
package kernelforwarder
import (
	"net"
	"github.com/pkg/errors"
	"github.com/sirupsen/logrus"
	"github.com/vishvananda/netlink"
	"github.com/vishvananda/netns"
	"github.com/networkservicemesh/networkservicemesh/controlplane/api/connection"
	"github.com/networkservicemesh/networkservicemesh/controlplane/api/connection/mechanisms/common"
	"github.com/networkservicemesh/networkservicemesh/controlplane/api/connectioncontext"
	"github.com/networkservicemesh/networkservicemesh/utils/fs"
)
type LinkData struct {
	nsHandle  netns.NsHandle  
	name      string
	tempName  string  
	ip        string
	routes    []*connectioncontext.Route
	neighbors []*connectioncontext.IpNeighbor
}