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 |
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA |
29 |
*/ |
30 |
#ifndef _D_UDP_LITE_H |
31 |
#define _D_UDP_LITE_H |
32 |
|
33 |
#include "rohc.h" |
34 |
#include "decomp.h" |
35 |
#include "d_util.h" |
36 |
|
37 |
|
38 |
struct s_udp_lite_change |
39 |
{ |
40 |
int rnd; |
41 |
int nbo; |
42 |
|
43 |
struct iphdr ip; |
44 |
struct udphdr udp; |
45 |
}; |
46 |
|
47 |
struct s_udp_lite_profile_data |
48 |
{ |
49 |
struct s_udp_lite_change * last1; |
50 |
struct s_udp_lite_change * last2; |
51 |
struct s_udp_lite_change * active1; |
52 |
struct s_udp_lite_change * active2; |
53 |
|
54 |
struct sd_lsb_decode sn; |
55 |
struct sd_ip_id_decode ip_id1; |
56 |
struct sd_ip_id_decode ip_id2; |
57 |
|
58 |
int multiple_ip; |
59 |
|
60 |
// udp-lite checksum coverage field present or not |
61 |
int coverage_present; |
62 |
|
63 |
// if inferred then udp-lite == udp otherwise use |
64 |
// the value stored i udphdr length field which is |
65 |
// supposed to be the checksum coverage field in |
66 |
// udp-lite. |
67 |
// this matters only when coverage_present == 0 |
68 |
int coverage_inferred; |
69 |
|
70 |
int ce_packet; |
71 |
int package_type; |
72 |
|
73 |
int counter; |
74 |
int last_packet_time; //the time of the last crc-approved packet |
75 |
int current_packet_time; //the time of the current packet without crc-test yet |
76 |
int inter_arrival_time; //a average inter-packet time of the last few packets, |
77 |
}; |
78 |
|
79 |
struct s_profile * udp_lite_profile_create(void); |
80 |
|
81 |
#endif |