MCPcopy
hub / github.com/opencontainers/runc / createNetworkInterfaces

Method createNetworkInterfaces

libcontainer/process_linux.go:1064–1079  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1062}
1063
1064func (p *initProcess) createNetworkInterfaces() error {
1065 for _, config := range p.config.Config.Networks {
1066 strategy, err := getStrategy(config.Type)
1067 if err != nil {
1068 return err
1069 }
1070 n := &network{
1071 Network: *config,
1072 }
1073 if err := strategy.create(n, p.pid()); err != nil {
1074 return err
1075 }
1076 p.config.Networks = append(p.config.Networks, n)
1077 }
1078 return nil
1079}
1080
1081// setupNetworkDevices sets up and initializes any defined network interface inside the container.
1082func (p *initProcess) setupNetworkDevices() error {

Callers 1

startMethod · 0.95

Calls 3

getStrategyFunction · 0.85
createMethod · 0.65
pidMethod · 0.65

Tested by

no test coverage detected