-
Notifications
You must be signed in to change notification settings - Fork 986
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Split of MySQL_Protocol.cpp into multiple files
- Loading branch information
1 parent
e7aa5ff
commit dad6f0f
Showing
7 changed files
with
840 additions
and
760 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
#ifndef CLASS_MySQL_Prepared_Stmt_info_H | ||
#define CLASS_MySQL_Prepared_Stmt_info_H | ||
class MySQL_Prepared_Stmt_info { | ||
public: | ||
uint32_t statement_id; | ||
uint16_t num_columns; | ||
uint16_t num_params; | ||
uint16_t warning_count; | ||
uint16_t pending_num_columns; | ||
uint16_t pending_num_params; | ||
MySQL_Prepared_Stmt_info(unsigned char *pkt, unsigned int length) { | ||
pkt += 5; | ||
statement_id = CPY4(pkt); | ||
pkt += sizeof(uint32_t); | ||
num_columns = CPY2(pkt); | ||
pkt += sizeof(uint16_t); | ||
num_params = CPY2(pkt); | ||
pkt += sizeof(uint16_t); | ||
pkt++; // reserved_1 | ||
warning_count = CPY2(pkt); | ||
pending_num_columns=num_columns; | ||
pending_num_params=num_params; | ||
} | ||
}; | ||
#endif // CLASS_MySQL_Prepared_Stmt_info_H |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
#ifndef CLASS_MySQL_encode_H | ||
#define CLASS_MySQL_encode_H | ||
#ifdef DEBUG | ||
void __dump_pkt(const char *func, unsigned char *_ptr, unsigned int len); | ||
#endif // DEBUG | ||
char *sha1_pass_hex(char *sha1_pass); | ||
double proxy_my_rnd(struct rand_struct *rand_st); | ||
void proxy_create_random_string(char *_to, uint length, struct rand_struct *rand_st); | ||
int write_encoded_length(unsigned char *p, uint64_t val, uint8_t len, char prefix); | ||
int write_encoded_length_and_string(unsigned char *p, uint64_t val, uint8_t len, char prefix, char *string); | ||
void proxy_compute_sha1_hash_multi(uint8_t *digest, const char *buf1, int len1, const char *buf2, int len2); | ||
void proxy_compute_sha1_hash(uint8_t *digest, const char *buf, int len); | ||
void proxy_compute_two_stage_sha1_hash(const char *password, size_t pass_len, uint8_t *hash_stage1, uint8_t *hash_stage2); | ||
void proxy_my_crypt(char *to, const uint8_t *s1, const uint8_t *s2, uint len); | ||
unsigned char decode_char(char x); | ||
void unhex_pass(uint8_t *out, const char *in); | ||
void proxy_scramble(char *to, const char *message, const char *password); | ||
bool proxy_scramble_sha1(char *pass_reply, const char *message, const char *sha1_sha1_pass, char *sha1_pass); | ||
unsigned int CPY3(unsigned char *ptr); | ||
uint64_t CPY8(unsigned char *ptr); | ||
uint8_t mysql_encode_length(uint64_t len, char *hd); | ||
#endif // CLASS_MySQL_encode_H |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.