Description: The program user access to the host' s IP address and MAC address, the following function prototype header file# include " getIP.h" int get_ip (char* ipaddr, char* netmask, const char* ethname) # include " getIP.h" int get_mac (char* mac) use the following simple example is get_ip function// define the IP and MAC need storage space char ethname [] = " eth0" char ipaddr [20] // IP address of up to 16 characters char netmask [20] // mask for up to 18 characters// Obtain an IP address get_ip (ipaddr, netmask, ethname) // output printf (" s \ n" , ipaddr) printf ( " s \ n" , netmask) use the following simple example is get_mac function
To Search:
File list (Check if you may need any files):
getIP-impro\getIP
...........\getIP.c
...........\getIP.h
...........\getIP.o
...........\main.c
...........\main.o
...........\readme
...........\代码说明.txt
getIP-impro