Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在使用 Contiki 3.0,我想找到某个节点的所有首选父节点,直到根节点。例如,如果我有节点 1 与首选父节点 5,节点 5 与首选父节点 8 和节点 8 直接连接到根。我怎样才能像这样找到或打印这些首选父母:1-> 5 -> 8 -> root。 我正在使用此代码来获取首选父级: PRINT6ADDR(rpl_get_parent_ipaddr(dag->preferred_parent));
非常感谢韩宁
您不能在节点上打印此信息,因为 RPL 是距离矢量协议,而不是链路状态协议。网络节点没有足够的信息来知道到根节点的完整路由路径;它只有网络的本地视图,仅限于它们的直接邻居。