code: func New(network []string, transport []string, opts Options) *Stack {
  	clock := opts.Clock
  	if clock == nil {
  		clock = &tcpip.StdClock{}
  	}
  
  	s := &Stack{
  		transportProtocols: make(map[tcpip.TransportProtocolNumber]*transportProtocolState),
  		networkProtocols:   make(map[tcpip.NetworkProtocolNumber]NetworkProtocol),
  		linkAddrResolvers:  make(map[tcpip.NetworkProtocolNumber]LinkAddressResolver),
  		nics:               make(map[tcpip.NICID]*NIC),
  		linkAddrCache:      newLinkAddrCache(ageLimit, resolutionTimeout, resolutionAttempts),
  		PortManager:        ports.NewPortManager(),
  		clock:              clock,
  		stats:              opts.Stats.FillIn(),
  		handleLocal:        opts.HandleLocal,
  		raw:                opts.Raw,
  	}
  
  	// Add specified network protocols.
  	for _, name := range network {
  		netProtoFactory, ok := networkProtocols[name]
  		if !ok {
  			continue
  		}
  		netProto := netProtoFactory()
  		s.networkProtocols[netProto.Number()] = netProto
  		if r, ok := netProto.(LinkAddressResolver); ok {
  			s.linkAddrResolvers[r.LinkAddressProtocol()] = r
  		}
  	}
  
  	// Add specified transport protocols.
  	for _, name := range transport {
  		transProtoFactory, ok := transportProtocols[name]
  		if !ok {
  			continue
  		}
  		transProto := transProtoFactory()
  		s.transportProtocols[transProto.Number()] = &transportProtocolState{
  			proto: transProto,
  		}
  	}
  
  	// Create the global transport demuxer.
  	s.demux = newTransportDemuxer(s)
  
  	return s
  }
docs: // New allocates a new networking stack with only the requested networking and
  // transport protocols configured with default options.
  //
  // Protocol options can be changed by calling the
  // SetNetworkProtocolOption/SetTransportProtocolOption methods provided by the
  // stack. Please refer to individual protocol implementations as to what options
  // are supported.