c++ - In general How to find out whether client has assigned static Ip or it is dhcp client -
i have retrieved ip, subnet , broadcast using ioctl() system call. can me find out whether client static or dhcp?? asking in general , using system call. client instead of interface. the interface has nothing dhcp. can configured have particular ip address, gateway, etc. that's all. configuration, however, can done smart little program called dhcp client :) need find out (i mean, program) has configured interface. update: for example, under majority of linux distributions may a ps aux | grep 'dhcpcd .* eth0' if gives result /sbin/dhcpcd --netconfig -l -e -hhh -c /etc/sysconfig/network/scripts/dhcpcd-hook -t 0 -h somehostname eth0 you can eth0 configured dhcp