spandsp  0.0.6
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 */
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 */
49  /*! Remote network type (unknown, answerer. originator) */
51  /*! Next N(S) for transmission */
53  /*! The last of our frames which the peer acknowledged */
55  /*! Next N(R) for reception */
57  /*! The last of the peer's frames which we acknowledged */
59  /*! TRUE if we sent an I or S frame with the F-bit set */
61  /*! Retransmission count */
63  /*! TRUE if peer is busy */
64  int busy;
65 
66  /*! Acknowledgement timer */
68  /*! Reply delay timer - optional */
70  /*! Inactivity timer - optional */
72  /*! Maximum number of octets in an information field */
73  int n401;
74  /*! Window size */
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 */
85 };
86 
87 /*!
88  V.42 descriptor. This defines the working state for a single instance of V.42.
89 */
91 {
92  /*! TRUE if we are the calling party, otherwise FALSE */
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 */
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 */
109 
110  /*! V.42 support detection timer */
112  /*! \brief Error and flow logging control */
114 };
115 
116 #endif
117 /*- End of file ------------------------------------------------------------*/
int n401
Definition: private/v42.h:73
Definition: private/queue.h:33
int calling_party
Definition: private/v42.h:93
int t402_timer
Definition: private/v42.h:69
int last_frame_peer_acknowledged
Definition: private/v42.h:54
Definition: private/hdlc.h:91
int retransmissions
Definition: private/v42.h:62
int busy
Definition: private/v42.h:64
Definition: private/v42.h:32
int window_size_k
Definition: private/v42.h:75
int t401_timer
Definition: private/v42.h:67
int t400_timer
Definition: private/v42.h:111
int detect
Definition: private/v42.h:96
int last_frame_we_acknowledged
Definition: private/v42.h:58
lapm_state_t lapm
Definition: private/v42.h:108
logging_state_t logging
Error and flow logging control.
Definition: private/v42.h:84
int rx_negotiation_step
Definition: private/v42.h:99
int solicit_f_bit
Definition: private/v42.h:60
int next_expected_frame
Definition: private/v42.h:56
logging_state_t logging
Error and flow logging control.
Definition: private/v42.h:113
int we_are_originator
Definition: private/v42.h:48
Definition: private/v42.h:90
Definition: private/logging.h:33
Definition: v42.h:54
Definition: private/hdlc.h:32
int t403_timer
Definition: private/v42.h:71
int peer_is_originator
Definition: private/v42.h:50
Definition: private/schedule.h:38
int next_tx_frame
Definition: private/v42.h:52