Changed various functions to pass the local interface using the
new coap_endpoint_t abstraction. This change uses the functions
implemented earlier in commit 786ca6da (branch dcaf) but does not
use callback functions for network I/O.
This change closes bug #23 "server responds from wrong endpoint
(ipv6 address)" (POSIX only, CONTIKI and LWIP tbd).
Adding and removal of observes is now handled by libcoap. The application's
GET handler only needs to add the Observe option (see server.c:hnd_get_time()).
this change spreads the concept of "dirty" from resources to
subscriptions. this allows queuing up notifications in case not all of
them can be transmitted at the same time (which can happen due to
constraints in pdu or node space).
when a dirty resource's notifications can not be sent, the resource is
marked as partiallydirty, and on the subscriptions that could not be
sent out, the dirty flag is set. they get cleared later when
coap_notify_observers gets run again, as it not only looks for dirty,
but also for partiallydirty resources.
note that there is currently no facility that prevents that all the
nodes get assigned to the send queue, leaving no room for receiving
packages (which happens in mass notifications, blocks all incoming
packages and is only resolved by the transmissions timing out). my
current test setup always leaves at least one node free for reception by
over-allocating and freeing a node on sending.