|
From: | Chen |
Subject: | Re: [lwip-users] lwip-users Digest, Vol 108, Issue 8 |
Date: | Mon, 06 Aug 2012 10:40:39 -0400 |
Well, assuming "unsigned char * packet" is a pointer to your received
byte array:
if ( (*(short *)&packet[12]) == 0x0800 && packet[23] == 0x11) // 0x800
is IP packet, 0x11 is UDP protocol byte in IP header
you have a UDP packet (verify those offsets are correct). You can look
at this before it gets passed in to tcpip_input().
Was this what you were looking for?
Marty
[Prev in Thread] | Current Thread | [Next in Thread] |