00001 /* 00002 * Copyright (c) 2005, Condor Engineering, Inc. 00003 * All rights reserved. 00004 * 00005 * Redistribution and use in source and binary forms, with or without 00006 * modification, are permitted provided that the following conditions 00007 * are met: 00008 * 00009 * 1. Redistributions of source code must retain the above copyright 00010 * notice, this list of conditions and the following disclaimer. 00011 * 2. Redistributions in binary form must reproduce the above copyright 00012 * notice, this list of conditions and the following disclaimer in the 00013 * documentation and/or other materials provided with the distribution. 00014 * 3. Neither the name of the Company (Condor Engineering, Inc) nor the 00015 * names of its contributors may be used to endorse or promote products 00016 * derived from this software without specific prior written permission. 00017 * 00018 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 00019 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 00020 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 00021 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 00022 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 00023 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 00024 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 00025 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 00026 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 00027 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 00028 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 00029 * 00030 */ 00031 00032 /* 00033 * Author: Gianluca Varenni <gianluca.varenni@gmail.com> 00034 */ 00035 00036 #ifndef __OPTION_3655965603483465443 00037 #define __OPTION_3655965603483465443 00038 00039 #include "ntar.h" 00040 00059 int write_option_string(ntar_option* option, void *buffer, size_t *buffer_size); 00060 00079 int write_option_raw(ntar_option *option, void *buffer, size_t *buffer_size, void* raw_data, u_int16 raw_data_size); 00080 00096 int write_option_uint64(ntar_option* option, void *buffer, size_t *buffer_size); 00097 00113 int write_option_uint32(ntar_option* option, void *buffer, size_t *buffer_size); 00114 00131 int write_null_option(void *buffer, size_t *buffer_size); 00132 00154 int read_option_string(option_header *oh, int byte_order, void* buffer, size_t *buffer_length); 00155 00177 int read_option_uint64(option_header *oh, int byte_order, void* buffer, size_t *buffer_length); 00178 00200 int read_option_uint32(option_header *oh, int byte_order, void* buffer, size_t *buffer_length); 00201 00224 int read_option_raw(option_header *oh, int byte_order, void* buffer, size_t *buffer_length); 00225 00230 #endif /*__OPTION_3655965603483465443*/
NTAR documentation. Copyright (c) 2004 - 2005 Condor Engineering, Inc. All rights reserved.