ROHC compression/decompression library
|
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 00024 #ifndef FEEDBACK_H 00025 #define FEEDBACK_H 00026 00027 #include <string.h> 00028 00029 #include "sdvl.h" 00030 #include "crc.h" 00031 00032 00034 #define OPT_TYPE_CRC 1 00035 00036 #define OPT_TYPE_REJECT 2 00037 00038 #define OPT_TYPE_SN_NOT_VALID 3 00039 00040 #define OPT_TYPE_SN 4 00041 00042 #define OPT_TYPE_CLOCK 5 00043 00044 #define OPT_TYPE_JITTER 6 00045 00046 #define OPT_TYPE_LOSS 7 00047 00048 00050 #define ACKTYPE_ACK 0 00051 00052 #define ACKTYPE_NACK 1 00053 00054 #define ACKTYPE_STATIC_NACK 2 00055 00056 00058 #define NO_CRC 0 00059 00060 #define WITH_CRC 1 00061 00062 00066 struct d_feedback 00067 { 00069 int type; 00071 char data[30]; 00073 int size; 00074 }; 00075 00076 00077 /* 00078 * Prototypes of public functions. 00079 */ 00080 00081 int f_feedback1(int sn, struct d_feedback *feedback); 00082 00083 void f_feedback2(int acktype, int mode, int sn, struct d_feedback *feedback); 00084 00085 int f_add_option(struct d_feedback *feedback, int opt_type, 00086 unsigned char *data); 00087 00088 unsigned char * f_wrap_feedback(struct d_feedback *feedback, int cid, 00089 int largecidUsed, int with_crc, 00090 int *final_size); 00091 00092 00093 #endif 00094