mySQL 5.0.11 sources for tomato
[tomato.git] / release / src / router / mysql / server-tools / instance-manager / protocol.h
blob0cc752aaa3b4987ae421091da8a7ff151f3bdaef
1 /* Copyright (c) 2004-2007 MySQL AB
3 This program is free software; you can redistribute it and/or modify
4 it under the terms of the GNU General Public License as published by
5 the Free Software Foundation; version 2 of the License.
7 This program is distributed in the hope that it will be useful,
8 but WITHOUT ANY WARRANTY; without even the implied warranty of
9 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10 GNU General Public License for more details.
12 You should have received a copy of the GNU General Public License
13 along with this program; if not, write to the Free Software
14 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA */
16 #ifndef INCLUDES_MYSQL_INSTANCE_MANAGER_PROTOCOL_H
17 #define INCLUDES_MYSQL_INSTANCE_MANAGER_PROTOCOL_H
19 #include "buffer.h"
21 #include <my_list.h>
23 /* default field length to be used in various field-realted functions */
24 enum { DEFAULT_FIELD_LENGTH= 20 };
26 struct st_net;
28 int net_send_ok(struct st_net *net, unsigned long connection_id,
29 const char *message);
31 int net_send_error(struct st_net *net, unsigned sql_errno);
33 int net_send_error_323(struct st_net *net, unsigned sql_errno);
35 int send_fields(struct st_net *net, LIST *fields);
37 char *net_store_length(char *pkg, uint length);
39 int store_to_protocol_packet(Buffer *buf, const char *string,
40 size_t *position);
42 int store_to_protocol_packet(Buffer *buf, const char *string, size_t *position,
43 size_t string_len);
45 int send_eof(struct st_net *net);
47 #endif /* INCLUDES_MYSQL_INSTANCE_MANAGER_PROTOCOL_H */