trunk 20080912
[gitenigma.git] / include / lib / dvb / lowlevel / ca.h
blobaea85b82a2cf2e59baf08f5675213a72d80c3fad
1 /*
2 * TIME DESCRIPTION TABLE
4 * Copyright (C) 2000 Ralph Metzler
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
22 #ifndef __CA_H__
23 #define __CA_H__
25 #include <sys/types.h>
27 #define CA_LEN 8
29 typedef struct {
30 u_char table_id : 8;
32 #if BYTE_ORDER == BIG_ENDIAN
33 u_char section_syntax_indicator : 1;
34 u_char zero : 1;
35 u_char : 2;
36 u_char section_length_hi : 4;
37 #else
38 u_char section_length_hi : 4;
39 u_char : 2;
40 u_char zero : 1;
41 u_char section_syntax_indicator : 1;
42 #endif
44 u_char section_length_lo : 8;
46 u_char reserved_1 : 8;
47 u_char reserved_2 : 8;
49 #if BYTE_ORDER == BIG_ENDIAN
50 u_char : 2;
51 u_char version_number : 5;
52 u_char current_next_indicator : 1;
53 #else
54 u_char current_next_indicator : 1;
55 u_char version_number : 5;
56 u_char : 2;
57 #endif
59 u_char section_number : 8;
61 u_char last_section_number : 8;
63 } ca_t;
67 #define CA_MESSAGE_LEN 3
69 typedef struct {
70 u_char table_id : 8;
72 #if BYTE_ORDER == BIG_ENDIAN
73 u_char section_syntax_indicator : 1;
74 u_char DVB_reserved : 1;
75 u_char ISO_reserved : 2;
76 u_char section_length_hi : 4;
77 #else
78 u_char section_length_hi : 4;
79 u_char ISO_reserved : 2;
80 u_char DVB_reserved : 1;
81 u_char section_syntax_indicator : 1;
82 #endif
84 u_char section_length_lo : 8;
86 // CA_data_bytes
87 } ca_message_t;
90 #define CA_DESCR_LEN 6
92 typedef struct {
93 u_char descriptor_tag : 8;
94 u_char descriptor_length : 8;
96 u_char CA_system_ID_hi : 8;
97 u_char CA_system_ID_lo : 8;
99 #if BYTE_ORDER == BIG_ENDIAN
100 u_char : 3;
101 u_char CA_PID_hi : 5;
102 #else
103 u_char CA_PID_hi : 5;
104 u_char : 3;
105 #endif
107 u_char CA_PID_lo : 8;
109 } ca_descr_t;
111 #endif