00001 /* 00002 * Copyright (c) 2009 Thierry FOURNIER 00003 * 00004 * This file is part of MySAC. 00005 * 00006 * MySAC is free software: you can redistribute it and/or modify 00007 * it under the terms of the GNU Lesser General Public License as published by 00008 * the Free Software Foundation, either version 3 of the License 00009 * 00010 * MySAC is distributed in the hope that it will be useful, 00011 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00012 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00013 * GNU Lesser General Public License for more details. 00014 * 00015 * You should have received a copy of the GNU Lesser General Public License 00016 * along with MySAC. If not, see <http://www.gnu.org/licenses/>. 00017 */ 00018 00019 /** @file */ 00020 00021 #ifndef __MYSAC_DECODE_PAQUET__ 00022 #define __MYSAC_DECODE_PAQUET__ 00023 00024 #include "mysac.h" 00025 00026 /** 00027 * mysac_decode_field decode field header packet 00028 * 00029 * @param buf id the buffer containing packet 00030 * the strings stored into col, are allocated into 00031 * this buffer 00032 * @param len is then length of the packet 00033 * @param col is valid col struct space for storing pointers 00034 * and values 00035 * 00036 * @return the len of the buffer used for storing data or 00037 * -1 if the packet is corrupted 00038 */ 00039 int mysac_decode_field(char *buf, int len, MYSQL_FIELD *col); 00040 00041 #endif