spandsp 3.0.0
|
#include <stdio.h>
#include <stdlib.h>
#include <inttypes.h>
#include <string.h>
#include <errno.h>
#include <fcntl.h>
#include <ctype.h>
#include "spandsp/stdbool.h"
#include <assert.h>
#include "spandsp/telephony.h"
#include "spandsp/alloc.h"
#include "spandsp/unaligned.h"
#include "spandsp/logging.h"
#include "spandsp/bit_operations.h"
#include "spandsp/async.h"
#include "spandsp/hdlc.h"
#include "spandsp/v42.h"
#include "spandsp/private/logging.h"
#include "spandsp/private/hdlc.h"
#include "spandsp/private/v42.h"
Macros | |
#define | T_400 750 |
#define | T_401 1000 |
#define | T_402 1000 |
#define | T_403 10000 |
#define | LAPM_DLCI_DTE_TO_DTE 0 |
#define | LAPM_DLCI_LAYER2_MANAGEMENT 63 |
#define | elements(a) |
#define | LAPM_FRAMETYPE_MASK 0x03 |
#define | LAPM_S_PF 0x01 |
#define | LAPM_U_PF 0x10 |
#define | FI_GENERAL 0x82 |
#define | GI_PARAM_NEGOTIATION 0x80 |
#define | GI_PRIVATE_NEGOTIATION 0xF0 |
#define | GI_USER_DATA 0xFF |
#define | LAPM_DLCI_DTE_TO_DTE 0 |
#define | LAPM_DLCI_LAYER2_MANAGEMENT 63 |
Functions | |
const char * | lapm_status_to_str (int status) |
void | lapm_receive (void *user_data, const uint8_t *frame, int len, int ok) |
void | v42_stop (v42_state_t *ss) |
void | v42_rx_bit (void *user_data, int bit) |
int | v42_tx_bit (void *user_data) |
bool | v42_set_local_busy_status (v42_state_t *s, bool busy) |
bool | v42_get_far_busy_status (v42_state_t *s) |
logging_state_t * | v42_get_logging_state (v42_state_t *s) |
Get the logging context associated with a V.42 context. | |
void | v42_set_status_callback (v42_state_t *s, span_modem_status_func_t status_handler, void *user_data) |
void | v42_restart (v42_state_t *s) |
v42_state_t * | v42_init (v42_state_t *ss, bool calling_party, bool detect, span_get_msg_func_t iframe_get, span_put_msg_func_t iframe_put, void *user_data) |
int | v42_release (v42_state_t *s) |
int | v42_free (v42_state_t *s) |
#define elements | ( | a | ) |
int v42_free | ( | v42_state_t * | s | ) |
bool v42_get_far_busy_status | ( | v42_state_t * | s | ) |
Get the busy status of the far end of a V.42 context.
s | The V.42 context. |
logging_state_t * v42_get_logging_state | ( | v42_state_t * | s | ) |
Get the logging context associated with a V.42 context.
Get the logging context associated with a V.42 context.
s | The V.42 context. |
References v42_state_s::logging.
v42_state_t * v42_init | ( | v42_state_t * | s, |
bool | calling_party, | ||
bool | detect, | ||
span_get_msg_func_t | iframe_get, | ||
span_put_msg_func_t | iframe_put, | ||
void * | user_data ) |
Initialise a V.42 context.
s | The V.42 context. |
calling_party | True if caller mode, else answerer mode. |
detect | True to perform the V.42 detection, else go straight into LAP.M |
iframe_get | A callback function to handle received frames of data. |
iframe_put | A callback function to get frames of data for transmission. |
user_data | An opaque pointer passed to the frame handler routines. |
References v42_state_s::calling_party, v42_state_s::detect, v42_state_s::logging, and v42_state_s::tx_bit_rate.
int v42_release | ( | v42_state_t * | s | ) |
void v42_restart | ( | v42_state_t * | s | ) |
Restart a V.42 context.
s | The V.42 context. |
References v42_state_s::detect, hdlc_rx_init(), hdlc_tx_init(), and v42_negotiation_t::rx_negotiation_step.
bool v42_set_local_busy_status | ( | v42_state_t * | s, |
bool | busy ) |
Set the busy status of the local end of a V.42 context.
s | The V.42 context. |
busy | The new local end busy status. |