include/linux/if_ppp.h 91 struct npioctl { 92 int protocol; /* PPP protocol, e.g. PPP_IP */ 93 enum NPmode mode; 94 };
I hate enum in struct ............ it wasted me a whole week. I am sure a patch must be submitted to the kernel to prevent others from experiencing my pain. If you think you meet my problem, the best way to test is to compile all your source codes in the same compiler, and the same optimizing options, which will not cause this problem 2008/11/14 koba <[EMAIL PROTECTED]> > > Hi > > Could you share which enum cause problem? > > I am fighting some strange android behavior in my board. > Your information might help me. > > On 11月13日, 午後11:22, WANG Xiaoguang <[EMAIL PROTECTED]> wrote: > > Finally I resolved this problem. > > > > It seems a bug in kernel, which is caused by using 'enum' in a struct > > in Linux's kernel. > > > > Different compilers use different data types on 'enum' (maybe 'char' > > or 'int') > > > > In my android, the kernel's 'enum' size is 4, while the size of 'enum' > > in ELF binarys is 1. > > Then some options in kernel is incorrect. > > > > It's really a bad idea to use 'enum' in a struct, especially whichwill > > be used by other applications outside the module which defines it, > > but unfortunately there are still some misuses in Linux's kernel. > > > > On 11月11日, 下午5时24分, "David Turner" <[EMAIL PROTECTED]> wrote: > > > > > -cc android-developers +cc android-porting > > > > > what about using strace to see what the problem might be ? > > > > > On Mon, Nov 10, 2008 at 9:18 AM, Wang Xiaoguang <[EMAIL PROTECTED] > >wrote: > > > > > > I have successfully created a GPRS connection to my ISP, > > > > > > # busybox ifconfig ppp0 > > > > ppp0 Link encap:Point-to-Point Protocol > > > > inet addr:10.8.232.45 P-t-P:10.8.232.45 Mask: > 255.255.255.255 > > > > UP POINTOPOINT RUNNING NOARP MULTICAST MTU:1500 Metric:1 > > > > RX packets:11 errors:1 dropped:0 overruns:0 frame:0 > > > > TX packets:24 errors:0 dropped:0 overruns:0 carrier:0 > > > > collisions:0 txqueuelen:3 > > > > RX bytes:510 (510.0 B) TX bytes:1386 (1.3 KiB) > > > > > > # busybox route > > > > Kernel IP routing table > > > > Destination Gateway Genmask Flags Metric Ref > Use > > > > Iface > > > > default 10.8.232.45 0.0.0.0 UG 0 0 > 0 > > > > ppp0 > > > > > > But I can not connect to remote hosts, eg: > > > > busybox wgethttp://202.108.22.5/& > > > > (Never succeed) > > > > > > When I am trying to make a TCP connection, both the "RX packets" and > "TX > > > > packets" of ppp0 increases. > > > > > > I have tried these commands in my Linux on PC and they worked > correctly. > > > > > > How can I get GPRS worked in my Android ?- 隐藏被引用文字 - > > > > > - 显示引用的文字 - > > > --~--~---------~--~----~------------~-------~--~----~ unsubscribe: [EMAIL PROTECTED] website: http://groups.google.com/group/android-porting -~----------~----~----~----~------~----~------~--~---