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 |
This may help http://beej.us/guide/bgnet/
|
thanks
|
All times are GMT -5. The time now is 09:58 PM. |