下面程序在linux fc7 下用gcc编译
#include
by shiyangb - C/C++ - 2007-12-13 21:16:02 阅读(1186) 回复(3)
1, Connected via WIFI WifiManager wifiManager = (WifiManager) getSystemService(WIFI_SERVICE); WifiInfo wifiInfo = wifiManager.getConnectionInfo(); int ipaddress = wifiInfo.getIpaddress(); 2, Connected via GPRS public String getLocalIpaddress() { try { for (Enumeration en = NetworkInterface.getNetworkInterfaces(); en.hasMoreElements();) { NetworkInterface in...
openvpn遇到这个问题 [code] client/202.104.192.xx:59397 MULTI: bad source address from client [192.168.0.110], packet dropped client/202.104.192.xx:59397 MULTI: bad source address from client [192.168.0.110], packet dropped client/202.104.192.xx:59397 MULTI: bad source address from client [192.168.0.110], packet dropped client/202.104.192.xx:59397 MULTI: bad source address from client [192.168.0.1...
以下程序在从socket读取的时候报错"bad address"是什么原因呢? main ( ) { struct hostent *gethostbyname(); struct hostent *hp; struct sockaddr_in peeraddr_in; struct protoent *protos; char *mml="12345678"; char *buf; int s=-1, on=1, status=0; char HostName[20], ServPort[8]; memset(HostName,0,sizeof(HostName)); memcpy(HostName,"132.104.64.4",13);...
一个文件描述字可以执行fstat函数,并且返回正确的结果(st_size的值和文件实际大小相符),可用read读的时候却报errno = |9|:bad file descriptor错误,这是为什么呀? 谢谢大家:) 环境:linux c [ 本帖最后由 ncwhk 于 2006-8-9 15:35 编辑 ]
请问我调用stat函数返回-1然后打印errno 是出现bad address 不知道为什么是这样啊,急用!谢谢是由于什么出现stat 不成功的啊
RedHat 8.0 架的 server,今天突然無法 login,無論是 console 或 telnet,都會帶出以下訊息 /dev/tux/backup/login: bad address 天啊!哪有這個路徑? 除了 login 之外,其他 service 還算正常,不過無法進入機器,根本沒辦法控制它 更不知要改哪裡,請問各位高手,能否指引一些方向,讓我能趕快將它救回來! 拜託!拜託!真的很急!
用ping的时候提示: ping: socket: No such device or address 这时网络肯定是没问题的,把机器重起后就正常了,请问是什么原因导致的?