ChinaUnix.net
相关文章推荐:

linux 重新获取ip

#include #include int main() { FILE *fpr; char devicecfg[50]; char *device="eth0"; sprintf(devicecfg,"/etc/sysconfig/network-scripts/ifcfg-%s",device); char buf[1024],*p; int i; char gwip[20]={0}; if((fpr=fopen(devicecfg, "r"))==NULL) { printf("open device config faile\n"); return -1; } memset(buf, 0, sizeof(...

by hackersea - 网络技术 - 2008-08-27 18:23:16 阅读(3310) 回复(3)

网络技术

相关讨论

我对linux不熟,现在想学习一下 但是 单位的 ip 都是动态分配的 不知道在linux下怎么自动获取ip 谢谢各位

by netstorm - Linux论坛 - 2003-07-03 15:11:11 阅读(799) 回复(3)

最近在做linux平台下用C语言实现ip地址的自动获取和静态获取,目前我只做了静态获取ip,但不懂得怎么实现自动获取ip,希望高手能够指点迷津,谢谢了。 注:    我是要在开发板上实现ip动态获取的,不是在PC机上动态获取,dhcp服务在开发板上如何安装和配置,有做过类似的高手请指教。 [ 本帖最后由 hxh88888888 于 2009-8-24 10:14 编辑 ]

by hxh88888888 - C/C++ - 2009-08-24 15:08:51 阅读(4376) 回复(4)

做了一个linux下的SOCKET程序,基于TCP协议,当有别的计算机访问的时候,服务器端要怎么获得访问者的ip和MAC地址?

by shineyear - C/C++ - 2008-10-08 10:41:26 阅读(19672) 回复(15)

查了下资料没查到什么函数。 哪位知道的指点一下,非常感谢!

by mengwg - C/C++ - 2006-03-21 17:33:01 阅读(1951) 回复(1)

如何在linux bridge 中通过MAC地址获取ip地址呢? 类似于在线状态用户功能的实现

by yangfan40207 - 网络技术 - 2008-10-28 18:03:16 阅读(6384) 回复(9)

代码如下: [code] #include //#include #include #include #include #include #include #include #include #include #include #include #include #include int main(int argc, char **argv) { int sockfd; char *ptr; struct ...

by amoyppa - C/C++ - 2013-03-22 16:36:51 阅读(6904) 回复(7)

现在已经获取了一个ip地址,我想重新获取一个不同的ip地址?该如何做? 谢谢!!!

by zhuaibing - BSD - 2005-05-11 08:27:07 阅读(3185) 回复(2)

请问 linux从win2000动态获取ip如何在linux知道分配请矿

by pdiunix - Linux论坛 - 2004-02-01 13:04:31 阅读(1145) 回复(18)

怎么在linux重新安装tcp/ip协议。ping 127.0.0.1不通了。

by wll-zy - 网络与硬件 - 2006-12-23 17:00:52 阅读(603) 回复(0)
by 攸攸晨晓 - Informix - 2004-10-06 13:45:34 阅读(1086) 回复(3)