Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.sys.apple2.programmer > #1553
| From | D Finnigan <dog_cow@macgui.com> |
|---|---|
| Newsgroups | comp.sys.apple2.programmer |
| Subject | Re: Resolved!, was Re: Uthernet receive error: bytes swapped |
| Date | 2015-03-07 17:31 +0000 |
| Organization | Mac GUI |
| Message-ID | <dog_cow-1425749545@macgui.com> (permalink) |
| References | <dog_cow-1425155060@macgui.com> <dog_cow-1425329291@macgui.com> <0e712315-fbcb-49de-a5db-ee0bc945efd7@googlegroups.com> |
David Schmenk wrote: > On Thursday, 5 March 2015 16:31:09 UTC-8, D Finnigan wrote: >> gids.rs wrote: >> >> What's incredible is how the checksum routine still managed to give >> >> correct >> >> results in so many cases. That's definitely one of those tricky bugs. >> >> >> > >> > >> > Maybe not so incredible. Wouldn't 10 bytes of code followed by 10 >> > bytes >> > of >> > 0's give the same checksum? >> >> I don't know. This IP checksum routine was supposed to only cover the 20 >> byte IP header. If it was running twice as long, it was either >> checksumming >> a bit of the data payload, or something else. I'm not really interested >> in >> looking into exactly what it was doing, just surprised that it was giving >> correct results in its broken state. >> > > Are you sure it was giving correct results? Yes, I had my application print a + sign if the checksum came out to be 0, and an @ if not. I also have a test suite. Granted, it involves me manually entering the test cases and verifying the result, but I trust it. This problem came when I unrolled the loop. See, I had this checksum routine verified correct by my test suite, but then I decided to unroll the loop, and that's when I started getting these occasional errors. > Most TCP/IP headers can get > away with a checksum of 0 (no checksum) so you don't need to spend time > calculating them. If you are on a local network and not putting your Apple > II on the internetz, this is probably a safe thing to do. I appreciate the advice, but I don't want to take any shortcuts in this area. I just completed and debugged the UDP checksum routine last week. Both outgoing and incoming UDP datagrams have their checksum verified or computed as necessary. -- ]DF$ Apple II Book: http://macgui.com/newa2guide/ Usenet: http://macgui.com/usenet/ <-- get posts by email! Apple II Web & Blog hosting: http://a2hq.com/
Back to comp.sys.apple2.programmer | Previous | Next — Previous in thread | Find similar | Unroll thread
Uthernet receive error: bytes swapped D Finnigan <dog_cow@macgui.com> - 2015-02-28 20:23 +0000
Re: Uthernet receive error: bytes swapped David Schmenk <dschmenk@gmail.com> - 2015-02-28 12:58 -0800
Re: Uthernet receive error: bytes swapped a2retrosystems@gmail.com - 2015-02-28 16:20 -0800
Re: Uthernet receive error: bytes swapped D Finnigan <dog_cow@macgui.com> - 2015-03-01 00:34 +0000
Re: Uthernet receive error: bytes swapped a2retrosystems@gmail.com - 2015-02-28 17:17 -0800
Re: Uthernet receive error: bytes swapped David Schmidt <schmidtd@my-deja.com> - 2015-02-28 21:58 -0500
Re: Uthernet receive error: bytes swapped ol.sc@web.de (Oliver Schmidt) - 2015-03-01 14:33 +0000
Re: Uthernet receive error: bytes swapped David Schmenk <dschmenk@gmail.com> - 2015-03-01 12:15 -0800
Resolved!, was Re: Uthernet receive error: bytes swapped D Finnigan <dog_cow@macgui.com> - 2015-03-02 20:47 +0000
Re: Resolved!, was Re: Uthernet receive error: bytes swapped gids.rs@sasktel.net - 2015-03-02 16:14 -0800
Re: Resolved!, was Re: Uthernet receive error: bytes swapped D Finnigan <dog_cow@macgui.com> - 2015-03-06 00:30 +0000
Re: Resolved!, was Re: Uthernet receive error: bytes swapped David Schmidt <schmidtd@my-deja.com> - 2015-03-05 20:53 -0500
Re: Resolved!, was Re: Uthernet receive error: bytes swapped D Finnigan <dog_cow@macgui.com> - 2015-03-07 17:37 +0000
Re: Resolved!, was Re: Uthernet receive error: bytes swapped David Schmenk <dschmenk@gmail.com> - 2015-03-06 07:21 -0800
Re: Resolved!, was Re: Uthernet receive error: bytes swapped D Finnigan <dog_cow@macgui.com> - 2015-03-07 17:31 +0000
csiph-web