… | |
… | |
40 | #include "util.h" |
40 | #include "util.h" |
41 | |
41 | |
42 | struct net_packet |
42 | struct net_packet |
43 | { |
43 | { |
44 | u32 len; // actually u16, but padding... |
44 | u32 len; // actually u16, but padding... |
45 | // upto 4 bytes at the end might get overwritten when decrypting, |
|
|
46 | // which means len, above, is regularly overwritten with part |
|
|
47 | // of the random prefix when RAND_BYTES=12. |
|
|
48 | |
45 | |
49 | u8 &operator[] (u16 offset) const; |
46 | u8 &operator[] (u16 offset) const; |
50 | u8 *at (u16 offset) const; |
47 | u8 *at (u16 offset) const; |
51 | |
48 | |
52 | void unshift_hdr (u16 hdrsize) |
49 | void unshift_hdr (u16 hdrsize) |