code: func (e *endpoint) packetMMapDispatch() (bool, *tcpip.Error) {
  	pkt, err := e.readMMappedPacket()
  	if err != nil {
  		return false, err
  	}
  	var (
  		p             tcpip.NetworkProtocolNumber
  		remote, local tcpip.LinkAddress
  	)
  	if e.hdrSize > 0 {
  		eth := header.Ethernet(pkt)
  		p = eth.Type()
  		remote = eth.SourceAddress()
  		local = eth.DestinationAddress()
  	} else {
  		// We don't get any indication of what the packet is, so try to guess
  		// if it's an IPv4 or IPv6 packet.
  		switch header.IPVersion(pkt) {
  		case header.IPv4Version:
  			p = header.IPv4ProtocolNumber
  		case header.IPv6Version:
  			p = header.IPv6ProtocolNumber
  		default:
  			return true, nil
  		}
  	}
  
  	pkt = pkt[e.hdrSize:]
  	e.dispatcher.DeliverNetworkPacket(e, remote, local, p, buffer.NewVectorisedView(len(pkt), []buffer.View{buffer.View(pkt)}))
  	return true, nil
  }
docs: // packetMMapDispatch reads packets from an mmaped ring buffer and dispatches
  // them to the network stack.