1 |
pcg |
1.1 |
/* |
2 |
|
|
ROHC Project 2003 at Lulea University of Technology, Sweden. |
3 |
|
|
Authors: Andreas Vernersson <andver-8@student.luth.se> |
4 |
|
|
Daniel Pettersson <danpet-7@student.luth.se> |
5 |
|
|
Erik Soderstrom <soderstrom@yahoo.com> |
6 |
|
|
Fredrik Lindstrom <frelin-9@student.luth.se> |
7 |
|
|
Johan Stenmark <johste-8@student.luth.se> |
8 |
|
|
Martin Juhlin <juhlin@users.sourceforge.net> |
9 |
|
|
Mikael Larsson <larmik-9@student.luth.se> |
10 |
|
|
Robert Maxe <robmax-1@student.luth.se> |
11 |
|
|
|
12 |
|
|
Copyright (C) 2003 Andreas Vernersson, Daniel Pettersson, |
13 |
|
|
Erik Soderström, Fredrik Lindström, Johan Stenmark, |
14 |
|
|
Martin Juhlin, Mikael Larsson, Robert Maxe. |
15 |
|
|
|
16 |
|
|
This program is free software; you can redistribute it and/or modify |
17 |
|
|
it under the terms of the GNU General Public License as published by |
18 |
|
|
the Free Software Foundation; either version 2 of the License, or |
19 |
|
|
(at your option) any later version. |
20 |
|
|
|
21 |
|
|
This program is distributed in the hope that it will be useful, |
22 |
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of |
23 |
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
24 |
|
|
GNU General Public License for more details. |
25 |
|
|
|
26 |
|
|
You should have received a copy of the GNU General Public License |
27 |
|
|
along with this program; if not, write to the Free Software |
28 |
pcg |
1.2 |
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA |
29 |
pcg |
1.1 |
*/ |
30 |
|
|
//---------------------------------------------------------------------------------------------------------------------------------- |
31 |
|
|
#ifndef __FEEDBACK_H__ |
32 |
|
|
#define __FEEDBACK_H__ |
33 |
|
|
//---------------------------------------------------------------------------------------------------------------------------------- |
34 |
|
|
#define OPT_TYPE_CRC 1 |
35 |
|
|
#define OPT_TYPE_REJECT 2 |
36 |
|
|
#define OPT_TYPE_SN_NOT_VALID 3 |
37 |
|
|
#define OPT_TYPE_SN 4 |
38 |
|
|
#define OPT_TYPE_CLOCK 5 // not used |
39 |
|
|
#define OPT_TYPE_JITTER 6 // not used |
40 |
|
|
#define OPT_TYPE_LOSS 7 |
41 |
|
|
//---------------------------------------------------------------------------------------------------------------------------------- |
42 |
|
|
#define ACKTYPE_ACK 0 |
43 |
|
|
#define ACKTYPE_NACK 1 |
44 |
|
|
#define ACKTYPE_STATIC_NACK 2 |
45 |
|
|
//---------------------------------------------------------------------------------------------------------------------------------- |
46 |
|
|
#define NO_CRC 0 |
47 |
|
|
#define WITH_CRC 1 |
48 |
|
|
//---------------------------------------------------------------------------------------------------------------------------------- |
49 |
|
|
#define false 0 |
50 |
|
|
#define true 1 |
51 |
|
|
//---------------------------------------------------------------------------------------------------------------------------------- |
52 |
|
|
typedef int bool; |
53 |
|
|
//---------------------------------------------------------------------------------------------------------------------------------- |
54 |
|
|
/* |
55 |
|
|
#define CT_MODEM 56 |
56 |
|
|
#define CT_ISDN 2 |
57 |
|
|
#define CT_XDSL 3 |
58 |
|
|
#define CT_T1 10000 |
59 |
|
|
#define CT_T3 100000 |
60 |
|
|
*/ |
61 |
|
|
//---------------------------------------------------------------------------------------------------------------------------------- |
62 |
|
|
struct sd_feedback |
63 |
|
|
{ |
64 |
|
|
int feedback_type; |
65 |
|
|
char feedback[30]; |
66 |
|
|
int size; |
67 |
|
|
}; |
68 |
|
|
//---------------------------------------------------------------------------------------------------------------------------------- |
69 |
|
|
// PUBLIC: |
70 |
|
|
//int f_feedback(int acktype, int mode, int sn, struct sd_feedback * f); |
71 |
|
|
bool f_feedback1(int sn, struct sd_feedback * f); |
72 |
|
|
void f_feedback2(int acktype, int mode, int sn, struct sd_feedback * f); |
73 |
|
|
bool f_add_option(struct sd_feedback * feedback, int opt_type, char * data); |
74 |
|
|
char * f_wrap_feedback(struct sd_feedback * f, int cid, int largecidUsed, int with_crc, int * final_size); |
75 |
|
|
// PRIVATE: |
76 |
|
|
bool f_append_cid(struct sd_feedback * f, int cid, int largecidUsed); |
77 |
|
|
//---------------------------------------------------------------------------------------------------------------------------------- |
78 |
|
|
#endif |
79 |
|
|
//---------------------------------------------------------------------------------------------------------------------------------- |