|
-
Dec 23rd, 2001, 04:41 AM
#1
Thread Starter
Hyperactive Member
Help!!!!
can u tell me what this means?
connect_time= pkt->data[off+3];
connect_time= (connect_time<<8) + pkt->data[off+2];
connect_time= (connect_time<<8) + pkt->data[off+1];
connect_time= (connect_time<<8) + pkt->data[off];
off+= sizeof(connect_time);
im trying to figure out what connect_time would be
-
Dec 23rd, 2001, 06:11 AM
#2
Monday Morning Lunatic
What it's doing is taking the four bytes from pkt->data, and putting them into a four-byte variable.
The << 8 means to shift the data 1 byte to the left, so that you can add the next byte into the blank hole you've made.
I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
-- Linus Torvalds
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|