Thread: Header struct
View Single Post
  #2 (permalink)  
Old April 24th, 2002
tshdos tshdos is offline
Gnutella Veteran
 
Join Date: March 24th, 2002
Location: Virginia
Posts: 101
tshdos is flying high
Default

sizeof() returns the total storage bytes of the struct including padded bytes for alignment. It is returning 24 because of a
byte that was added for alignment.

The format of your structure looks fine except payloadID, TTL, Hops, and payloadlen should probably be unsigned.

Last edited by tshdos; April 24th, 2002 at 05:21 PM.
Reply With Quote