trunk 20080912
[gitenigma.git] / include / lib / dvb / lowlevel / mpe.h
blob3264ca0a555110df62a1b5af4ad8c7410ba46c6b
2 /*
3 * MULTI PROTOCOL ENCAPSULATION
5 * Copyright (C) 1999 Thomas Mirlacher
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License, or
10 * (at your option) any later version.
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
21 * The author may be reached as dent@cosy.sbg.ac.at, or
22 * Thomas Mirlacher, Jakob-Haringerstr. 2, A-5020 Salzburg,
23 * Austria
25 *------------------------------------------------------------
29 #ifndef __MPE_H__
30 #define __MPE_H__
32 #include <sys/types.h>
34 #define MPE_TABLE_ID 0x3E
35 #define MPE_HEADER_SIZE 12
37 typedef struct mpe_header_struct {
38 u_char table_id : 8;
40 #if BYTE_ORDER == BIG_ENDIAN
41 u_char section_syntax_indicator : 1;
42 u_char private_indicator : 1;
43 u_char : 2;
44 u_char section_length_hi : 4;
45 #else
46 u_char section_length_hi : 4;
47 u_char : 2;
48 u_char private_indicator : 1;
49 u_char section_syntax_indicator : 1;
50 #endif
52 u_char section_length_lo : 8;
54 u_char MAC_address_6 : 8;
56 u_char MAC_address_5 : 8;
58 #if BYTE_ORDER == BIG_ENDIAN
59 u_char : 2;
60 u_char payload_scrambling_control: 2;
61 u_char address_scrambling_control: 2;
62 u_char LLC_SNAP_flag : 1;
63 u_char current_next_indicator : 1;
64 #else
65 u_char current_next_indicator : 1;
66 u_char LLC_SNAP_flag : 1;
67 u_char address_scrambling_control: 2;
68 u_char payload_scrambling_control: 2;
69 u_char : 2;
70 #endif
72 u_char section_number : 8;
74 u_char last_section_number : 8;
76 u_char MAC_address_4 : 8;
78 u_char MAC_address_3 : 8;
80 u_char MAC_address_2 : 8;
82 u_char MAC_address_1 : 8;
83 } mpe_hdr_t;
85 #endif