code: func OnInterrupt(handle *libmemif.MemifPacketHandle) {
  	source := gopacket.NewPacketSource(handle, layers.LayerTypeEthernet)
  	var responses []gopacket.Packet
  
  	// Process ICMP pings
  	for packet := range source.Packets() {
  		fmt.Println("Received new packet:")
  		fmt.Println(packet.Dump())
  
  		response, err := GeneratePacketResponse(packet)
  		if err != nil {
  			fmt.Printf("Failed to generate response: %v\n", err)
  			continue
  		}
  
  		fmt.Println("Sending response:")
  		fmt.Println(response.Dump())
  		responses = append(responses, response)
  	}
  
  	// Answer with ICMP pongs
  	for i, response := range responses {
  		err := handle.WritePacketData(response.Data())
  
  		switch err {
  		case io.EOF:
  			return
  		case nil:
  			fmt.Printf("Succesfully sent packet #%v %v\n", i, len(response.Data()))
  		default:
  			fmt.Printf("Got error while sending packet #%v %v\n", i, err)
  		}
  	}
  }
docs: // OnInterrupt is called when interrupted