1 /*
2 * Copyright (c) 2011-2012 - Mauro Carvalho Chehab
3 * Copyright (c) 2012 - Andre Roth <neolynx@gmail.com>
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU Lesser General Public License as published by
7 * the Free Software Foundation version 2.1 of the License.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU Lesser General Public License for more details.
13 *
14 * You should have received a copy of the GNU Lesser General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
17 * Or, point your browser to http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
18 *
19 */
20
21 #include <libdvbv5/header.h>
22 #include <libdvbv5/descriptors.h>
23 #include <libdvbv5/dvb-fe.h>
24
25 #if __GNUC__ >= 9
26 #pragma GCC diagnostic ignored "-Waddress-of-packed-member"
27 #endif
28
dvb_table_header_init(struct dvb_table_header * t)29 void dvb_table_header_init(struct dvb_table_header *t)
30 {
31 bswap16(t->bitfield);
32 bswap16(t->id);
33 }
34
dvb_table_header_print(struct dvb_v5_fe_parms * parms,const struct dvb_table_header * t)35 void dvb_table_header_print(struct dvb_v5_fe_parms *parms, const struct dvb_table_header *t)
36 {
37 dvb_loginfo("| table_id 0x%02x", t->table_id);
38 dvb_loginfo("| section_length %d", t->section_length);
39 dvb_loginfo("| one %d", t->one);
40 dvb_loginfo("| zero %d", t->zero);
41 dvb_loginfo("| syntax %d", t->syntax);
42 dvb_loginfo("| transport_stream_id %d", t->id);
43 dvb_loginfo("| current_next %d", t->current_next);
44 dvb_loginfo("| version %d", t->version);
45 dvb_loginfo("| one2 %d", t->one2);
46 dvb_loginfo("| section_number %d", t->section_id);
47 dvb_loginfo("| last_section_number %d", t->last_section);
48 }
49
50