Home > OS >  How to implement the IP route get code
How to implement the IP route get code

Time:11-11

I want to implement a function in your code, similar to the function of the IP route get, to get to go to the local IP export, as shown in figure:


I check it on the website it seems netlink can achieve, but haven't found relevant example, under the great god can help you?

CodePudding user response:

In busybox can find IP this command source code, can go to see the realization of this command

CodePudding user response:

IP route get inside the inside is the route of a record, you can see the realization of this route command, it is ok to match the:
https://blog.csdn.net/sjingpink/article/details/44268141? Utm_medium=distribute. Pc_relevant_bbs_down. None - task - blog - baidujs - 2. Nonecase& Depth_1 - utm_source=distribute. Pc_relevant_bbs_down. None - task - blog - baidujs - 2. Nonecase
  • Related