| 30 /*------------------------------------------------PUT------------------------------------------------*/ |
30 /*------------------------------------------------PUT------------------------------------------------*/ |
| 31 |
31 |
| 32 /* note: |
32 /* note: |
| 33 * 1, in these functions, 'b' stands for byte, 'w' stands for word, 'dw' stands for double word. |
33 * 1, in these functions, 'b' stands for byte, 'w' stands for word, 'dw' stands for double word. |
| 34 * 2, we use '*cursor' and 'buf' as two addresses to calculate the length. |
34 * 2, we use '*cursor' and 'buf' as two addresses to calculate the length. |
| 35 * 3, change '0' to '1', if want to get more info about the packet parsing. */ |
35 * 3, change 'undef' to 'define' to get more info about the packet parsing. */ |
| 36 |
36 |
| 37 #if 0 |
37 #undef PARSER_DEBUG |
| 38 #define PARSER_DEBUG |
|
| 39 #endif |
|
| 40 |
38 |
| 41 /* read one byte from buf, |
39 /* read one byte from buf, |
| 42 * return the number of bytes read if succeeds, otherwise return -1 */ |
40 * return the number of bytes read if succeeds, otherwise return -1 */ |
| 43 gint qq_get8(guint8 *b, guint8 *buf) |
41 gint qq_get8(guint8 *b, guint8 *buf) |
| 44 { |
42 { |