检索Ipv4和Ivv6路由表。将旧的inet 2.4移植到inet 4.1.1错误

时间:2019-11-23 17:41:01

标签: c++ omnet++ inet

旧代码如下:

#ifdef WITH_IPv4
    IRoutingTable *rt = RoutingTableAccess().getIfExists();
#endif
#ifdef WITH_IPv6
    RoutingTable6 *rt6 = RoutingTable6Access().getIfExists();
#endif

我一直在尝试的新代码,但是在ipv6正常的情况下我仍然会遇到ipv4错误: 未在此范围内声明“ getRoutingTable”

#ifdef WITH_IPv4
    Ipv4RoutingTable *rt = getRoutingTable().getIfExists();
#endif
#ifdef WITH_IPv6
    Ipv6RoutingTable *rt6 = getRoutingTable().getIfExists();
#endif

0 个答案:

没有答案