OSDN Git Service

commit local dev ver
[rec10/rec10-git.git] / epgdump / dsmcc.h
1 #ifndef DSMCC_H
2 #define DSMCC_H 1
3
4 #include <stdio.h>
5 #include <stdlib.h>
6
7 #include "sdt.h"
8 #include "util.h"
9 #include "ts_ctl.h"
10
11 typedef struct _DSMCChead {
12         int table_id;
13         int section_syntax_indicator;
14         int complement_indicator;
15         int reserved1;
16         int section_length;
17         int table_id_extension;
18         int reserved2;
19         int version_number;
20         int current_next_indicator;
21         int section_number;
22         int last_section_number;
23 } DSMCChead;
24 /*
25 typedef struct _DSMCCmsghead {
26         int  protocolDiscriminator;
27         int  dsmccType;
28         int  messageId;
29         int  transaction_id;
30         int  reserved;
31         int  adaptationLength;
32         int  messageLength;
33         void *dsmccAdaptationHeader;
34 } DSMCCmsghead;
35 */
36 typedef struct _DSMCCbodyDIIModule {
37         int  moduleId;
38         int  moduleSize;
39         int  moduleVersion;
40         int  moduleInfoLength;
41         unsigned char *moduleInfo;
42 } DSMCCbodyDIIModule;
43
44 typedef struct _DSMCCbodyDII {
45         int  protocolDiscriminator;
46         int  dsmccType;
47         int  messageId;
48         int  transaction_id;
49         int  reserved;
50         int  adaptationLength;
51         int  messageLength;
52         void *dsmccAdaptationHeader;
53
54         int  downloadId;
55         int  blockSize;
56         int  windowSize;
57         int  ackPeriod;
58         int  tCDownloadWindow;
59         int  tCDownloadScenario;
60         int  compatibilityDescriptor;
61         int  numberOfModules;
62         void *modules;
63         int  privateDataLength;
64         void *privateData;
65 } DSMCCbodyDII;
66
67 typedef struct _DSMCCbodyDDB {
68         int  protocolDiscriminator;
69         int  dsmccType;
70         int  messageId;
71         unsigned int  downloadId;
72         int  reserved1;
73         int  adaptationLength;
74         int  messageLength;
75         void *dsmccAdaptationHeader;
76
77         int  moduleId;
78         int  moduleVersion;
79         int  reserved2;
80         int  blockNumber;
81         void *blockData;
82 } DSMCCbodyDDB;
83
84 #ifdef __cplusplus
85 extern "C"{
86 #endif /* __cplusplus */
87
88         int parseDSMCChead(unsigned char *data, DSMCChead *h);
89         int parseDSMCCbodyDDB(unsigned char *data, DSMCCbodyDDB *dsmbddb);
90         void dumpDSMCC(unsigned char *ptr, STATION *station, int station_count);
91
92 #ifdef __cplusplus
93 }
94 #endif /* __cplusplus */
95
96 #endif
97