add missing stdlib.h include
removed unnecessary stdlib.h include
fix table header indentation
catch some null pointers in RPL
provide a default next hop (preferred parent)