[ell-i-developers] Re: Initial plans for a truly minimal UDP/IP for CoAP

  • From: Pekka Nikander <pekka.nikander@xxxxxx>
  • To: ell-i-developers@xxxxxxxxxxxxx
  • Date: Tue, 25 Feb 2014 08:01:08 +0200

Good point about DHCP.  The Arduino Ethernet library implements DHCP, so most 
probably we'll use it at least initially.  However, we'll have to make sure 
that it works.  Which reminds me that I also need to read more carefully how 
the Arduino Ethernet library works internally; that may affect the stack 


On 2014–02–24, at 23:46 , Jose Granados Vergara <jose.granados@xxxxxx> wrote:

> I was trying to setup this freertos + UDP project but even though I followed 
> the instructions and fixed compilation errors I don't get any response, so I 
> was planning to do a basic UDP stack too starting with dhcp.
> Your plan looks good to me, I would only add dhcp.
>> El 24/02/2014, a las 21:11, "Pekka Nikander" <pekka.nikander@xxxxxx> 
>> escribió:
>> I've now started the work on a minimal UDP/IP stack for CoAP.  Here are my 
>> current plans; please make questions and comments.
>> Basic principle: Be liberal in what you accept, conservative in what you 
>> send.  However, due to space limitations the plan is to drop (almost) all 
>> optional features and support only the bare minimum.
>> IP
>> ==
>> No ability to generate packets on its own, only able to reply incoming 
>> packets.
>> - IPv4 only, header length always the default 20 bytes
>> - Type of Service: ignored when received, copied to a reply
>> - ID: ignored when received, copied to a reply
>> - Framentation: not supported; dropped if received, never sent.
>> - Options: not supported; dropped if received, never sent.
>> - Local address: Only one unicast address supported, no multicast support.
>> - Remote address: Copied to a reply.
>> How about the following?
>> - TTL: ignored when received, copied to replies.
>> - checksum ignored when received, sent as such when replying
>> - simply swapping src and dst does not change the checksum, right?
>> - if we do anything more but copy to ID and/or TTL, we must implement 
>> checksum updates...
>>   - but updating the checksum is easier than verifying/computing it
>> - no gateway nor netmask, always send back to the sender ethernet address
>> ====
>> Only supports ping (ICMP echo) as a compile-time option.  ICMP errors never 
>> sent, received errors silently ignored.
>> ARP
>> ===
>> - replies to ARP queries pertaining to its own IP address
>> - reply Ethernet destination address copied from the received packet
>> - does not cache ARP data, as only replies
>> - never sends ARP queries itself or keeps state
>> UDP
>> ===
>> Again, no ability to generate packets on its own, only able to reply 
>> incoming packets.
>> - packets received on non-bound ports silently ignored
>> - checksum ignored when received, always zero when sent
>> Once this is up and running, we can consider adding more functionality, but 
>> AFAIK this should be enough to allow the host to answer to CoAP packets.
>> Comments?
>> --Pekka

Other related posts: