WeMobileDev/article

请教下getdefaultgateway6()函数是如何实现

vintonliu opened this issue · 2 comments

请教下getdefaultgateway6()函数是如何实现

源码在getgateway.c中, 仅在宏USE_SYSCTL_NET_ROUTE中实现了一份getdefaeultgateway6. 此宏在Linux, BSD, Windows上并未定义, Apple(ios, mac)上有定义.

故可认为仅在Apple平台上支持了此功能, 为了通过Appstore的审核...

注: 参考代码 Mars(https://github.com/Tencent/mars)

@wangyoucao577 已经在网上找了相关资料,实现了。