code: func (e *endpoint) HandlePacket(r *stack.Route, id stack.TransportEndpointID, vv buffer.VectorisedView) {
  	// Get the header then trim it from the view.
  	hdr := header.UDP(vv.First())
  	if int(hdr.Length()) > vv.Size() {
  		// Malformed packet.
  		e.stack.Stats().UDP.MalformedPacketsReceived.Increment()
  		return
  	}
  
  	vv.TrimFront(header.UDPMinimumSize)
  
  	e.rcvMu.Lock()
  	e.stack.Stats().UDP.PacketsReceived.Increment()
  
  	// Drop the packet if our buffer is currently full.
  	if !e.rcvReady || e.rcvClosed || e.rcvBufSize >= e.rcvBufSizeMax {
  		e.stack.Stats().UDP.ReceiveBufferErrors.Increment()
  		e.rcvMu.Unlock()
  		return
  	}
  
  	wasEmpty := e.rcvBufSize == 0
  
  	// Push new packet into receive list and increment the buffer size.
  	pkt := &udpPacket{
  		senderAddress: tcpip.FullAddress{
  			NIC:  r.NICID(),
  			Addr: id.RemoteAddress,
  			Port: hdr.SourcePort(),
  		},
  	}
  	pkt.data = vv.Clone(pkt.views[:])
  	e.rcvList.PushBack(pkt)
  	e.rcvBufSize += vv.Size()
  
  	pkt.timestamp = e.stack.NowNanoseconds()
  
  	e.rcvMu.Unlock()
  
  	// Notify any waiters that there's data to be read now.
  	if wasEmpty {
  		e.waiterQueue.Notify(waiter.EventIn)
  	}
  }
docs: // HandlePacket is called by the stack when new packets arrive to this transport
  // endpoint.