LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   get local ip address base on route table on linux (c language) (https://www.linuxquestions.org/questions/programming-9/get-local-ip-address-base-on-route-table-on-linux-c-language-4175461631/)

arnold.kang 05-12-2013 09:45 AM

get local ip address base on route table on linux (c language)
 
hi,
all. i'm writing a program recently. it will use host ip address. when the host have more than one net interface. the local ip address must dynamically choosed base on route table to destination. i know in BSD, there is a interface to get it . but in linux, no stand lib to call, (maybe i did not found). anyway, how can i implement in in C. any advice or code will be appreciate

chrism01 05-13-2013 12:56 AM

This may help http://beej.us/guide/bgnet/

arnold.kang 05-14-2013 08:44 PM

thanks


All times are GMT -5. The time now is 09:58 PM.