2
* Drizzle Client & Protocol Library
4
* Copyright (C) 2008 Eric Day (eday@oddments.org)
7
* Use and distribution licensed under the BSD license. See
8
* the COPYING file in this directory for full text.
13
* @brief Packing Declarations
16
#ifndef __DRIZZLE_PACK_H
17
#define __DRIZZLE_PACK_H
24
* @addtogroup drizzle_pack Packing Declarations
26
* These functions are used internally to pack various parts of the protocol.
27
* Not all functions are defined in pack.c, they are in the most appropriate
28
* source file (for example, handshake.c for drizzle_pack_client_handshake).
33
* Pack length-encoded number.
36
uint8_t *drizzle_pack_length(uint64_t number, uint8_t *ptr);
39
* Unpack length-encoded number.
42
uint64_t drizzle_unpack_length(drizzle_con_st *con, drizzle_return_t *ret_ptr);
45
* Pack length-encoded string.
48
uint8_t *drizzle_pack_string(char *string, uint8_t *ptr);
51
* Unpack length-encoded string.
54
drizzle_return_t drizzle_unpack_string(drizzle_con_st *con, char *buffer,
58
* Pack user, scramble, and db.
61
uint8_t *drizzle_pack_auth(drizzle_con_st *con, uint8_t *ptr,
62
drizzle_return_t *ret_ptr);
70
#endif /* __DRIZZLE_PACK_H */