This file is indexed.

/usr/include/libdvbv5/desc_t2_delivery.h is in libdvbv5-dev 1.14.2-1.

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
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
/*
 * Copyright (c) 2013-2014 - Mauro Carvalho Chehab <m.chehab@samsung.com>
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU Lesser General Public License as published by
 * the Free Software Foundation version 2.1 of the License.
 *
 * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
 * Or, point your browser to http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
 *
 * Based on ETSI EN 300 468 V1.11.1 (2010-04)
 */

/**
 * @file desc_t2_delivery.h
 * @ingroup descriptors
 * @brief Provides the descriptors for the DVB-T2 delivery system descriptor
 * @copyright GNU Lesser General Public License version 2.1 (LGPLv2.1)
 * @author Mauro Carvalho Chehab
 *
 * @par Relevant specs
 * The descriptor described herein is defined at:
 * - ETSI EN 300 468 V1.11.1
 *
 * @par Bug Report
 * Please submit bug reports and patches to linux-media@vger.kernel.org
 */

#ifndef _T2_DELIVERY_H
#define _T2_DELIVERY_H

#include <libdvbv5/descriptors.h>

/**
 * @struct dvb_desc_t2_delivery_subcell_old
 * @ingroup descriptors
 * @brief Structure to describe transponder subcell extension and frequencies
 *
 * @param cell_id_extension	cell id extension
 * @param transposer_frequency	transposer frequency
 *
 * NOTE: This struct is deprecated and will never be filled.
 *       It is kept here just to avoid breaking ABI.
 *
 * All subcell transposer frequencies will be added to
 * dvb_desc_t2_delivery::centre_frequency array.
 */
struct dvb_desc_t2_delivery_subcell_old {
	uint8_t cell_id_extension;
	uint16_t transposer_frequency;		// Should be 32 bits, instead
} __attribute__((packed));


/**
 * @struct dvb_desc_t2_delivery_subcell
 * @ingroup descriptors
 * @brief Structure to describe transponder subcell extension and frequencies
 *
 * @param cell_id_extension	cell id extension
 * @param transposer_frequency	pointer to transposer frequency
 */
struct dvb_desc_t2_delivery_subcell {
	uint8_t cell_id_extension;
	uint32_t transposer_frequency;
} __attribute__((packed));


/**
 * @struct dvb_desc_t2_delivery_cell
 * @ingroup descriptors
 * @brief Structure to describe transponder cells
 *
 * @param cell_id		cell id extension
 * @param num_freqs		number of cell frequencies
 * @param centre_frequency	pointer to centre frequencies
 * @param subcel_length		number of subcells. May be zero
 * @param subcell		pointer to subcell array. May be NULL
 */
struct dvb_desc_t2_delivery_cell {
	uint16_t cell_id;
	int num_freqs;
	uint32_t *centre_frequency;
	uint8_t subcel_length;
	struct dvb_desc_t2_delivery_subcell *subcel;
} __attribute__((packed));

/**
 * @struct dvb_desc_t2_delivery
 * @ingroup descriptors
 * @brief Structure containing the T2 delivery system descriptor
 *
 * @param plp_id		data PLP id
 * @param system_id		T2 system id
 * @param SISO_MISO		SISO MISO
 * @param bandwidth		bandwidth
 * @param guard_interval	guard interval
 * @param transmission_mode	transmission mode
 * @param other_frequency_flag	other frequency flag
 * @param tfs_flag		tfs flag
 *
 * @param centre_frequency	centre frequency vector. It contains the full
 *				frequencies for all cells and subcells.
 * @param frequency_loop_length	size of the dvb_desc_t2_delivery::centre_frequency
 *				vector
 *
 * @param subcel_info_loop_length unused. Always 0
 * @param subcell		unused. Always NULL
 * @param num_cell		number of cells
 * @param cell			cell array. Contains per-cell and per-subcell
 *				pointers to the frequencies parsed.
 */
struct dvb_desc_t2_delivery {
	/* extended descriptor */

	uint8_t plp_id;
	uint16_t system_id;
	union {
		uint16_t bitfield;
		struct {
			uint16_t tfs_flag:1;
			uint16_t other_frequency_flag:1;
			uint16_t transmission_mode:3;
			uint16_t guard_interval:3;
			uint16_t reserved:2;
			uint16_t bandwidth:4;
			uint16_t SISO_MISO:2;
		} __attribute__((packed));
	} __attribute__((packed));

	uint32_t *centre_frequency;
	uint8_t frequency_loop_length;

	/* Unused, as the definitions here are incomplete. */
	uint8_t subcel_info_loop_length;
	struct dvb_desc_t2_delivery_subcell_old *subcell;

	/* Since version 1.13 */
	unsigned int num_cell;
	struct dvb_desc_t2_delivery_cell *cell;

} __attribute__((packed));

struct dvb_v5_fe_parms;

#ifdef __cplusplus
extern "C" {
#endif

/**
 * @brief Initializes and parses the T2 delivery system descriptor
 * @ingroup descriptors
 *
 * @param parms	struct dvb_v5_fe_parms pointer to the opened device
 * @param buf	buffer containing the descriptor's raw data
 * @param ext	struct dvb_extension_descriptor pointer
 * @param desc	pointer to struct dvb_desc to be allocated and filled
 *
 * This function allocates a the descriptor and fills the fields inside
 * the struct. It also makes sure that all fields will follow the CPU
 * endianness. Due to that, the content of the buffer may change.
 *
 * @return On success, it returns the size of the allocated struct.
 *	   A negative value indicates an error.
 */
int dvb_desc_t2_delivery_init(struct dvb_v5_fe_parms *parms,
			       const uint8_t *buf,
			       struct dvb_extension_descriptor *ext,
			       void *desc);

/**
 * @brief Prints the content of the T2 delivery system descriptor
 * @ingroup descriptors
 *
 * @param parms	struct dvb_v5_fe_parms pointer to the opened device
 * @param ext	struct dvb_extension_descriptor pointer
 * @param desc	pointer to struct dvb_desc
 */
void dvb_desc_t2_delivery_print(struct dvb_v5_fe_parms *parms,
				const struct dvb_extension_descriptor *ext,
				const void *desc);

/**
 * @brief Frees all data allocated by the T2 delivery system descriptor
 * @ingroup descriptors
 *
 * @param desc pointer to struct dvb_desc to be freed
 */
void dvb_desc_t2_delivery_free(const void *desc);

/**
 * @brief converts from internal representation into bandwidth in Hz
 */
extern const unsigned dvbt2_bw[];

/**
 * @brief converts from internal representation into enum fe_guard_interval,
 * as defined at DVBv5 API.
 */
extern const uint32_t dvbt2_interval[];

/**
 * @brief converts from the descriptor's transmission mode into
 *	  enum fe_transmit_mode, as defined by DVBv5 API.
 */
extern const unsigned dvbt2_transmission_mode[];

/**
 * @brief converts from internal representation to string the SISO_MISO
 *	  field of dvb_desc_t2_delivery:SISO_MISO field.
 */
const char *siso_miso[4];

#ifdef __cplusplus
}
#endif

#endif