spandsp
0.0.6
Main Page
Related Pages
Classes
Files
File List
File Members
private/v42.h
1
/*
2
* SpanDSP - a series of DSP components for telephony
3
*
4
* private/v42.h
5
*
6
* Written by Steve Underwood <steveu@coppice.org>
7
*
8
* Copyright (C) 2003 Steve Underwood
9
*
10
* All rights reserved.
11
*
12
* This program is free software; you can redistribute it and/or modify
13
* it under the terms of the GNU Lesser General Public License version 2.1,
14
* as published by the Free Software Foundation.
15
*
16
* This program is distributed in the hope that it will be useful,
17
* but WITHOUT ANY WARRANTY; without even the implied warranty of
18
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19
* GNU Lesser General Public License for more details.
20
*
21
* You should have received a copy of the GNU Lesser General Public
22
* License along with this program; if not, write to the Free Software
23
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
24
*/
25
26
#if !defined(_SPANDSP_PRIVATE_V42_H_)
27
#define _SPANDSP_PRIVATE_V42_H_
28
29
/*!
30
LAP-M descriptor. This defines the working state for a single instance of LAP-M.
31
*/
32
struct
lapm_state_s
33
{
34
int
handle;
35
hdlc_rx_state_t
hdlc_rx;
36
hdlc_tx_state_t
hdlc_tx;
37
38
v42_frame_handler_t iframe_receive;
39
void
*iframe_receive_user_data;
40
41
v42_status_func_t status_callback;
42
void
*status_callback_user_data;
43
44
int
state;
45
int
tx_waiting;
46
int
debug;
47
/*! TRUE if originator. FALSE if answerer */
48
int
we_are_originator
;
49
/*! Remote network type (unknown, answerer. originator) */
50
int
peer_is_originator
;
51
/*! Next N(S) for transmission */
52
int
next_tx_frame
;
53
/*! The last of our frames which the peer acknowledged */
54
int
last_frame_peer_acknowledged
;
55
/*! Next N(R) for reception */
56
int
next_expected_frame
;
57
/*! The last of the peer's frames which we acknowledged */
58
int
last_frame_we_acknowledged
;
59
/*! TRUE if we sent an I or S frame with the F-bit set */
60
int
solicit_f_bit
;
61
/*! Retransmission count */
62
int
retransmissions
;
63
/*! TRUE if peer is busy */
64
int
busy
;
65
66
/*! Acknowledgement timer */
67
int
t401_timer
;
68
/*! Reply delay timer - optional */
69
int
t402_timer
;
70
/*! Inactivity timer - optional */
71
int
t403_timer
;
72
/*! Maximum number of octets in an information field */
73
int
n401
;
74
/*! Window size */
75
int
window_size_k
;
76
77
lapm_frame_queue_t
*txqueue;
78
lapm_frame_queue_t
*tx_next;
79
lapm_frame_queue_t
*tx_last;
80
queue_state_t
*tx_queue;
81
82
span_sched_state_t
sched;
83
/*! \brief Error and flow logging control */
84
logging_state_t
logging
;
85
};
86
87
/*!
88
V.42 descriptor. This defines the working state for a single instance of V.42.
89
*/
90
struct
v42_state_s
91
{
92
/*! TRUE if we are the calling party, otherwise FALSE */
93
int
calling_party
;
94
/*! TRUE if we should detect whether the far end is V.42 capable. FALSE if we go
95
directly to protocol establishment */
96
int
detect
;
97
98
/*! Stage in negotiating V.42 support */
99
int
rx_negotiation_step
;
100
int
rxbits;
101
int
rxstream;
102
int
rxoks;
103
int
odp_seen;
104
int
txbits;
105
int
txstream;
106
int
txadps;
107
/*! The LAP.M context */
108
lapm_state_t
lapm
;
109
110
/*! V.42 support detection timer */
111
int
t400_timer
;
112
/*! \brief Error and flow logging control */
113
logging_state_t
logging
;
114
};
115
116
#endif
117
/*- End of file ------------------------------------------------------------*/
src
spandsp
private
v42.h
Generated on Sun Aug 4 2013 10:16:49 for spandsp by
1.8.4