Main Page   Class Hierarchy   Compound List   File List   Compound Members  

BufferUtils.hpp

00001 /*
00002  *  This program is free software; you can redistribute it and/or modify
00003  *  it under the terms of the GNU General Public License as published by
00004  *  the Free Software Foundation; either version 2 of the License, or
00005  *  (at your option) any later version.
00006  *
00007  *  This program is distributed in the hope that it will be useful,
00008  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
00009  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00010  *  GNU General Public License for more details.
00011  *
00012  *  You should have received a copy of the GNU General Public License
00013  *  along with this program; if not, write to the Free Software
00014  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00015  *
00016  * (c)Copyright 2006 Hewlett-Packard Development Company, LP.
00017  *
00018  */
00019 
00020 #ifndef _BUFFER_UTILS_H
00021 #define _BUFFER_UTILS_H
00022 
00023 #include <cstdlib>
00024 
00025 #include "integer_t.hpp" // for strtoll 
00026 
00027 void convert_bin_to_hexa_char(unsigned char*P_buf, size_t P_size, char* P_res);
00028 
00029 unsigned char *convert_hexa_char_to_bin(char* P_data, size_t *P_bufSize);
00030 
00031 T_UnsignedInteger32 convert_bin_network_to_ul(unsigned char*P_buf, size_t P_size) ;
00032 
00033 void convert_ul_to_bin_network(unsigned char      *P_buf, 
00034                                size_t              P_size, 
00035                                T_UnsignedInteger32 P_val) ;
00036 
00037 void convert_l_to_bin_network(unsigned char   *P_buf, 
00038                               size_t           P_size, 
00039                               T_Integer32      P_val) ;
00040 
00041 T_Integer32 convert_bin_network_to_l(unsigned char*P_buf, 
00042                                      size_t P_size);
00043 
00044 T_UnsignedInteger32 convert_char_to_ul (char * P_data) ;
00045 
00046 
00047 void pretty_binary_buffer (unsigned char*P_buf, size_t P_size, char* P_res);
00048 
00049 void pretty_binary_printable_buffer (unsigned char*P_buf, size_t P_size, char* P_res, char *P_print) ;
00050 
00051 T_UnsignedInteger64 convert_bin_network_to_ull(unsigned char*P_buf, 
00052                                                size_t P_size);
00053 
00054 T_Integer64 convert_bin_network_to_ll(unsigned char*P_buf, 
00055                                       size_t P_size);
00056 
00057 void convert_ull_to_bin_network(unsigned char      *P_buf, 
00058                                 size_t              P_size, 
00059                                 T_UnsignedInteger64 P_val) ;
00060 
00061 void convert_ll_to_bin_network(unsigned char   *P_buf, 
00062                                size_t           P_size, 
00063                                T_Integer64      P_val) ;
00064 
00065 #endif

Generated on Wed Mar 7 14:44:49 2007 for Seagull by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002