65.63 KB, 下载次数: 107
ifconfig
16.74 KB, 下载次数: 74
route
原帖由 寂寞游侠 于 2006-9-26 16:33 发表
上面的 代码。。 (ioctl(fd, SIOCSIFADDR, &ifr) < 0) 对 对系统进行设置吗?
原帖由 飞灰橙 于 2006-9-26 14:51 发表
easy得很
[code]
BOOL SetIP(const char *pcInterface, unsigned long ulIP, unsigned long ulNetmask)
{
struct ifreq ifr;
int fd;
struct sockaddr_in *pAddr;
if (pcInterface == NULL)
{
...
原帖由 langue 于 2006-9-26 19:18 发表
回复 4楼 飞灰橙 的帖子
ioctl(2)的可移植性如何?
欢迎光临 Chinaunix (http://bbs.chinaunix.net/) | Powered by Discuz! X3.2 |