This file is indexed.

/usr/include/spandsp/private/v42.h is in libspandsp-dev 0.0.6-2+b2.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
/*
 * SpanDSP - a series of DSP components for telephony
 *
 * private/v42.h
 *
 * Written by Steve Underwood <steveu@coppice.org>
 *
 * Copyright (C) 2003, 2011 Steve Underwood
 *
 * All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU Lesser General Public License version 2.1,
 * as published by the Free Software Foundation.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this program; if not, write to the Free Software
 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 */

#if !defined(_SPANDSP_PRIVATE_V42_H_)
#define _SPANDSP_PRIVATE_V42_H_

/*! Max retries (9.2.2) */
#define V42_DEFAULT_N_400               5
/*! Default for max octets in an information field (9.2.3) */
#define V42_DEFAULT_N_401               128
/*! Maximum supported value for max octets in an information field */
#define V42_MAX_N_401                   128
/*! Default window size (k) (9.2.4) */
#define V42_DEFAULT_WINDOW_SIZE_K       15
/*! Maximum supported window size (k) */
#define V42_MAX_WINDOW_SIZE_K           15

/*! The number of info frames to allocate */
#define V42_INFO_FRAMES                 (V42_MAX_WINDOW_SIZE_K + 1)
/*! The number of control frames to allocate */
#define V42_CTRL_FRAMES                 8

typedef struct
{
    /* V.42 LAP.M parameters */
    uint8_t v42_tx_window_size_k;
    uint8_t v42_rx_window_size_k;
    uint16_t v42_tx_n401;
    uint16_t v42_rx_n401;

    /* V.42bis compressor parameters */
    uint8_t comp;
    int comp_dict_size;
    int comp_max_string;
} v42_config_parameters_t;

typedef struct frame_s
{
    int len;
    uint8_t buf[4 + V42_MAX_N_401];
} v42_frame_t;

/*!
    LAP-M descriptor. This defines the working state for a single instance of LAP-M.
*/
typedef struct
{
    get_msg_func_t iframe_get;
    void *iframe_get_user_data;

    put_msg_func_t iframe_put;
    void *iframe_put_user_data;

    modem_status_func_t status_handler;
    void *status_user_data;

    hdlc_rx_state_t hdlc_rx;
    hdlc_tx_state_t hdlc_tx;

    /*! Negotiated values for the window and maximum info sizes */
    uint8_t tx_window_size_k;
    uint8_t rx_window_size_k;
    uint16_t tx_n401;
    uint16_t rx_n401;

    uint8_t cmd_addr;
    uint8_t rsp_addr;
    uint8_t vs;
    uint8_t va;
    uint8_t vr;
    int state;
    int configuring;
    int local_busy;
    int far_busy;
    int rejected;
    int retry_count;

    /* The control frame buffer, and its pointers */
    int ctrl_put;
    int ctrl_get;
    v42_frame_t ctrl_buf[V42_CTRL_FRAMES];

    /* The info frame buffer, and its pointers */
    int info_put;
    int info_get;
    int info_acked;
    v42_frame_t info_buf[V42_INFO_FRAMES];

    void (*packer_process)(v42_state_t *m, int bits);
} lapm_state_t;

/*! V.42 support negotiation parameters */
typedef struct
{
    /*! Stage in negotiating V.42 support */
    int rx_negotiation_step;
    int rxbits;
    int rxstream;
    int rxoks;
    int odp_seen;
    int txbits;
    int txstream;
    int txadps;
} v42_negotiation_t;

/*!
    V.42 descriptor. This defines the working state for a single
    instance of a V.42 error corrector.
*/
struct v42_state_s
{
    /*! TRUE if we are the calling party, otherwise FALSE. */
    int calling_party;
    /*! TRUE if we should detect whether the far end is V.42 capable. FALSE if we go
        directly to protocol establishment. */
    int detect;

    /*! The bit rate, used to time events */
    int tx_bit_rate;

    v42_config_parameters_t config;
    v42_negotiation_t neg;
    lapm_state_t lapm;

    int bit_timer;
    void (*bit_timer_func)(v42_state_t *m);

    /*! \brief Error and flow logging control */
    logging_state_t logging;
};

#endif
/*- End of file ------------------------------------------------------------*/