473,387 Members | 1,899 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Re: Dangerous UDP Checksum code ?!?

I think I've been redcoding a bit too much ;)

In redcode there is no such thing as temporarely variables created by the
compiler... ;)

So in recode any operation is done directly on whatever was specified ;)

So I guess I got a bit worried that direct operations could happen in high
level languages as well ;)

At least the solution I posted could be easily ported to for example
redcode/asm without any doubts/problems ;) :) So I am sticking with my
solution ! ;)

Bye,
Skybuck =D
Nov 8 '08 #1
2 3267
On Nov 8, 3:46*pm, "Skybuck Flying" <BloodySh...@hotmail.comwrote:
At least the solution I posted could be easily ported to for example
redcode/asm without any doubts/problems ;) :) So I am sticking with my
solution ! ;)
If you want to spend the rest of your life writing mind-numbingly dumb
code, knock yourself out. For for the rest of us sane people, if this
is pretty gosh darned simple:

sum = (sum & 0xFFFF)+(sum >16);

Frankly, it's a miracle that anyone was able to misunderstand it. But
then, you never cease to impress.

DS
Nov 9 '08 #2
David Schwartz wrote:
On Nov 8, 3:46 pm, "Skybuck Flying" <BloodySh...@hotmail.comwrote:
>At least the solution I posted could be easily ported to for example
redcode/asm without any doubts/problems ;) :) So I am sticking with my
solution ! ;)

If you want to spend the rest of your life writing mind-numbingly dumb
code, knock yourself out. For for the rest of us sane people, if this
is pretty gosh darned simple:

sum = (sum & 0xFFFF)+(sum >16);

Frankly, it's a miracle that anyone was able to misunderstand it. But
then, you never cease to impress.
Skybly has made a multi-year career of Usenet vandalism.
On each newsgroup where I have seen hir, the pattern has been
the same: A few semi-reasonable posts to provide adequate
lubrication, followed by an affirmation of the surname (with
the obvious edit). The suggested remedy is to update your
killfiles; would that it were possible to set them on something
stronger than "Stun."

--
Eric Sosman
es*****@ieee-dot-org.invalid
Nov 10 '08 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

12
by: Mercuro | last post by:
Hello i'm looking for a simple way to checksum my data. The data is 70 bytes long per record, so a 32 byte hex md5sum would increase the size of my mysql db a lot. I'm looking for something...
2
by: pradeep | last post by:
I have 2 data files, DATA1 and DATA2 , both same. My task is to: Open DATA1, compute the checksum and put it in the end of the file(don't bother about boundary conditions).close DATA1 Open...
4
by: Abby | last post by:
I have an array which contain Hex no. in each position. For examples, unsigned char data; data = 0x00; data = 0x01; data = 0x02; data = 0xE; data = 0xEF; --> This is the checksum value
2
by: Abby | last post by:
I need to do 8 bits 2's complement checksum, so I wrote code in order to see if the checksum calculation is correct. ===========================================================================...
6
by: Kevin | last post by:
I'm on Sun 0S 5.8 and need to calculate the checksum of certain sections in an ELF binary file. Specifically .text to .rodata. I'm able to parse through to the program header table and then find...
6
by: Astroman | last post by:
Hi guys and girls. This is my first time posting here so go easy :) . I was wondering if someone could please interpret how this csum() function works in the following C code. I know that the...
3
by: Andrus | last post by:
Device connected to serial port accepts data packets in the form 02 0x57 ll ll 00 00 00 00 dd..dd cc cc 02 (1 byte ) is message prefix 0x57 (1 byte) is message type (W=Write) ll ll ( 2 bytes)...
1
by: gameMaker | last post by:
I need to be able to build my code into a dll where the checksum of the dll is the same everytime I build it. In other words, the same exact code gives me a different checksum each time I build...
4
by: Rain | last post by:
hi, need help here, does anyone know how to use or does any one have the code for checksum? I want to checksum a string to be sent using udp and checksum it again when received.. does anyone...
1
by: Skybuck Flying | last post by:
Well anyway... I think the idea can still work. Assuming the maximum value for each word is: 65535. And assuming a packet is maximum of 65535 words then multiple these two should give the...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.