CodeBus
www.codebus.net
Search
Sign in
Sign up
Hot Search :
Source
embeded
web
remote control
p2p
game
More...
Location :
Home
Search - GetIp.h
Main Category
SourceCode
Documents
Books
WEB Code
Develop Tools
Other resource
Search - GetIp.h - List
[
Internet-Network
]
yumingjiexi
DL : 0
域名解析。通过域名获得ip地址是不可多得的vc网络程序代码-Domain Name. Through Domain ip address is rare vc network code
Date
: 2025-07-06
Size
: 29kb
User
:
周东文
[
Linux-Unix
]
getIP-impro
DL : 0
本程序用户获取主机的IP地址和MAC地址,头文件与函数原型如下 #include "getIP.h" int get_ip(char *ipaddr, char *netmask, const char *ethname) #include "getIP.h" int get_mac(char *mac) 以下是get_ip函数简单使用范例 //定义IP和MAC所需要的存储空间 char ethname[] = "eth0" char ipaddr[20] //IP地址最长为16个字符 char netmask[20] //子网掩码最长为18个字符 //获取IP地址 get_ip(ipaddr,netmask,ethname) //输出结果 printf(" s\n",ipaddr) printf(" s\n",netmask) 以下是get_mac函数简单使用范例 -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
Date
: 2025-07-06
Size
: 6kb
User
:
quietojlt
CodeBus
is one of the largest source code repositories on the Internet!
Contact us :
1999-2046
CodeBus
All Rights Reserved.