code: func NewEndpoint(stack *stack.Stack, netProto tcpip.NetworkProtocolNumber, transProto tcpip.TransportProtocolNumber, waiterQueue *waiter.Queue) (tcpip.Endpoint, *tcpip.Error) {
  	if netProto != header.IPv4ProtocolNumber {
  		return nil, tcpip.ErrUnknownProtocol
  	}
  
  	ep := &endpoint{
  		stack:         stack,
  		netProto:      netProto,
  		transProto:    transProto,
  		waiterQueue:   waiterQueue,
  		rcvBufSizeMax: 32 * 1024,
  		sndBufSize:    32 * 1024,
  	}
  
  	if err := ep.stack.RegisterRawTransportEndpoint(ep.registeredNIC, ep.netProto, ep.transProto, ep); err != nil {
  		return nil, err
  	}
  
  	return ep, nil
  }
docs: // NewEndpoint returns a raw  endpoint for the given protocols.
  // TODO(b/129292371): IP_HDRINCL, IPPROTO_RAW, and AF_PACKET.