LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel
User Name
Password
Linux - Kernel This forum is for all discussion relating to the Linux kernel.

Notices


Reply
  Search this Thread
Old 01-15-2010, 03:23 AM   #1
ashok449
Member
 
Registered: Sep 2007
Location: noida
Distribution: suse
Posts: 63

Rep: Reputation: 16
how to get IP is configured in Static or DHCP mode using C program


Hello All,

how to get IP is configured in Static or DHCP mode uisng C program??

I got IP address using ioctl(fd, SIOCGIFADDR, &ifr), How Can I get IP mode static or dhcp???


Thanks in Advance.
Ashok
 
Old 01-15-2010, 05:14 PM   #2
jf.argentino
Member
 
Registered: Apr 2008
Location: Toulon (France)
Distribution: FEDORA CORE
Posts: 493

Rep: Reputation: 50
(maybe ask for a modo to move your thread in the programming forum, nothing to deal with kernel)
Maybe if you have some dhcp server addresses to test, you could try to send a DHCP renewal request with the socket you have?
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Cannot ping server eth1 static configured card from lan vieraci Linux - Server 3 09-08-2009 07:56 AM
KNetworkManager applying DHCP to static configured Interface Casket Linux - Software 1 10-23-2007 05:50 PM
How To know if a host configured with DHCP has obtained IP address from DHCP server? Prassanta SUSE / openSUSE 1 06-29-2006 09:48 AM
dhcp already configured on eth0 alltaken Linux - Newbie 15 05-24-2005 07:30 PM
FC2 Overriding static if in favor of dhcp system set for static pkraus109 Linux - Networking 8 09-21-2004 11:13 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel

All times are GMT -5. The time now is 12:53 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration