* Print LOST in dotted format.
This commit is contained in:
parent
83f2b1da00
commit
cce656e23d
1 changed files with 12 additions and 4 deletions
|
@ -14,10 +14,13 @@
|
||||||
#include "net/uaodv-rt.h"
|
#include "net/uaodv-rt.h"
|
||||||
#include "net/uaodv-def.h"
|
#include "net/uaodv-def.h"
|
||||||
|
|
||||||
#if 0
|
#define NDEBUG
|
||||||
#define PRINTF(...) printf(__VA_ARGS__)
|
#include "lib/assert.h"
|
||||||
#else
|
|
||||||
|
#ifdef NDEBUG
|
||||||
#define PRINTF(...) do {} while (0)
|
#define PRINTF(...) do {} while (0)
|
||||||
|
#else
|
||||||
|
#define PRINTF(...) printf(__VA_ARGS__)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define in_my_network(a) \
|
#define in_my_network(a) \
|
||||||
|
@ -56,9 +59,14 @@ cc2420_send_uaodv(void)
|
||||||
|
|
||||||
if (route == NULL) {
|
if (route == NULL) {
|
||||||
h.dst = next_gw->u16[1]; /* try local while waiting for route */
|
h.dst = next_gw->u16[1]; /* try local while waiting for route */
|
||||||
|
#if 0
|
||||||
|
PRINTF("SKIP %d.%d.%d.%d\n", uip_ipaddr_to_quad(next_gw));
|
||||||
|
return UIP_FW_OK;
|
||||||
|
#endif
|
||||||
} else {
|
} else {
|
||||||
if (cc2420_check_remote(route->nexthop.u16[1]) == REMOTE_YES) {
|
if (cc2420_check_remote(route->nexthop.u16[1]) == REMOTE_YES) {
|
||||||
PRINTF("LOST 0x%04x\n", route->nexthop.u16[1]);
|
PRINTF("LOST %d.%d\n",
|
||||||
|
route->nexthop.u16[1] & 0xff, route->nexthop.u16[1] >> 8);
|
||||||
/* Send bad route notification? */
|
/* Send bad route notification? */
|
||||||
uaodv_bad_route(route);
|
uaodv_bad_route(route);
|
||||||
uaodv_rt_remove(route);
|
uaodv_rt_remove(route);
|
||||||
|
|
Loading…
Reference in a new issue