Re: netmask access from a c program

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, May 16, 2008 at 5:11 AM, Vardhan, Sundara (GE Infra, Energy)
<sundara.vardhan@xxxxxx> wrote:
> Hi All
>
> Is there any way to access netmask given the IP address from within c program. I have an ip address for which I need to get the netmask and broadcast addresses and also set route for them. Your help will be greatly appreciated.
>
> With Regards
>
> Vardhan
>

If you have access to the machine you could run ifconfig and parse the output.

[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux