im trying to get in c programing (LINUX) what kind of ip I have DHCP or static. Does someone know how do that?? I extract my ip using struct ifaddrs; it will be nice to find out if that stucture can provide the information. thanks on advance :)
discover if ip address is DHCP or static
1.6k Views Asked by azulay7 At
1
There are 1 best solutions below
Related Questions in C
- Passing arguments to main in C using Eclipse
- kernel module does not print packet info
- error C2016 (C requires that a struct or union has at least one member) and structs typedefs
- Drawing with ncurses, sockets and fork
- How to catch delay-import dll errors (missing dll or symbol) in MinGW(-w64)?
- Configured TTL for A record(s) backing CNAME records
- Allocating memory for pointers inside structures in functions
- Finding articulation point of undirected graph by DFS
- C first fgets() is being skipped while the second runs
- C std library don't appear to be linked in object file
- gcc static library compilation
- How to do a case-insensitive string comparison?
- C programming: Create and write 2D array of files as function
- How to read a file then store to array and then print?
- Function timeouts in C and thread
Related Questions in LINUX
- How do I recursively find and replace only in files named index.php on Linux webserver?
- passing text with \n as one argument in shell
- kernel module does not print packet info
- How to send ESC/POS commands to thermal printer in Linux
- (x64 Nasm) Writeline function on Linux
- How do I set the Hive user to something different than the Spark user from within a Spark program?
- Default priority of thread with SCHED_FIFO
- Calling a python function with options from shell script
- How to split a directory into parts without compressing or archiving?
- Cross compile simple standard C program on Linux for Mac
- How to offload NAPI poll function to workqueue
- python netifaces - How to get currently used network interface
- Unexpected output from function
- mingw-64 conflicting declarations when cross-compiling
- Different behavior of async with Visual Studio 2013(Windows8.1) and GCC 4.9(Ubuntu14.10)
Related Questions in NETWORK-PROGRAMMING
- Packet drops in multicast when multiple instance of listner are running
- Get packet that's being routed
- Timing packets on a traffic server
- SNMP :snmpwalk response from NAS timeout issue
- Send Http request at specific time
- Swift - Get device's WIFI IP Address
- Construct and label a uniform graph in NetworkX using dictionaries?
- Diffie Hellman with authentication
- traversing a graph in spark-graphx via edge properties
- Setting proxy for java application
- Java sending handshake packets to minecraft server
- How to use different network interface for signaling & media in WebRTC app?
- Is it guaranteed that an RST packet will be sent when a process terminates?
- Does a process waiting on a network response take cpu/ram resources?
- Python socket stays blocked on socket.recv() when client expects data
Related Questions in IP
- IP Address Range for Apple MDM service?
- Android apps without public ip address
- Chrome browser: Problems after upgrade with reading ip from etc/hosts of subdomains localhost
- Blocking traffic using .htaccess not working
- IP address to Domain Name? DNS?
- Store IP into mysql database
- how to setup IPs from different subnet on 1 network card, Centos 6.6
- Server not receiving TCP SYN packets
- bash - for loop for IP range excluding certain IPs
- MaxMind GeoIP City Returning Incorrect Lat Longs
- Batch File get Specific IP into Variable
- What protocols are involved in sending a message over Ethernet in Java?
- How Can I ping or create a scoket connection with my friend?
- IP Address won't pass to e-mail body
- Http Get Request for IpDBInfo using an IP Address
Related Questions in STATIC-IP-ADDRESS
- How to setup FTP static ip with QuotaGuard static?
- QR Code Wi-Fi Static IP
- Update all instances of IP address on a server
- How do I connect a raspberry pi to a hidden network with no password using a static ip address
- Interface eth0 not configured
- How can I configure private network in vagrant box
- Direct ethernet connection to Raspberry PI running Arch linux
- Oscommerce store access from other machines using ip address
- Setup Static IP for Android 4.3 on VirtualBox
- Static IP Address with Heroku (not Proximo)
- discover if ip address is DHCP or static
- Pointing DNS name to IP address on local machine
- Availability of IP Address - Python
- Hosting Java server on my own computer, using "no-ip" for static access
- Travis CI, Static IP for the VM
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
That property is not something you can deduce statically from the IP address alone.
You can probably make a guess by determining if the IP address is in the "non-routable" series (10.x.y.z or 192.168.x.y), but the address could just as well have been manually assigned.
Figuring out if the system has a current lease from a DHCP server is (very) platform-dependent, and will require information that is not in the IP address itself.