Sorry, it's not your bug. After your mail, I've made a simple C UDP client
on my PC that shows the same problem (UDP checksum wrong).
It's due to a default wrong configuration of the ethernet device. On default
the kernel leaves the checksum computation to the NIC, but
in my case this seems to can not do this computation.

With the command "ethtool -K etho tx off" I've disabled the checksum
computation in the network interface and now the UDP checksum is computed
correctly.

I'm very sorry to haven't made this simple test before. Thanks for your
support.

Best Regards,
Andrea Bernardi

2008/7/11 Digit <[EMAIL PROTECTED]>:

> what you describe is very strange, because the Android emulator is not
> sending UDP packets itself, it's just using standard BSD sockets instead to
> send datagrams. what happens in this case is the following:
>
> a/ the program running in the emulator uses a socket interface to send
> datagrams to a server
> b/ the emulated kernel receives the datagram, and embeds it into a
> UDP/IP/MAC packet that is sent to the emulated ethernet adapter
> c/ the emulator's internal router/firewall receives the ethernet packet,
> decapsulate the datagram and dest/src address
> d/ the emulator then uses a socket interface to send the same datagram to
> your server
> e/ your development machine's kernel encapsulate the new datagram into
> another UDP/IP/MAC packet sent to your ethernet card
> f/ WireShark captures it
>
> from the description you made, it seems that your host OS network stack is
> corrupting the UDP checksum (it is not sent by the emulator itself).
> can you confirm that the above description reflects your use case. Also,
> which exact OS version are you running ?
>
> thanks in advance
>
>
> On Tue, Jul 1, 2008 at 6:32 PM, Andrea Bernardi <[EMAIL PROTECTED]>
> wrote:
>
>> Hi,
>> In detail I have a sip user agent inside the Android emulator that
>> exchange signalling data over an UDP socket to an Internet server.
>> From Wireshark executed on the PC where run the emulator I see UDP packets
>> sent by my application from Android emulator marked with a wrong checksum.
>>
>> The udp checksum is not equal to zero and the computed checksum value is
>> different from that computed by Wireshark.
>>
>> I have tried to force the checksum computation in the net/ipv4/udp.c under
>> udp_push_pending_frames in the kernel but the obtained value is viewd always
>> as wrong by Wireshark. I don't think that the kernel routine used to compute
>> this value is erroneous.
>>
>> Have you any suggestion?
>>
>> Thanks,
>> Andrea Bernardi
>>
>> 2008/7/1 Digit <[EMAIL PROTECTED]>:
>>
>> Hello Andrea,
>>>
>>> can you clarify exactly what direction these datagrams flow ? and where
>>> exactly you see these bad checksums.
>>> it could be a bug in the internal router/firewall of the emulator, but I
>>> need more detail to determine why.
>>>
>>>
>>>
>>>
>>> On Tue, Jul 1, 2008 at 5:11 PM, Andrea Bernardi <[EMAIL PROTECTED]>
>>> wrote:
>>>
>>>> Hi at all,
>>>> I've noticed that udp packets sent from a my application inside Android
>>>> emulator have the udp checksum wrong viewing from Wireshark.
>>>> Seems that udp checksum is computed but the value is erroneous.
>>>>
>>>> Anyone have a similar problem?
>>>>
>>>> Best Regards,
>>>> Andrea Bernardi
>>>>
>>>>
>>>>
>>>>
>>>
>>>
>>>
>>
>>
>>
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
Announcing the new M5 SDK!
http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to