Fixed EVENT_USB_CDC_ControLineStateChanged() event not taking the CDC interface struc...
[pub/USBasp.git] / Demos / Device / RNDISEthernet / Lib / ICMP.c
index da4ffcf..ee87f83 100644 (file)
 /** Processes an ICMP packet inside an Ethernet frame, and writes the appropriate response\r
  *  to the output Ethernet frame if the host is issuing a ICMP ECHO request.\r
  *\r
+ *  \param FrameIN  Pointer to the incomming Ethernet frame information structure\r
  *  \param InDataStart   Pointer to the start of the incoming packet's ICMP header\r
  *  \param OutDataStart  Pointer to the start of the outgoing packet's ICMP header\r
  *\r
  *  \return The number of bytes written to the out Ethernet frame if any, NO_RESPONSE otherwise\r
  */\r
-int16_t ICMP_ProcessICMPPacket(void* InDataStart, void* OutDataStart)\r
+int16_t ICMP_ProcessICMPPacket(Ethernet_Frame_Info_t* FrameIN, void* InDataStart, void* OutDataStart)\r
 {\r
        ICMP_Header_t* ICMPHeaderIN  = (ICMP_Header_t*)InDataStart;\r
        ICMP_Header_t* ICMPHeaderOUT = (ICMP_Header_t*)OutDataStart;\r
@@ -62,7 +63,7 @@ int16_t ICMP_ProcessICMPPacket(void* InDataStart, void* OutDataStart)
                ICMPHeaderOUT->Id       = ICMPHeaderIN->Id;\r
                ICMPHeaderOUT->Sequence = ICMPHeaderIN->Sequence;\r
                \r
-               uint16_t DataSize = FrameIN.FrameLength - ((((uint16_t)InDataStart + sizeof(ICMP_Header_t)) - (uint16_t)FrameIN.FrameData));\r
+               uint16_t DataSize = FrameIN->FrameLength - ((((uint16_t)InDataStart + sizeof(ICMP_Header_t)) - (uint16_t)FrameIN->FrameData));\r
                \r
                /* Copy the remaining payload to the response - echo requests should echo back any sent data */\r
                memcpy(&((uint8_t*)OutDataStart)[sizeof(ICMP_Header_t)],\r