Browse Source

remove old sources minisatip

mango 1 year ago
parent
commit
68654c07a4
71 changed files with 0 additions and 23265 deletions
  1. 0
    5
      m/minisatip-0.5.69-476-gbd493b1/.gitignore
  2. 0
    1
      m/minisatip-0.5.69-476-gbd493b1/.pc/.quilt_patches
  3. 0
    1
      m/minisatip-0.5.69-476-gbd493b1/.pc/.quilt_series
  4. 0
    1
      m/minisatip-0.5.69-476-gbd493b1/.pc/.version
  5. 0
    0
      m/minisatip-0.5.69-476-gbd493b1/.pc/applied-patches
  6. 0
    98
      m/minisatip-0.5.69-476-gbd493b1/Makefile.in
  7. 0
    204
      m/minisatip-0.5.69-476-gbd493b1/README.md
  8. 0
    1857
      m/minisatip-0.5.69-476-gbd493b1/adapter.c
  9. 0
    160
      m/minisatip-0.5.69-476-gbd493b1/adapter.h
  10. 0
    90
      m/minisatip-0.5.69-476-gbd493b1/aes.c
  11. 0
    656
      m/minisatip-0.5.69-476-gbd493b1/ca.c
  12. 0
    10
      m/minisatip-0.5.69-476-gbd493b1/ca.h
  13. 0
    5372
      m/minisatip-0.5.69-476-gbd493b1/configure
  14. 0
    191
      m/minisatip-0.5.69-476-gbd493b1/configure.ac
  15. 0
    85
      m/minisatip-0.5.69-476-gbd493b1/csa.c
  16. 0
    63
      m/minisatip-0.5.69-476-gbd493b1/debian/README.Debian
  17. 0
    2122
      m/minisatip-0.5.69-476-gbd493b1/debian/changelog
  18. 0
    1
      m/minisatip-0.5.69-476-gbd493b1/debian/compat
  19. 0
    13
      m/minisatip-0.5.69-476-gbd493b1/debian/control
  20. 0
    36
      m/minisatip-0.5.69-476-gbd493b1/debian/copyright
  21. 0
    103
      m/minisatip-0.5.69-476-gbd493b1/debian/default/minisatip
  22. 0
    1
      m/minisatip-0.5.69-476-gbd493b1/debian/docs
  23. 0
    57
      m/minisatip-0.5.69-476-gbd493b1/debian/get-new-snapshot.sh
  24. 0
    3
      m/minisatip-0.5.69-476-gbd493b1/debian/install
  25. 0
    79
      m/minisatip-0.5.69-476-gbd493b1/debian/minisatip.init
  26. 0
    44
      m/minisatip-0.5.69-476-gbd493b1/debian/minisatip.upstart
  27. 0
    16
      m/minisatip-0.5.69-476-gbd493b1/debian/rules
  28. 0
    1
      m/minisatip-0.5.69-476-gbd493b1/debian/source/format
  29. 0
    1145
      m/minisatip-0.5.69-476-gbd493b1/dvb.c
  30. 0
    245
      m/minisatip-0.5.69-476-gbd493b1/dvb.h
  31. 0
    1142
      m/minisatip-0.5.69-476-gbd493b1/dvbapi.c
  32. 0
    129
      m/minisatip-0.5.69-476-gbd493b1/dvbapi.h
  33. 0
    53
      m/minisatip-0.5.69-476-gbd493b1/html/dLAN.xml
  34. BIN
      m/minisatip-0.5.69-476-gbd493b1/html/dvbc.png
  35. BIN
      m/minisatip-0.5.69-476-gbd493b1/html/dvbc2.png
  36. BIN
      m/minisatip-0.5.69-476-gbd493b1/html/dvbs.png
  37. BIN
      m/minisatip-0.5.69-476-gbd493b1/html/dvbs2.png
  38. BIN
      m/minisatip-0.5.69-476-gbd493b1/html/dvbs2x.png
  39. BIN
      m/minisatip-0.5.69-476-gbd493b1/html/dvbt.png
  40. BIN
      m/minisatip-0.5.69-476-gbd493b1/html/dvbt2.png
  41. 0
    5
      m/minisatip-0.5.69-476-gbd493b1/html/jquery-1.12.0.min.js
  42. 0
    1
      m/minisatip-0.5.69-476-gbd493b1/html/jquery.dataTables.min.css
  43. 0
    166
      m/minisatip-0.5.69-476-gbd493b1/html/jquery.dataTables.min.js
  44. 0
    5
      m/minisatip-0.5.69-476-gbd493b1/html/jquery.pBar.min.js
  45. BIN
      m/minisatip-0.5.69-476-gbd493b1/html/lr.jpg
  46. BIN
      m/minisatip-0.5.69-476-gbd493b1/html/lr.png
  47. 0
    2
      m/minisatip-0.5.69-476-gbd493b1/html/satip.xml
  48. BIN
      m/minisatip-0.5.69-476-gbd493b1/html/sm.jpg
  49. BIN
      m/minisatip-0.5.69-476-gbd493b1/html/sm.png
  50. BIN
      m/minisatip-0.5.69-476-gbd493b1/html/sort_asc.png
  51. BIN
      m/minisatip-0.5.69-476-gbd493b1/html/sort_both.png
  52. 0
    316
      m/minisatip-0.5.69-476-gbd493b1/html/status.html
  53. 0
    1500
      m/minisatip-0.5.69-476-gbd493b1/minisatip.c
  54. 0
    90
      m/minisatip-0.5.69-476-gbd493b1/minisatip.h
  55. 0
    560
      m/minisatip-0.5.69-476-gbd493b1/netceiver.c
  56. 0
    34
      m/minisatip-0.5.69-476-gbd493b1/netceiver.h
  57. 0
    202
      m/minisatip-0.5.69-476-gbd493b1/netceiver_mcli_defs.h
  58. 0
    30
      m/minisatip-0.5.69-476-gbd493b1/readme_footer
  59. 0
    27
      m/minisatip-0.5.69-476-gbd493b1/readme_header
  60. 0
    1118
      m/minisatip-0.5.69-476-gbd493b1/satipc.c
  61. 0
    9
      m/minisatip-0.5.69-476-gbd493b1/satipc.h
  62. 0
    1249
      m/minisatip-0.5.69-476-gbd493b1/socketworks.c
  63. 0
    95
      m/minisatip-0.5.69-476-gbd493b1/socketworks.h
  64. 0
    1310
      m/minisatip-0.5.69-476-gbd493b1/stream.c
  65. 0
    85
      m/minisatip-0.5.69-476-gbd493b1/stream.h
  66. 0
    1035
      m/minisatip-0.5.69-476-gbd493b1/tables.c
  67. 0
    71
      m/minisatip-0.5.69-476-gbd493b1/tables.h
  68. 0
    8
      m/minisatip-0.5.69-476-gbd493b1/tools/gen_readme
  69. 0
    1238
      m/minisatip-0.5.69-476-gbd493b1/utils.c
  70. 0
    125
      m/minisatip-0.5.69-476-gbd493b1/utils.h
  71. BIN
      m/minisatip_0.5.69-476-gbd493b1.orig.tar.xz

+ 0
- 5
m/minisatip-0.5.69-476-gbd493b1/.gitignore View File

@@ -1,5 +0,0 @@
1
-/minisatip
2
-*.o
3
-config.log
4
-config.status
5
-Makefile

+ 0
- 1
m/minisatip-0.5.69-476-gbd493b1/.pc/.quilt_patches View File

@@ -1 +0,0 @@
1
-debian/patches

+ 0
- 1
m/minisatip-0.5.69-476-gbd493b1/.pc/.quilt_series View File

@@ -1 +0,0 @@
1
-series

+ 0
- 1
m/minisatip-0.5.69-476-gbd493b1/.pc/.version View File

@@ -1 +0,0 @@
1
-2

+ 0
- 0
m/minisatip-0.5.69-476-gbd493b1/.pc/applied-patches View File


+ 0
- 98
m/minisatip-0.5.69-476-gbd493b1/Makefile.in View File

@@ -1,98 +0,0 @@
1
-
2
-AUTOMAKE_OPTIONS = foreign
3
-
4
-CC=@CC@
5
-EMBEDDED=@EMBEDDED@
6
-DVBCSA=@DVBCSA@
7
-DVBAES=@DVBAES@
8
-DVBCA=@DVBCA@
9
-SATIPCLIENT=@SATIPCLIENT@
10
-NETCVCLIENT=@NETCVCLIENT@
11
-STATIC=@STATIC@
12
-DVBAPI=@DVBAPI@
13
-LINUXDVB=@LINUXDVB@
14
-
15
-CFLAGS?=-ggdb -fPIC $(EXTRA_CFLAGS) @CFLAGS@
16
-LDFLAGS?=-lpthread -lrt @LDFLAGS@
17
-
18
-OBJS=minisatip.o socketworks.o stream.o adapter.o utils.o
19
-
20
-TABLES=0
21
-
22
-ifeq ($(DVBAES),1)
23
-LIBS+=crypto
24
-OBJS+=aes.o
25
-TABLES=1
26
-else
27
-CFLAGS+=-DDISABLE_DVBAES
28
-endif
29
-
30
-ifeq ($(DVBCSA),1)
31
-LIBS+=dvbcsa
32
-OBJS+=csa.o
33
-TABLES=1
34
-else
35
-CFLAGS+=-DDISABLE_DVBCSA
36
-endif
37
-
38
-ifeq ($(DVBAPI),1)
39
-OBJS+=dvbapi.o
40
-TABLES=1
41
-else
42
-CFLAGS+=-DDISABLE_DVBAPI
43
-endif
44
-
45
-ifeq ($(DVBCA),1)
46
-LIBS+=dvben50221 dvbapi ucsi
47
-OBJS+=ca.o
48
-TABLES=1
49
-else
50
-CFLAGS+=-DDISABLE_DVBCA
51
-endif
52
-
53
-ifeq ($(TABLES),1)
54
-OBJS+=tables.o
55
-else
56
-CFLAGS+=-DDISABLE_TABLES
57
-endif
58
-
59
-ifeq ($(SATIPCLIENT),1)
60
-OBJS+=satipc.o
61
-else
62
-CFLAGS+=-DDISABLE_SATIPCLIENT
63
-endif
64
-
65
-ifeq ($(NETCVCLIENT),1)
66
-OBJS+=netceiver.o
67
-LDFLAGS+=-lmcli -lxml2
68
-else
69
-CFLAGS+=-DDISABLE_NETCVCLIENT
70
-endif
71
-
72
-ifeq ($(LINUXDVB),1)
73
-OBJS+=dvb.o
74
-else
75
-CFLAGS+=-DDISABLE_LINUXDVB
76
-OBJS+=dvb.o
77
-endif
78
-
79
-ifeq ($(EMBEDDED),1)
80
-CFLAGS+=-DNO_BACKTRACE
81
-endif
82
-
83
-ifeq ($(STATIC),1)
84
-LDFLAGS+=$(addsuffix .a,$(addprefix -l:lib,$(LIBS)))
85
-else
86
-LDFLAGS+=$(addprefix -l,$(LIBS))
87
-endif
88
-
89
-minisatip: $(OBJS)
90
-	$(CC) $(CFLAGS) -o $@ $(OBJS) $(LDFLAGS)
91
-
92
-%.o : %.c
93
-	$(CC) $(CFLAGS) -c $< -o $@
94
-
95
-all: minisatip
96
-
97
-clean:
98
-	rm *.o minisatip >> /dev/null

+ 0
- 204
m/minisatip-0.5.69-476-gbd493b1/README.md View File

@@ -1,204 +0,0 @@
1
-# Welcome to Minisatip
2
-
3
-Minisatip is a multi-threaded satip server version 1.2 that runs under Linux and it was tested with DVB-S, DVB-S2, DVB-T, DVB-T2, DVB-C, DVB-C2, ATSC and ISDB-T cards.
4
-
5
-The protocol specification can be found at: 
6
-http://satip.info/sites/satip/files/resource/satip_specification_version_1_2_2.pdf
7
-It is very lightweight (designed for embedded systems with memory and processing constrains), does not need any additional libraries for basic functionality and can be used by existing satip clients like: Tvheadend, DVBViewer, vdr, VideoLAN or Android/iOS applications. Minisatip can act as a satip client as well in order to connect to satip servers from different networks.
8
-
9
-The application is designed to stream the requested data to multiple clients (even with one dvb card) in the same time while opening different pids.
10
-
11
-It is tested on x86_64, x86, ARM and MIPS platforms and it requires DVBAPI 5. Supported protocols are RTSP (both tcp and udp), HTTP (port 8080) and SSDP (as specified in the SAT>IP documentation). On top of that, it supports dvbapi protocol implemented by oscam (requires dvbcsa library) to decrypt channels using an official subscription and support dvbca protocol (requires dvben50221 library) for dvb cards with CA hardware. In order to enable/disable features, please edit the Makefile. 
12
-
13
-The application shows also a status page by default at the address: http://IP:8080 
14
-The latest binaries for embedded platforms: https://minisatip.org/forum/viewtopic.php?f=5&t=371 
15
-
16
-Contact
17
--------
18
-Please use https://minisatip.org/forum/ for any questions.
19
-
20
-In order to speed up the investigation of an issue, please provide the full log and a link to the application that is not working.
21
-
22
-If you like minisatip and you want to support the development of the project please make a donation: 
23
-https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=7UWQ7FXSABUH8&item_name=minisatip&currency_code=EUR&bn=PP-DonationsBF:btn_donateCC_LG.gif:NonHostedGuest
24
-
25
-Usage:
26
--------
27
-
28
-minisatip version 0.5.66, compiled with s2api version: 050A
29
-[15/11 22:00:36.518 main]: Built with dvbcsa
30
-[15/11 22:00:36.518 main]: Built with CI
31
-[15/11 22:00:36.518 main]: Built with dvbapi
32
-[15/11 22:00:36.518 main]: Built with AES (OpenSSL)
33
-[15/11 22:00:36.518 main]: Built with tables processing
34
-[15/11 22:00:36.518 main]: Built with satip client
35
-[15/11 22:00:36.518 main]: Built with linux dvb client
36
-[15/11 22:00:36.518 main]: Built with backtrace
37
-[15/11 22:00:36.518 main]: Built with netceiver
38
-
39
-	./minisatip [-[fgltzE]] [-a x:y:z] [-b X:Y] [-B X] [-d A:C-U ] [-D device_id] [-e X-Y,Z] [-i prio] 
40
-		[-[uj] A1:S1-F1[-PIN]] [-m mac] [-P port][-o oscam_host:dvbapi_port] [-p public_host] [-r remote_rtp_host] 
41
-		[-R document_root] [-s [DELSYS:]host[:port] [-u A1:S1-F1[-PIN]] [-L A1:low-high-switch] [-w http_server[:port]] 
42
-		[-x http_port] [-X xml_path] [-y rtsp_port] 
43
-
44
-Help
45
--------
46
-
47
-* -a x:y:z simulate x DVB-S2, y DVB-T2 and z DVB-C adapters on this box (0 means auto-detect)
48
-	* eg: -a 1:2:3  
49
-	- it will report 1 dvb-s2 device, 2 dvb-t2 devices and 3 dvb-c devices 
50
-
51
-* -b --buffers X:Y : set the app adapter buffer to X Bytes (default: 25004) and set the kernel DVB buffer to Y Bytes (default: 5775360) - both multiple of 188
52
-	* eg: -b 18800:18988
53
-
54
-* -B X : set the app socket write buffer to X KB. 
55
-	The buffer will be split between multiple sockets, each getting maximum X/2 KB
56
-	* eg: -B 10
57
-
58
-* -d --diseqc ADAPTER1:COMMITTED1-UNCOMMITTED1[,ADAPTER2:COMMITTED2-UNCOMMITTED2[,...]
59
-	* The first argument is the adapter number, second is the number of committed packets to send to a Diseqc 1.0 switch, third the number of uncommitted commands to sent to a Diseqc 1.1 switch
60
-	The higher number between the committed and uncommitted will be sent first.
61
-	* eg: -d 0:1-0  (which is the default for each adapter).
62
-	- note: * as adapter means apply to all adapters
63
-	- note: * before committed number enables fast-switch (only voltage/tone)
64
-
65
-* -q --diseqc-timing ADAPTER1:BEFORE_CMD1-AFTER_CMD1-AFTER_REPEATED_CMD1-AFTER_SWITCH1-AFTER_BURST1-AFTER_TONE1[,...]
66
-	* All timing values are in ms, default adapter values are: 15-54-15-15-15-0
67
-	- note: * as adapter means apply to all adapters
68
-
69
-* -D --device-id DVC_ID: specify the device id (in case there are multiple SAT>IP servers in the network)
70
- 	* eg: -D 4 
71
-
72
-* -E Allow encrypted stream to be sent to the client even if the decrypting was unsuccessfull
73
- 
74
-* -Y --delsys ADAPTER1:DELIVERY_SYSTEM1[,ADAPTER2:DELIVERY_SYSTEM2[,..]] - specify the delivery system of the adapters	
75
-	* eg: --delsys 1:dvbt,2:dvbs
76
-	- specifies adapter 1 as a DVBT device, adapter 2 as DVB-S, which overrides the system detection of the adapter
77
-
78
-* --dmx-source ADAPTER1:FRONTENDX - specifies the frontend number specified as argument for DMX_SET_SOURCE 
79
-	* eg: --dmx-source 0:1 - enables DMX_SET_SOURCE ioctl call with parameter 1 for adapter 0
80
-
81
-* -e --enable-adapters list_of_enabled adapters: enable only specified adapters
82
-	* eg: -e 0-2,5,7 (no spaces between parameters)
83
-	- keep in mind that the first adapters are the local ones starting with 0 after that are the satip adapters 
84
-	if you have 3 local dvb cards 0-2 will be the local adapters, 3,4, ... will be the satip servers specified with argument -s
85
-
86
-* -f  foreground, otherwise run in background
87
-
88
-* -g use syslog instead stdout for logging, multiple -g - print to stderr as well
89
-
90
-* -i --priority prio: set the DVR thread priority to prio 
91
-
92
-* -l increases the verbosity (you can use multiple -l), logging to stdout in foreground mode or in /tmp/log when a daemon
93
-	* eg: -l -l -l
94
-
95
-* -L --lnb specifies the adapter and LNB parameters (low, high and switch frequency)
96
-	* eg: -L *:9750-10600-11700 - sets all the adapters to use Universal LNB parameters (default)
97
-	* eg: -L *:10750-10750-10750 - sets the parameters for Sky NZ LNB using 10750 Mhz
98
-	* eg: -L 0:10750-10750-10750,1:9750-10600-11700 - adapter 0 has a SKY NZ LNB, adapter 1 has an Universal LNB
99
-
100
-* -m xx: simulate xx as local mac address, generates UUID based on mac
101
-	* eg: -m 001122334455 
102
-
103
-* -Z --nopm ADAPTER1,ADAPTER2-ADAPTER4[,..] - specify no power management for the adapters (does not turn power off)	
104
-	eg: --nopm 1-2
105
-	- turns off power management for adapter 1 to 2 
106
-	--nopm *
107
-	- turns off power management for all adapters (recommended instead of --nopm 0-32) 
108
-	- required for some Unicable LNBs 
109
-
110
-* -n --netceiver if:count: use network interface <if> (default vlan4) and look for <count> netceivers
111
-	* eg: -n vlan4:2 
112
-
113
-* -o --dvbapi host:port - specify the hostname and port for the dvbapi server (oscam). Port 9000 is set by default (if not specified) 
114
-	* eg: -o 192.168.9.9:9000 
115
-	192.168.9.9 is the host where oscam is running and 9000 is the port configured in dvbapi section in oscam.conf.
116
-	* eg: -o /tmp/camd.socket 
117
-	/tmp/camd.socket is the local socket that can be used 
118
-
119
-* -p url: specify playlist url using X_SATIPM3U header 
120
-	* eg: -p http://192.168.2.3:8080/playlist
121
-	- this will add X_SATIPM3U tag into the satip description xml
122
-
123
-* -P  port: use port number to listen for UDP socket in the RTP communication. port + 1000 will be used to listen by the sat>ip client (option -s)
124
- 	* eg: -P 5500 (default): will use for the sat>ip server 5500 + 2*A and 5500 + 2*A + 1, where A is the adapter number. 
125
-				6500 + 2*A and 6500 + 2*A + 1 - will be used by the sat>ip client
126
- 
127
-* -r --remote-rtp  remote_rtp_host: send the rtp stream to remote_rtp_host instead of the ip the connection comes from
128
- 	* eg: -r 192.168.7.9
129
- 
130
-* -R --document-root directory: document root for the minisatip web page and images
131
-
132
-* -s --satip-servers DELSYS:host:port - specify the remote satip host and port with delivery system DELSYS, it is possible to use multiple -s 
133
-	* DELSYS - can be one of: dvbs, dvbs2, dvbt, dvbt2, dvbc, dvbc2, isdbt, atsc, dvbcb ( - DVBC_ANNEX_B ) [default: dvbs2]
134
-	host - the server of the satip server
135
-	port - rtsp port for the satip server [default: 554]
136
-	eg: -s 192.168.1.2 -s dvbt:192.168.1.3:554 -s dvbc:192.168.1.4
137
-	- specifies 1 dvbs2 (and dvbs)satip server with address 192.168.1.2:554
138
-	- specifies 1 dvbt satip server  with address 192.168.1.3:554
139
-	- specifies 1 dvbc satip server  with address 192.168.1.4:554
140
-
141
-* -O --satip-tcp Use RTSP over TCP instead of UDP for data transport 
142
-* -S --slave ADAPTER1,ADAPTER2-ADAPTER4[,..] - specify slave adapters	
143
-	* Allows specifying bonded adapters (multiple adapters connected with a splitter to the same LNB)
144
-	Only one adapter needs to be master all others needs to have this parameter specified
145
-	eg: -S 1-2
146
-	- specifies adapter 1 to 2 as slave, in this case adapter 0 can be the master that controls the LNB
147
-	- the slave adapter will not control the LNB polarity or band, but it will just change the internal frequency to tune to a different transponder
148
-	- in this way the master will be responsible for changing the LNB polarity and band
149
-
150
-* -t --cleanpsi clean the PSI from all CA information, the client will see the channel as clear if decrypted successfully
151
-
152
-* -T --threads: enables/disable multiple threads (reduces memory consumptions) (default: ENABLED)
153
-
154
-* -u --unicable unicable_string: defines the unicable adapters (A) and their slot (S), frequency (F) and optionally the PIN for the switch:
155
-	* The format is: A1:S1-F1[-PIN][,A2:S2-F2[-PIN][,...]]
156
-	eg: 2:0-1284[-1111]
157
-	* When * character is used before frequency, force 13V only for setup
158
-
159
-* -j --jess jess_string - same format as -u 
160
-
161
-* -w --http-host http_server[:port]: specify the host and the port (if not 80) where the xml file can be downloaded from [default: default_local_ip_address:8080] 
162
-	* eg: -w 192.168.1.1:8080 
163
-
164
-* -x --http-port port: port for listening on http [default: 8080]
165
-	* eg: -x 9090 
166
-
167
-* -X --xml PATH: the path to the xml that is provided as part of the satip protocol	
168
-	* by default desc.xml is provided by minisatip without needing an additional file, 
169
-	however satip.xml is included if it needs to be customized
170
-
171
-* -y --rtsp-port rtsp_port: port for listening for rtsp requests [default: 554]
172
-	* eg: -y 5544 
173
-	- changing this to a port > 1024 removes the requirement for minisatip to run as root
174
-
175
-How to compile:
176
-------
177
-
178
-- ./configure
179
-
180
-Configures minisatip for the current system (use ./configure --help for options)
181
-
182
-To cross compile, use something like (static compilation):
183
-
184
-- ./configure --host=mips CC=/usr/src/./configure --host=mips --enable-static CC=/usr/src/openwrt/attitude_adjustment/staging_dir/toolchain-mips_r2_gcc-4.6-linaro_uClibc-0.9.33.2/bin/mips-openwrt-linux-gcc
185
-
186
-To compiles the application
187
-
188
-- make
189
-
190
-To add custom compilation flags you can use:
191
-
192
-make EXTRA_CFLAGS=....
193
-
194
-Examples:
195
--------
196
-- In order to listen to a radio after minisatip is started open the following URL in your favourite media player:
197
-	- on Hotbird 13E: "http://MINISATIP_HOST:8080/?msys=dvbs&freq=11623&pol=v&sr=27500&pids=0,10750,254"
198
-	- Astra 19.2E: "http://MINISATIP_HOST:8080/?msys=dvbs&freq=12266&pol=h&sr=27500&pids=0,851"	
199
-
200
-- Television FTA programs:
201
-	- Astra 19.2E, Kika HD: "rtsp://MINISATIP_HOST:554/?src=1&freq=11347&pol=v&ro=0.35&msys=dvbs2&mtype=8psk&plts=on&sr=22000&fec=23&pids=0,17,18,6600,6610,6620,6630"
202
-
203
-- msys can be one of: dvbs, dvbs2, dvbt, dvbt2, dvbc, dvbc2, atsc, isdbt, dvbcb ( - DVBC_ANNEX_B )
204
-

+ 0
- 1857
m/minisatip-0.5.69-476-gbd493b1/adapter.c
File diff suppressed because it is too large
View File


+ 0
- 160
m/minisatip-0.5.69-476-gbd493b1/adapter.h View File

@@ -1,160 +0,0 @@
1
-#ifndef ADAPTER_H
2
-#define ADAPTER_H
3
-#include "minisatip.h"
4
-#include "dvb.h"
5
-
6
-typedef struct ca_device ca_device_t;
7
-
8
-#define MAX_ADAPTERS 32
9
-#define DVR_BUFFER 30*1024*188
10
-#ifdef NO_BACKTRACE
11
-#define MAX_STREAMS_PER_PID 8
12
-#else
13
-#define MAX_STREAMS_PER_PID 16
14
-#endif
15
-#define ADAPTER_BUFFER (128 + 5)*DVB_FRAME
16
-#define ADAPTER_TIMEOUT 60000
17
-
18
-#define TYPE_PMT 1
19
-#define TYPE_ECM 2
20
-#define PMT_COMPLETE 4
21
-#define PMT_SKIPFIRST 8
22
-#define CLEAN_PMT 16
23
-
24
-#define RTSP_SETUP 1
25
-#define RTSP_PLAY 2
26
-#define RTSP_OPTIONS 3
27
-#define RTSP_TEARDOWN 4
28
-#define RTSP_DESCRIBE 5
29
-
30
-typedef struct struct_pid
31
-{
32
-	int16_t pid;					 // pid for this demux - not used
33
-	int fd;						 // fd for this demux
34
-	int err;					// counter errors
35
-								// stream id - one more to set it -1
36
-	signed char sid[MAX_STREAMS_PER_PID];
37
-	char flags;	// 0 - disabled , 1 enabled, 2 - will be enabled next tune when tune is called, 3 disable when tune is called
38
-	char type;
39
-	int cnt;
40
-	int dec_err;			// decrypt errors
41
-	unsigned char key, filter, ecm_parity; // custom data kept in the SPid structure
42
-	unsigned char cc, version; // continuity
43
-	unsigned char enabled_channels; // ca information
44
-	uint16_t csid; // channel sid
45
-} SPid;
46
-
47
-typedef int (*Set_pid)(void *ad, uint16_t i_pid);
48
-typedef int (*Del_filters)(int fd, int pid);
49
-typedef int (*Adapter_commit)(void *ad);
50
-typedef int (*Open_device)(void *ad);
51
-typedef int (*Device_signal)(void *ad);
52
-typedef int (*Tune)(int aid, transponder * tp);
53
-typedef fe_delivery_system_t (*Dvb_delsys)(int aid, int fd,
54
-		fe_delivery_system_t *sys);
55
-
56
-#define ADAPTER_DVB 1
57
-#define ADAPTER_SATIP 2
58
-#define ADAPTER_NETCV 3
59
-
60
-#define MAX_DELSYS 10
61
-
62
-typedef struct struct_adapter
63
-{
64
-	char enabled;
65
-	SMutex mutex;
66
-	char type, slow_dev; // available on the system
67
-	int fe, dmx, dvr;
68
-	int pa, fn;
69
-	// physical adapter, physical frontend number
70
-	fe_delivery_system_t sys[MAX_DELSYS];
71
-	transponder tp;
72
-	SPid pids[MAX_PIDS];
73
-	int ca_mask;
74
-	int master_sid;				 // first SID, the one that controls the tuning
75
-	int sid_cnt;				 //number of streams
76
-	int sock, fe_sock;
77
-	int do_tune;
78
-	int force_close;
79
-	unsigned char *buf;			// 7 rtp packets = MAX_PACK, 7 frames / packet
80
-	int rlen;
81
-	int64_t rtime;
82
-	int64_t last_sort;
83
-	int new_gs;
84
-	int status, status_cnt;
85
-	int dmx_source;
86
-	uint32_t ber;
87
-	uint16_t strength, snr, max_strength, max_snr;
88
-	uint32_t pid_err, dec_err; // detect pids received but not part of any stream, decrypt errors
89
-	diseqc diseqc_param;
90
-	int old_diseqc;
91
-	int old_hiband;
92
-	int old_pol;
93
-	int id;
94
-	int pat_processed, transponder_id, pat_ver;
95
-	int wait_new_stream, wait_transponder_id;
96
-	uint64_t tune_time;
97
-	char name[5];
98
-
99
-	Set_pid set_pid;
100
-	Del_filters del_filters;
101
-	Adapter_commit commit;
102
-	Open_device open;
103
-	Tune tune;
104
-	Dvb_delsys delsys;
105
-	Device_signal get_signal;
106
-	Adapter_commit post_init, close;
107
-} adapter;
108
-
109
-extern adapter *a[MAX_ADAPTERS];
110
-extern int a_count;
111
-extern char do_dump_pids;
112
-
113
-int init_hw(int dev);
114
-int init_all_hw();
115
-int getAdaptersCount();
116
-adapter *adapter_alloc();
117
-int close_adapter(int na);
118
-int get_free_adapter(transponder *tp);
119
-int set_adapter_for_stream(int i, int a);
120
-void close_adapter_for_stream(int sid, int aid);
121
-int set_adapter_parameters(int aid, int sid, transponder * tp);
122
-void mark_pids_deleted(int aid, int sid, char *pids);
123
-int mark_pids_add(int sid, int aid, char *pids);
124
-int mark_pid_add(int sid, int aid, int _pid);
125
-void mark_pid_deleted(int aid, int sid, int _pid, SPid *p);
126
-int update_pids(int aid);
127
-int tune(int aid, int sid);
128
-SPid *find_pid(int aid, int p);
129
-adapter * get_adapter1(int aid, char *file, int line);
130
-char *describe_adapter(int sid, int aid, char *dad, int ld);
131
-void dump_pids(int aid);
132
-void sort_pids(int aid);
133
-void enable_adapters(char *o);
134
-void set_unicable_adapters(char *o, int type);
135
-void set_diseqc_adapters(char *o);
136
-void set_diseqc_timing(char *o);
137
-void set_slave_adapters(char *o);
138
-void set_nopm_adapters(char *o);
139
-void set_adapter_dmxsource(char *o);
140
-void reset_pids_type(int aid, int clear_pat);
141
-void reset_ecm_type_for_key(int aid, int key);
142
-int delsys_match(adapter *ad, int del_sys);
143
-int get_enabled_pids(adapter *ad, int *pids, int lpids);
144
-int get_active_pids_number(adapter *ad);
145
-int get_all_pids(adapter *ad, int *pids, int lpids);
146
-char *get_adapter_pids(int aid, char *dest, int max_size);
147
-void adapter_lock1(char *FILE, int line, int aid);
148
-void adapter_unlock1(char *FILE, int line, int aid);
149
-char is_adapter_disabled(int i);
150
-void set_adapters_delsys(char *o);
151
-void set_lnb_adapters(char *o);
152
-int signal_thread(sockets *s);
153
-int compare_tunning_parameters(int aid, transponder * tp);
154
-
155
-#define get_adapter(a) get_adapter1(a, __FILE__, __LINE__)
156
-#define get_adapter_nw(aid) ((aid >= 0 && aid < MAX_ADAPTERS && a[aid] && a[aid]->enabled)?a[aid]:NULL)
157
-
158
-#define adapter_lock(a) adapter_lock1(__FILE__,__LINE__,a)
159
-#define adapter_unlock(a) adapter_unlock1(__FILE__,__LINE__,a)
160
-#endif	

+ 0
- 90
m/minisatip-0.5.69-476-gbd493b1/aes.c View File

@@ -1,90 +0,0 @@
1
-/*
2
- - * Copyright (C) 2014-2020 Catalin Toda <catalinii@yahoo.com>
3
- *
4
- * This program is free software; you can redistribute it and/or modify
5
- * it under the terms of the GNU General Public License as published by
6
- * the Free Software Foundation; either version 2 of the License, or
7
- * (at your option) any later version.
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 General Public License for more details.
13
- *
14
- * You should have received a copy of the GNU General Public License
15
- * along with this program; if not, write to the Free Software
16
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
17
- * USA
18
- *
19
- */
20
-
21
-#include <stdint.h>
22
-#include <stdlib.h>
23
-#include <string.h>
24
-#include <math.h>
25
-#include <sys/types.h>
26
-#include <sys/ioctl.h>
27
-#include <time.h>
28
-#include <unistd.h>
29
-#include <stdio.h>
30
-#include <errno.h>
31
-#include <unistd.h>
32
-#include <arpa/inet.h>
33
-#include <netdb.h>
34
-#include <netinet/in.h>
35
-#include <sys/socket.h>
36
-#include <sys/ioctl.h>
37
-#include <sys/stat.h>
38
-#include <net/if.h>
39
-#include <fcntl.h>
40
-#include <ctype.h>
41
-#include "utils.h"
42
-#include "dvb.h"
43
-#include "socketworks.h"
44
-#include "minisatip.h"
45
-#include "dvbapi.h"
46
-#include "adapter.h"
47
-#include "tables.h"
48
-#include "dvbapi.h"
49
-#include "openssl/aes.h"
50
-
51
-extern struct struct_opts opts;
52
-
53
-void *dvbaes_create_key()
54
-{
55
-	return malloc1(sizeof(AES_KEY));
56
-}
57
-
58
-void dvbaes_delete_key(void *key)
59
-{
60
-	free1(key);
61
-}
62
-
63
-int dvbaes_batch_size() // make sure the number is divisible by 7
64
-{
65
-	return 64; // process 64 packets at a time
66
-}
67
-
68
-void dvbaes_set_cw(unsigned char *cw, void *key)
69
-{
70
-	AES_set_decrypt_key(cw, 128, (AES_KEY *) key);
71
-}
72
-
73
-void dvbaes_decrypt_stream(void *key, dvbapi_batch *batch, int max_len)
74
-{
75
-	int i, j, len;
76
-	for (i = 0; batch[i].data && i < max_len; i++)
77
-	{
78
-		len = (batch[i].len / 16) * 16;
79
-		for (j = 0; j < len; j++)
80
-			AES_ecb_encrypt(batch[i].data + j, batch[i].data + j,
81
-					(AES_KEY *) key, AES_DECRYPT);
82
-
83
-	}
84
-}
85
-
86
-dvbapi_op aes_op =
87
-{ .algo = CA_ALGO_AES128, .mode = CA_MODE_ECB,
88
-		.create_cwkey = dvbaes_create_key, .delete_cwkey = dvbaes_delete_key,
89
-		.batch_size = dvbaes_batch_size, .set_cw = dvbaes_set_cw,
90
-		.decrypt_stream = dvbaes_decrypt_stream };

+ 0
- 656
m/minisatip-0.5.69-476-gbd493b1/ca.c View File

@@ -1,656 +0,0 @@
1
-/*
2
- * Copyright (C) 2015 Damjan Marion <damjan.marion@gmail.com>
3
- * Copyright (C) 2016 Catalin Toda <catalinii@yahoo.com>
4
- *
5
- * This program is free software; you can redistribute it and/or modify
6
- * it under the terms of the GNU General Public License as published by
7
- * the Free Software Foundation; either version 2 of the License, or
8
- * (at your option) any later version.
9
- *
10
- * This program is distributed in the hope that it will be useful,
11
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
12
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13
- * GNU General Public License for more details.
14
- *
15
- * You should have received a copy of the GNU General Public License
16
- * along with this program; if not, write to the Free Software
17
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
18
- * USA
19
- *
20
- */
21
-
22
-#include <stdint.h>
23
-#include <string.h>
24
-#include <stdlib.h>
25
-#include <math.h>
26
-#include <sys/types.h>
27
-#include <sys/ioctl.h>
28
-#include <time.h>
29
-#include <unistd.h>
30
-#include <stdio.h>
31
-#include <errno.h>
32
-#include <unistd.h>
33
-#include <arpa/inet.h>
34
-#include <netdb.h>
35
-#include <netinet/in.h>
36
-#include <sys/socket.h>
37
-#include <sys/ioctl.h>
38
-#include <net/if.h>
39
-#include <fcntl.h>
40
-#include <ctype.h>
41
-
42
-#include <libdvben50221/en50221_session.h>
43
-#include <libdvben50221/en50221_app_utils.h>
44
-#include <libdvben50221/en50221_app_ai.h>
45
-#include <libdvben50221/en50221_app_rm.h>
46
-#include <libdvben50221/en50221_app_ca.h>
47
-#include <libdvben50221/en50221_app_dvb.h>
48
-#include <libdvben50221/en50221_app_datetime.h>
49
-#include <libdvben50221/en50221_app_smartcard.h>
50
-#include <libdvben50221/en50221_app_teletext.h>
51
-#include <libdvben50221/en50221_app_mmi.h>
52
-#include <libdvben50221/en50221_app_epg.h>
53
-#include <libdvben50221/en50221_app_auth.h>
54
-#include <libdvben50221/en50221_app_lowspeed.h>
55
-#include <libdvbapi/dvbca.h>
56
-
57
-#include "dvb.h"
58
-#include "socketworks.h"
59
-#include "minisatip.h"
60
-#include "dvbapi.h"
61
-#include "adapter.h"
62
-#include "search.h"
63
-#include "ca.h"
64
-#include "utils.h"
65
-
66
-#define MAX_MSG_LEN 4096
67
-#define READ_DELAY 0
68
-#define MAX_CA_DEVICES 8
69
-#define MAX_CA_DEVICE_RESOURCES 8
70
-
71
-typedef struct ca_device
72
-{
73
-	int enabled;
74
-	int fd;
75
-	int slot_id;
76
-	int tc;
77
-	int id;
78
-	int ignore_close;
79
-	pthread_t stackthread;
80
-	struct en50221_transport_layer *tl;
81
-	struct en50221_session_layer * sl;
82
-
83
-	struct en50221_app_send_functions sf;
84
-	struct en50221_app_rm *rm_resource;
85
-	struct en50221_app_ai *ai_resource;
86
-	struct en50221_app_ca *ca_resource;
87
-	struct en50221_app_datetime *dt_resource;
88
-	int ca_session_number;
89
-	int ai_version;
90
-	int high_bitrate_mode;
91
-	uint16_t ai_session_number;
92
-} ca_device_t;
93
-SCA dvbca;
94
-
95
-int dvbca_id;
96
-static struct ca_device *ca_devices[MAX_ADAPTERS];
97
-#define TS101699_APP_AI_RESOURCEID  MKRID(2, 1, 2)
98
-#define CIPLUS13_APP_AI_RESOURCEID  MKRID(2, 1, 3)
99
-
100
-typedef enum {
101
-  CIPLUS13_DATA_RATE_72_MBPS = 0,
102
-  CIPLUS13_DATA_RATE_96_MBPS = 1,
103
-} ciplus13_data_rate_t;
104
-
105
-int dvbca_close_device(ca_device_t *c);
106
-
107
-
108
-static int
109
-ciplus13_app_ai_data_rate_info(ca_device_t *d, ciplus13_data_rate_t rate)
110
-{
111
-  uint8_t data[] = {0x9f, 0x80, 0x24, 0x01, (uint8_t) rate};
112
-
113
-  /* only version 3 (CI+ 1.3) supports data_rate_info */
114
-  if (d->ai_version != 3)
115
-    return 0;
116
-
117
-  LOG("setting CI+ CAM data rate to %s Mbps", rate ? "96":"72");
118
-
119
-  return en50221_sl_send_data(d->sl, d->ai_session_number, data, sizeof(data));
120
-}
121
-
122
-
123
-// this contains all known resource ids so we can see if the cam asks for something exotic
124
-uint32_t resource_ids[] =
125
-{	
126
-		EN50221_APP_TELETEXT_RESOURCEID, EN50221_APP_SMARTCARD_RESOURCEID(1),
127
-		EN50221_APP_RM_RESOURCEID, EN50221_APP_MMI_RESOURCEID,
128
-		EN50221_APP_LOWSPEED_RESOURCEID(1, 1), EN50221_APP_EPG_RESOURCEID(1),
129
-		EN50221_APP_DVB_RESOURCEID, EN50221_APP_CA_RESOURCEID,
130
-		EN50221_APP_DATETIME_RESOURCEID, EN50221_APP_AUTH_RESOURCEID,
131
-		EN50221_APP_AI_RESOURCEID, TS101699_APP_AI_RESOURCEID, CIPLUS13_APP_AI_RESOURCEID
132
-};
133
-int resource_ids_count = sizeof(resource_ids) / 4;
134
-
135
-void hexdump(uint8_t buffer[], int len)
136
-{
137
-#define HEXDUMP_LINE_LEN	16
138
-	int i;
139
-	char s[HEXDUMP_LINE_LEN + 1];
140
-	bzero(s, HEXDUMP_LINE_LEN+1);
141
-
142
-	for (i = 0; i < len; i++)
143
-	{
144
-		if (!(i % HEXDUMP_LINE_LEN))
145
-		{
146
-			if (s[0])
147
-				LOG("[%s]", s);
148
-			LOG("%05x: ", i);
149
-			bzero(s, HEXDUMP_LINE_LEN);
150
-		}
151
-		s[i % HEXDUMP_LINE_LEN] = isprint(buffer[i]) ? buffer[i] : '.';
152
-		LOG("%02x ", buffer[i]);
153
-	}
154
-	while (i++ % HEXDUMP_LINE_LEN)
155
-		LOG("   ");
156
-
157
-	LOG("[%s]", s);
158
-}
159
-
160
-int dvbca_process_pmt(adapter *ad, void *arg)
161
-{
162
-	ca_device_t * d = ca_devices[ad->id];
163
-	uint16_t pid, sid, ver;
164
-	SPid *p;
165
-	int len, rc;
166
-	SPMT *spmt = (SPMT *) arg;
167
-	uint8_t *b = spmt->pmt;
168
-
169
-	if (!d)
170
-		return -1;
171
-
172
-	pid = spmt->pid;
173
-	len = spmt->pmt_len;
174
-
175
-	ver = (b[5] >> 1) & 0x1f;
176
-	sid = (b[3] << 8) | b[4];
177
-
178
-	LOG("PMT CA pid %u len %u ver %u sid %u (%x)", pid, len, ver, sid, sid);
179
-	uint8_t capmt[4096];
180
-	int size;
181
-	struct section *section = section_codec(b, len + 3);
182
-
183
-	if (!section)
184
-	{
185
-		LOG("failed to decode section");
186
-		return -1;
187
-	}
188
-
189
-	struct section_ext *result = section_ext_decode(section, 0);
190
-	if (!section)
191
-	{
192
-		LOG("failed to decode ext_section");
193
-		return -1;
194
-	}
195
-
196
-	struct mpeg_pmt_section *pmt = mpeg_pmt_section_codec(result);
197
-	if (!pmt)
198
-	{
199
-		LOG("failed to decode pmt");
200
-		return -1;
201
-	}
202
-
203
-	if ((size = en50221_ca_format_pmt((struct mpeg_pmt_section *) b, capmt,
204
-			sizeof(capmt), 0, CA_LIST_MANAGEMENT_ONLY,
205
-			CA_PMT_CMD_ID_OK_DESCRAMBLING)) < 0)
206
-		LOG("Failed to format CA PMT object");
207
-	if ((rc = en50221_app_ca_pmt(d->ca_resource, d->ca_session_number, capmt,
208
-			size)))
209
-	{
210
-		LOG("Adapter %d, Failed to send CA PMT object, error %d", ad->id, rc);
211
-	}
212
-//	hexdump(&capmt[0], size);
213
-
214
-	return 0;
215
-}
216
-
217
-void dvbca_del_pmt(adapter *ad, void *arg)
218
-{
219
-
220
-}
221
-
222
-int ca_ai_callback(void *arg, uint8_t slot_id, uint16_t session_number,
223
-		uint8_t application_type, uint16_t application_manufacturer,
224
-		uint16_t manufacturer_code, uint8_t menu_string_length,
225
-		uint8_t *menu_string)
226
-{
227
-	ca_device_t * d = arg;
228
-
229
-	LOG("%02x:%s", slot_id, __func__);
230
-	LOG("  Application type: %02x", application_type);
231
-	LOG("  Application manufacturer: %04x", application_manufacturer);
232
-	LOG("  Manufacturer code: %04x", manufacturer_code);
233
-	LOG("  Menu string: %.*s", menu_string_length, menu_string);
234
-
235
-	d->ai_session_number = session_number;
236
-
237
-	return 0;
238
-}
239
-
240
-extern __thread char *thread_name;
241
-void *
242
-stackthread_func(void* arg)
243
-{
244
-	char name[100];
245
-	ca_device_t * d = arg;
246
-	int lasterror = 0;
247
-	adapter *ad;
248
-	sprintf(name, "CA%d", d->id);
249
-	thread_name = name;
250
-	LOG("%s: start", __func__);
251
-
252
-	while (d->enabled)
253
-	{
254
-		int error;
255
-		if ((error = en50221_tl_poll(d->tl)) != 0)
256
-		{
257
-			if (error != lasterror)
258
-			{
259
-				LOG("Error reported by stack slot:%i error:%i",
260
-						en50221_tl_get_error_slot(d->tl),
261
-						en50221_tl_get_error(d->tl));
262
-				ad = get_adapter(d->id);
263
-				if(ad)
264
-					ad->slow_dev = 0;
265
-				d->ignore_close = 0; // force device close..
266
-				//break;
267
-			}
268
-			lasterror = error;
269
-		}
270
-	}
271
-
272
-	return 0;
273
-}
274
-
275
-static int ca_session_callback(void *arg, int reason, uint8_t slot_id,
276
-		uint16_t session_number, uint32_t resource_id)
277
-{
278
-	ca_device_t * d = arg;
279
-	LOG("%s: reason %d slot_id %u session_number %u resource_id %x", __func__,
280
-			reason, slot_id, session_number, resource_id);
281
-
282
-	switch (reason)
283
-	{
284
-		case S_SCALLBACK_REASON_CAMCONNECTING:
285
-			LOG("CAM connecting")			
286
-			break;
287
-			
288
-		case S_SCALLBACK_REASON_CAMCONNECTED:
289
-			LOG("CAM connected")
290
-
291
-			if (resource_id == EN50221_APP_RM_RESOURCEID)
292
-			{
293
-				en50221_app_rm_enq(d->rm_resource, session_number);
294
-			}
295
-			else if (resource_id == EN50221_APP_AI_RESOURCEID || resource_id == TS101699_APP_AI_RESOURCEID || resource_id == CIPLUS13_APP_AI_RESOURCEID)
296
-			{
297
-				d->ai_version = resource_id & 0x3f;
298
-				d->ai_session_number = session_number;
299
-				en50221_app_ai_enquiry(d->ai_resource, session_number);
300
-				ciplus13_app_ai_data_rate_info(d, d->high_bitrate_mode ?
301
-                                       CIPLUS13_DATA_RATE_96_MBPS :
302
-                                       CIPLUS13_DATA_RATE_72_MBPS );
303
-			}
304
-			else if (resource_id == EN50221_APP_CA_RESOURCEID)
305
-			{
306
-				en50221_app_ca_info_enq(d->ca_resource, session_number);
307
-				d->ca_session_number = session_number;
308
-			}
309
-			
310
-		d->ignore_close = 1;
311
-		unregister_ca_for_adapter(dvbca_id, d->id);
312
-		register_ca_for_adapter(dvbca_id, d->id);
313
-		break;
314
-	}
315
-	return 0;
316
-}
317
-
318
-static int ca_lookup_callback(void * arg, uint8_t slot_id,
319
-		uint32_t requested_resource_id,
320
-		en50221_sl_resource_callback *callback_out, void **arg_out,
321
-		uint32_t *connected_resource_id)
322
-{
323
-	ca_device_t * d = arg;
324
-
325
-	LOG("%s: slot_id %u requested_resource_id %x", __func__, slot_id,
326
-			requested_resource_id);
327
-
328
-	switch (requested_resource_id)
329
-	{
330
-	case EN50221_APP_RM_RESOURCEID:
331
-		*callback_out = (en50221_sl_resource_callback) en50221_app_rm_message;
332
-		*arg_out = d->rm_resource;
333
-		*connected_resource_id = EN50221_APP_RM_RESOURCEID;
334
-		break;
335
-	case EN50221_APP_AI_RESOURCEID:
336
-		*callback_out = (en50221_sl_resource_callback) en50221_app_ai_message;
337
-		*arg_out = d->ai_resource;
338
-		*connected_resource_id = EN50221_APP_AI_RESOURCEID;
339
-		break;
340
-	case EN50221_APP_CA_RESOURCEID:
341
-		*callback_out = (en50221_sl_resource_callback) en50221_app_ca_message;
342
-		*arg_out = d->ca_resource;
343
-		*connected_resource_id = EN50221_APP_CA_RESOURCEID;
344
-		break;
345
-	case EN50221_APP_DATETIME_RESOURCEID:
346
-		*callback_out =
347
-				(en50221_sl_resource_callback) en50221_app_datetime_message;
348
-		*arg_out = d->dt_resource;
349
-		*connected_resource_id = EN50221_APP_DATETIME_RESOURCEID;
350
-		break;
351
-	case TS101699_APP_AI_RESOURCEID:	
352
-	case CIPLUS13_APP_AI_RESOURCEID:
353
-		*callback_out = (en50221_sl_resource_callback) en50221_app_ai_message;
354
-		*arg_out = d->ai_resource;
355
-		*connected_resource_id = requested_resource_id;
356
-        break;		
357
-		
358
-	default:
359
-		LOG("unknown resource id")
360
-		;
361
-		return -1;
362
-	}
363
-	return 0;
364
-}
365
-
366
-static int ca_rm_enq_callback(void *arg, uint8_t slot_id,
367
-		uint16_t session_number)
368
-{
369
-	ca_device_t * d = arg;
370
-
371
-	LOG("%02x:%s", slot_id, __func__);
372
-
373
-	if (en50221_app_rm_reply(d->rm_resource, session_number, resource_ids_count,
374
-			resource_ids))
375
-	{
376
-		LOG("%02x:Failed to send reply to ENQ", slot_id);
377
-	}
378
-
379
-	return 0;
380
-}
381
-
382
-static int ca_rm_reply_callback(void *arg, uint8_t slot_id,
383
-		uint16_t session_number, uint32_t resource_id_count,
384
-		uint32_t *_resource_ids)
385
-{
386
-	ca_device_t * d = arg;
387
-	LOG("%02x:%s", slot_id, __func__);
388
-
389
-	uint32_t i;
390
-	for (i = 0; i < resource_id_count; i++)
391
-	{
392
-		LOG("  CAM provided resource id: %08x", _resource_ids[i]);
393
-	}
394
-
395
-	if (en50221_app_rm_changed(d->rm_resource, session_number))
396
-	{
397
-		LOG("%02x:Failed to send REPLY", slot_id);
398
-	}
399
-
400
-	return 0;
401
-}
402
-
403
-static int ca_rm_changed_callback(void *arg, uint8_t slot_id,
404
-		uint16_t session_number)
405
-{
406
-	ca_device_t * d = arg;
407
-	LOG("%02x:%s", slot_id, __func__);
408
-
409
-	if (en50221_app_rm_enq(d->rm_resource, session_number))
410
-	{
411
-		LOG("%02x:Failed to send ENQ", slot_id);
412
-	}
413
-
414
-	return 0;
415
-}
416
-
417
-static int ca_ca_info_callback(void *arg, uint8_t slot_id,
418
-		uint16_t session_number, uint32_t ca_id_count, uint16_t *ca_ids)
419
-{
420
-	(void) arg;
421
-	(void) session_number;
422
-
423
-	LOG("%02x:%s", slot_id, __func__);
424
-	uint32_t i;
425
-	for (i = 0; i < ca_id_count; i++)
426
-	{
427
-		LOG("  Supported CA ID: %04x", ca_ids[i]);
428
-	}
429
-
430
-	//ca_connected = 1;
431
-	return 0;
432
-}
433
-
434
-static int ca_ca_pmt_reply_callback(void *arg, uint8_t slot_id,
435
-		uint16_t session_number, struct en50221_app_pmt_reply *reply,
436
-		uint32_t reply_size)
437
-{
438
-	(void) arg;
439
-	(void) session_number;
440
-	(void) reply;
441
-	(void) reply_size;
442
-
443
-	LOG("%02x:%s", slot_id, __func__);
444
-
445
-	return 0;
446
-}
447
-
448
-static int ca_dt_enquiry_callback(void *arg, uint8_t slot_id,
449
-		uint16_t session_number, uint8_t response_interval)
450
-{
451
-	ca_device_t * d = arg;
452
-
453
-	LOG("%02x:%s", slot_id, __func__);
454
-	LOG("  response_interval:%i", response_interval);
455
-
456
-	if (en50221_app_datetime_send(d->dt_resource, session_number, time(NULL),
457
-			-1))
458
-	{
459
-		LOG("%02x:Failed to send datetime", slot_id);
460
-	}
461
-
462
-	return 0;
463
-}
464
-
465
-int ca_init(ca_device_t *d)
466
-{
467
-	ca_slot_info_t info;
468
-	int64_t st = getTick();
469
-	info.num = 0;
470
-	int tries = 800; // wait up to 8s for the CAM
471
-	int fd = d->fd;
472
-
473
-	d->tl = NULL;
474
-	d->sl = NULL;
475
-	d->slot_id = -1;
476
-
477
-	adapter *ad = get_adapter(d->id);
478
-
479
-	if (ioctl(fd, CA_RESET, &info))
480
-		LOG_AND_RETURN(0, "%s: Could not reset ca %d", __FUNCTION__, d->id);
481
-
482
-	do
483
-	{
484
-		if (ioctl(fd, CA_GET_SLOT_INFO, &info))
485
-			LOG_AND_RETURN(0, "%s: Could not get info1 for ca %d", __FUNCTION__, d->id);
486
-		usleep(10000);
487
-	} while (tries-- && !(info.flags & CA_CI_MODULE_READY));
488
-
489
-	if (ioctl(fd, CA_GET_SLOT_INFO, &info))
490
-		LOG_AND_RETURN(0, "%s: Could not get info2 for ca %d", __FUNCTION__, d->id);
491
-
492
-	LOG("initializing CA, fd %d type %d flags 0x%x, after %jd ms", fd, info.type, info.flags, (getTick() - st));
493
-
494
-	if (info.type != CA_CI_LINK)
495
-	{
496
-		LOG("incompatible CA interface");
497
-		goto fail;
498
-	}
499
-
500
-	if (!(info.flags & CA_CI_MODULE_READY))
501
-	{
502
-		LOG("CA module not present or not ready");
503
-		goto fail;
504
-	}
505
-
506
-	if ((d->tl = en50221_tl_create(5, 32)) == NULL)
507
-	{
508
-		LOG("failed to create transport layer");
509
-		goto fail;
510
-	}
511
-
512
-	if ((d->slot_id = en50221_tl_register_slot(d->tl, fd, 0, 10000, 1000)) < 0)
513
-	{
514
-		LOG("slot registration failed");
515
-		goto fail;
516
-	}
517
-	LOG("slotid: %i", d->slot_id);
518
-
519
-	// create session layer
520
-	d->sl = en50221_sl_create(d->tl, 256);
521
-	if (d->sl == NULL)
522
-	{
523
-		LOG("failed to create session layer");
524
-		goto fail;
525
-	}
526
-
527
-	// create the sendfuncs
528
-	d->sf.arg = d->sl;
529
-	d->sf.send_data = (en50221_send_data) en50221_sl_send_data;
530
-	d->sf.send_datav = (en50221_send_datav) en50221_sl_send_datav;
531
-
532
-	/* create app resources and assign callbacks */
533
-	d->rm_resource = en50221_app_rm_create(&d->sf);
534
-	en50221_app_rm_register_enq_callback(d->rm_resource, ca_rm_enq_callback, d);
535
-	en50221_app_rm_register_reply_callback(d->rm_resource, ca_rm_reply_callback,
536
-			d);
537
-	en50221_app_rm_register_changed_callback(d->rm_resource,
538
-			ca_rm_changed_callback, d);
539
-
540
-	d->dt_resource = en50221_app_datetime_create(&d->sf);
541
-	en50221_app_datetime_register_enquiry_callback(d->dt_resource,
542
-			ca_dt_enquiry_callback, d);
543
-
544
-	d->ai_resource = en50221_app_ai_create(&d->sf);
545
-	en50221_app_ai_register_callback(d->ai_resource, ca_ai_callback, d);
546
-
547
-	d->ca_resource = en50221_app_ca_create(&d->sf);
548
-	en50221_app_ca_register_info_callback(d->ca_resource, ca_ca_info_callback,
549
-			d);
550
-	en50221_app_ca_register_pmt_reply_callback(d->ca_resource,
551
-			ca_ca_pmt_reply_callback, d);
552
-
553
-	pthread_create(&d->stackthread, NULL, stackthread_func, d);
554
-
555
-	en50221_sl_register_lookup_callback(d->sl, ca_lookup_callback, d);
556
-	en50221_sl_register_session_callback(d->sl, ca_session_callback, d);
557
-
558
-	d->tc = en50221_tl_new_tc(d->tl, d->slot_id);
559
-	LOG("tcid: %i", d->tc);
560
-
561
-	return 1;
562
-	fail: close(fd);
563
-	d->enabled = 0;
564
-	return 0;
565
-}
566
-
567
-int dvbca_init_dev(adapter *ad, void *arg)
568
-{
569
-	ca_device_t *c = ca_devices[ad->id];
570
-	int fd;
571
-	int init_ok = 0;
572
-	char ca_dev_path[100];
573
-
574
-	if (c && c->enabled)
575
-		return 1;
576
-
577
-	if (ad->type != ADAPTER_DVB)
578
-		return 0;
579
-
580
-	sprintf(ca_dev_path, "/dev/dvb/adapter%d/ca0", ad->pa);
581
-	fd = open(ca_dev_path, O_RDWR);
582
-	if (fd <= 0)
583
-		LOG_AND_RETURN(0, "No CA device detected on adapter %d", ad->id);
584
-	if (!c)
585
-	{
586
-		c = ca_devices[ad->id] = malloc1(sizeof(ca_device_t));
587
-		if (!c)
588
-			LOG_AND_RETURN(0, "Could not allocate memory for CA device %d",
589
-					ad->id);
590
-		memset(c, 0, sizeof(ca_device_t));
591
-	}
592
-	c->enabled = 1;
593
-	c->ignore_close = 0;
594
-	c->fd = fd;
595
-	c->id = ad->id;
596
-	c->high_bitrate_mode = 0;
597
-	c->stackthread = 0;
598
-	init_ok = ca_init(c);
599
-	if(!init_ok)
600
-	{
601
-		dvbca_close_device(c);
602
-		return 0;	
603
-	}
604
-	return 1;
605
-}
606
-
607
-int dvbca_close_device(ca_device_t *c)
608
-{
609
-	LOG("closing CA device %d, fd %d", c->id, c->fd);
610
-	c->enabled = 0;
611
-	if(c->stackthread)
612
-		pthread_join(c->stackthread, NULL);
613
-	if(c->tl  && (c->slot_id >= 0)) 
614
-		en50221_tl_destroy_slot(c->tl, c->slot_id);
615
-	if(c->sl)
616
-		en50221_sl_destroy(c->sl);
617
-	if(c->tl >= 0)
618
-		en50221_tl_destroy(c->tl);
619
-	if(c->fd >= 0)
620
-		close(c->fd);
621
-
622
-}
623
-int dvbca_close_dev(adapter *ad, void *arg)
624
-{
625
-	ca_device_t *c = ca_devices[ad->id];
626
-	if (c && c->enabled && !c->ignore_close) // do not close the CA unless in a bad state
627
-	{
628
-		dvbca_close_device(c);
629
-	}
630
-	return 1;
631
-}
632
-
633
-void dvbca_close(adapter *ad, void *arg)
634
-{
635
-	int i;
636
-	adapter tmp_ad;
637
-	for(i=0;i<MAX_ADAPTERS;i++)
638
-		if(ca_devices[i] && ca_devices[i]->enabled)
639
-				{
640
-					dvbca_close_device(ca_devices[i]);
641
-				}
642
-
643
-}
644
-
645
-void dvbca_init() // you can search the devices here and fill the ca_devices, then open them here (for example independent CA devices), or use dvbca_init_dev to open them (like in this module)
646
-{
647
-	memset(dvbca.action, 0, sizeof(dvbca.action));
648
-	dvbca.enabled = 1; // ignore it anyway
649
-	dvbca.action[CA_INIT_DEVICE] = (ca_action) &dvbca_init_dev;
650
-	dvbca.action[CA_CLOSE_DEVICE] = (ca_action) &dvbca_close_dev;
651
-	dvbca.action[CA_ADD_PMT] = (ca_action) &dvbca_process_pmt;
652
-	dvbca.action[CA_DEL_PMT] = (ca_action) &dvbca_del_pmt;
653
-	dvbca.action[CA_CLOSE] = (ca_action) &dvbca_close;
654
-	dvbca.adapter_mask = 0xFFFFFFFF; // enabled for all the adapters
655
-	dvbca_id = add_ca(&dvbca);
656
-}

+ 0
- 10
m/minisatip-0.5.69-476-gbd493b1/ca.h View File

@@ -1,10 +0,0 @@
1
-#ifndef CA_H
2
-#define CA_H
3
-#include "adapter.h"
4
-#include "tables.h"
5
-int ca_init(ca_device_t *d);
6
-void ca_grab_pmt(adapter *a, int rlen);
7
-int dvbca_process_pmt(adapter *ad, void *arg);
8
-void dvbca_init();
9
-
10
-#endif

+ 0
- 5372
m/minisatip-0.5.69-476-gbd493b1/configure
File diff suppressed because it is too large
View File


+ 0
- 191
m/minisatip-0.5.69-476-gbd493b1/configure.ac View File

@@ -1,191 +0,0 @@
1
-#                                               -*- Autoconf -*-
2
-# Process this file with autoconf to produce a configure script.
3
-
4
-AC_PREREQ([2.4])
5
-AC_INIT(minisatip, 0.5, https://github.com/catalinii/minisatip)
6
-AC_CONFIG_SRCDIR([minisatip.h])
7
-# AC_CONFIG_HEADERS([config.h])
8
-
9
-# Checks for programs.
10
-AC_PROG_CC
11
-
12
-# Checks for libraries.
13
-# FIXME: Replace `main' with a function in `-lrt':
14
-AC_CHECK_LIB([rt], [main])
15
-
16
-# Checks for header files.
17
-AC_CHECK_HEADERS([arpa/inet.h fcntl.h netdb.h netinet/in.h stdint.h stdlib.h string.h sys/ioctl.h sys/socket.h sys/time.h syslog.h unistd.h])
18
-
19
-# Checks for typedefs, structures, and compiler characteristics.
20
-AC_TYPE_INT16_T
21
-AC_TYPE_INT64_T
22
-AC_TYPE_INT8_T
23
-AC_TYPE_SIZE_T
24
-AC_TYPE_UINT16_T
25
-AC_TYPE_UINT32_T
26
-AC_TYPE_UINT64_T
27
-AC_TYPE_UINT8_T
28
-
29
-# Checks for library functions.
30
-AC_FUNC_MALLOC
31
-AC_FUNC_MMAP
32
-AC_CHECK_FUNCS([bzero clock_gettime dup2 gethostbyname gettimeofday inet_ntoa memset munmap socket strchr strerror strncasecmp strstr])
33
-
34
-FM="\nminisatip configuration\n\n"
35
-linux_dvb="Linux DVB:\t\t\t\t "
36
-dvb_csa="DVBCSA (needs libdvbcsa):\t\t "
37
-openssl="OpenSSL (AES as part of DVBAPI):\t "
38
-dvb_ca="Common Interface (needs DVBEN50221):\t "
39
-emb="Embedded system:\t\t\t "
40
-netcv="Netceiver support:\t\t\t "
41
-satipc="SatIP Client:\t\t\t\t "
42
-static="Static:\t\t\t\t\t "
43
-dvbapi="dvbapi:\t\t\t\t\t "
44
-
45
-AC_MSG_NOTICE([ == Checking LINUX DVB == ])
46
-AC_CHECK_HEADERS([linux/dvb/frontend.h],[LINUXDVB=1],[LINUXDVB=0])
47
-AC_ARG_ENABLE([linuxdvb],
48
-  [AS_HELP_STRING([--disable-linuxdvb],
49
-  [disable linux dvb support])],
50
-  [LINUXDVB=0],
51
-  [LINUXDVB="$LINUXDVB"])
52
-
53
-if test "$LINUXDVB" = "1"; then
54
-FM="$FM\n$linux_dvb enabled"
55
-else
56
-FM="$FM\n$linux_dvb disabled"
57
-fi
58
-
59
-AC_MSG_NOTICE([ == Checking DVBEN50221 == ])
60
-AC_CHECK_HEADERS([libdvben50221/en50221_app_dvb.h],[DVBCA=1],[DVBCA=0])
61
-AC_ARG_ENABLE([dvbca],
62
-  [AS_HELP_STRING([--disable-dvbca],
63
-  [disable dvbca support (decrypting using CI)])],
64
-  [DVBCA=0],
65
-  [DVBCA="$DVBCA"])
66
-
67
-if test "$DVBCA" = "1"; then
68
-FM="$FM\n$dvb_ca enabled"
69
-else
70
-FM="$FM\n$dvb_ca disabled"
71
-fi
72
-
73
-AC_MSG_NOTICE([ == Checking OpenSSL == ])
74
-AC_CHECK_HEADERS([openssl/aes.h],[DVBAES=1],[DVBAES=0])
75
-AC_ARG_ENABLE([dvbaes],
76
-  [AS_HELP_STRING([--disable-dvbaes],
77
-  [disable AES support (decrypting using openssl)])],
78
-  [DVBAES=0],
79
-  [DVBAES="$DVBAES"])
80
-
81
-if test "$DVBAES" = "1"; then
82
-FM="$FM\n$openssl enabled"
83
-else
84
-FM="$FM\n$openssl disabled"
85
-fi
86
-
87
-AC_MSG_NOTICE([ == Checking Embedded == ])
88
-AC_CHECK_FUNCS([backtrace],[EMBEDDED=0],[EMBEDDED=1])
89
-if test "$EMBEDDED" = "1"; then
90
-FM="$FM\n$emb enabled"
91
-else
92
-FM="$FM\n$emb disabled"
93
-fi
94
-
95
-AC_MSG_NOTICE([ == Checking DVBCSA == ])
96
-AC_CHECK_HEADERS([dvbcsa/dvbcsa.h],[DVBCSA=1],[DVBCSA=0])
97
-AC_ARG_ENABLE([dvbcsa],
98
-  [AS_HELP_STRING([--disable-dvbcsa],
99
-  [disable dvbcsa support (decrypting with dvbcsa)])],
100
-  [DVBCSA=0],
101
-  [DVBCSA="$DVBCSA"])
102
-
103
-if test "$DVBCSA" = "1"; then
104
-FM="$FM\n$dvb_csa enabled"
105
-else
106
-FM="$FM\n$dvb_csa disabled"
107
-fi
108
-
109
-AC_MSG_NOTICE([ == Checking NETCVCLIENT == ])
110
-
111
-mcli_dir="../vdr-mcli-plugin"
112
-xml2_dir="/usr/include/libxml2"
113
-
114
-AC_ARG_WITH([mcli],
115
-  [AS_HELP_STRING([--with-mcli],
116
-  [specify vdr-mcli-plugin directory default=../vdr-mcli-plugin])],
117
-  [mcli_dir=$with_mcli])
118
-
119
-AC_ARG_WITH([xml2],
120
-  [AS_HELP_STRING([--with-xml2],
121
-  [specify libxml2 directory default=/usr/include/libxml2])],
122
-  [xml2_dir=$with_xml2])
123
-  
124
-CFLAGS="-I. -I$mcli_dir/mcast/client -I$mcli_dir/mcast/common -L$mcli_dir/mcast/client -I$xml2_dir"
125
-CPPFLAGS="-I. -I$mcli_dir/mcast/client -I$mcli_dir/mcast/common -L$mcli_dir/mcast/client -I$xml2_dir"
126
-
127
-
128
-AC_CHECK_HEADERS([netceiver.h],[NETCVCLIENT=1],[NETCVCLIENT=0])
129
-AC_ARG_ENABLE([netcv],
130
-  [AS_HELP_STRING([--disable-netceiver],
131
-  [disable NETCEIVER support])],
132
-  [NETCVCLIENT=0],
133
-  [NETCVCLIENT="$NETCVCLIENT"])
134
-
135
-if test "$NETCVCLIENT" = "1"; then
136
-FM="$FM\n$netcv enabled"
137
-else
138
-FM="$FM\n$netcv disabled"
139
-CFLAGS=
140
-CPPFLAGS=
141
-fi
142
-
143
-
144
-AC_ARG_ENABLE([satipc],
145
-  [AS_HELP_STRING([--disable-satipc],
146
-  [disable satip client support])],
147
-  [SATIPCLIENT=0],
148
-  [SATIPCLIENT=1])
149
-if test "$SATIPCLIENT" = "1"; then
150
-FM="$FM\n$satipc enabled"
151
-else
152
-FM="$FM\n$satipc disabled"
153
-fi
154
-
155
-AC_ARG_ENABLE([static],
156
-  [AS_HELP_STRING([--enable-static],
157
-  [enable static compilation])],
158
-  [STATIC=1],
159
-  [STATIC=0])
160
-if test "$STATIC" = "1"; then
161
-FM="$FM\n$static enabled"
162
-else
163
-FM="$FM\n$static disabled"
164
-fi
165
-
166
-AC_ARG_ENABLE([dvbapi],
167
-  [AS_HELP_STRING([--disable-dvbapi],
168
-  [disable dvbapi protocol support])],
169
-  [DVBAPI=0],
170
-  [DVBAPI=1])
171
-if test "$DVBAPI" = "1"; then
172
-FM="$FM\n$dvbapi enabled"
173
-else
174
-FM="$FM\n$dvbapi disabled"
175
-fi
176
-
177
-
178
-AC_SUBST(LINUXDVB)
179
-AC_SUBST(DVBCSA)
180
-AC_SUBST(DVBCA)
181
-AC_SUBST(DVBAES)
182
-AC_SUBST(EMBEDDED)
183
-AC_SUBST(NETCVCLIENT)
184
-AC_SUBST(SATIPCLIENT)
185
-AC_SUBST(STATIC)
186
-AC_SUBST(DVBAPI)
187
-
188
-AC_CONFIG_FILES([Makefile])
189
-AC_OUTPUT
190
-
191
-echo -e "$FM\n"

+ 0
- 85
m/minisatip-0.5.69-476-gbd493b1/csa.c View File

@@ -1,85 +0,0 @@
1
-/*
2
- - * Copyright (C) 2014-2020 Catalin Toda <catalinii@yahoo.com>
3
- *
4
- * This program is free software; you can redistribute it and/or modify
5
- * it under the terms of the GNU General Public License as published by
6
- * the Free Software Foundation; either version 2 of the License, or
7
- * (at your option) any later version.
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 General Public License for more details.
13
- *
14
- * You should have received a copy of the GNU General Public License
15
- * along with this program; if not, write to the Free Software
16
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
17
- * USA
18
- *
19
- */
20
-
21
-#include <stdint.h>
22
-#include <stdlib.h>
23
-#include <string.h>
24
-#include <math.h>
25
-#include <sys/types.h>
26
-#include <sys/ioctl.h>
27
-#include <time.h>
28
-#include <unistd.h>
29
-#include <stdio.h>
30
-#include <errno.h>
31
-#include <unistd.h>
32
-#include <arpa/inet.h>
33
-#include <netdb.h>
34
-#include <netinet/in.h>
35
-#include <sys/socket.h>
36
-#include <sys/ioctl.h>
37
-#include <sys/stat.h>
38
-#include <net/if.h>
39
-#include <fcntl.h>
40
-#include <ctype.h>
41
-#include "utils.h"
42
-#include "dvb.h"
43
-#include "socketworks.h"
44
-#include "minisatip.h"
45
-#include "dvbapi.h"
46
-#include "adapter.h"
47
-#include "tables.h"
48
-#include "dvbapi.h"
49
-#include <dvbcsa/dvbcsa.h>
50
-
51
-extern struct struct_opts opts;
52
-
53
-void *dvbcsa_create_key()
54
-{
55
-	return (void *) dvbcsa_bs_key_alloc();
56
-}
57
-
58
-void dvbcsa_delete_key(void *key)
59
-{
60
-	dvbcsa_key_free(key);
61
-}
62
-
63
-int dvbcsa_batch_size() // make sure the number is divisible by 7
64
-{
65
-	int batchSize = dvbcsa_bs_batch_size();
66
-//	batchSize = (batchSize / 7) * 7;
67
-	return batchSize;
68
-}
69
-
70
-void dvbcsa_set_cw(unsigned char *cw, void *key)
71
-{
72
-	dvbcsa_bs_key_set(cw, key);
73
-}
74
-
75
-void dvbcsa_decrypt_stream(void *key, dvbapi_batch *batch, int max_len)
76
-{
77
-	dvbcsa_bs_decrypt((const struct dvbcsa_bs_key_s *) key,
78
-			(const struct dvbcsa_bs_batch_s *) batch, max_len);
79
-}
80
-
81
-dvbapi_op csa_op =
82
-{ .algo = CA_ALGO_DVBCSA, .mode = 0, .create_cwkey = dvbcsa_create_key,
83
-		.delete_cwkey = dvbcsa_delete_key, .batch_size = dvbcsa_batch_size,
84
-		.set_cw = dvbcsa_set_cw, .decrypt_stream = dvbcsa_decrypt_stream };
85
-

+ 0
- 63
m/minisatip-0.5.69-476-gbd493b1/debian/README.Debian View File

@@ -1,63 +0,0 @@
1
-Welcome to Minisatip
2
-
3
-Minisatip is a single threaded satip server version 1.2 that runs under Linux and it was tested with DVB-S, DVB-S2, DVB-T, DVB-T2, DVB-C, DVB-C2, ATSC DVB cards.
4
-The protocol specification can be found at: satip.info/sites/satip/files/resource/satip_specification_version_1_2_2.pdf
5
-It is very lightweight (designed for embedded systems with memory and processing constrains), does not need any additional libraries for basic functionality and can be used by existing satip clients like: Tvheadend, DVBViewer, vdr or Android/iOS applications. minisatip can act as a satip client as well in order to connect to satip servers from different networks.
6
-The application is designed to stream the requested data to multiple clients (even with one dvb card) in the same time while opening different pids.
7
-It is tested on x86_64, x86, ARM and MIPS platforms and it requires DVBAPI 5. Supported protocols are rtsp (both tcp and udp), HTTP (port 8080) and SSDP (as specified in the SAT>IP documentation). On top of that, it supports dvbapi protocol implemented by oscam (requires dvbcsa library) to decrypt channels using an official subscription and support dvbca protocol (requires dvben50221 library) for dvb cards with CA hardware. In order to enable/disable features, please edit the Makefile. 
8
-
9
-Please use https://toda.ro/forum/ for any questions.
10
-In order to speed up the investigation of an issue, please provide the full log and a link to the application that is not working.
11
-
12
-If you like minisatip and you want to support the development of the project please make a donation: 
13
-
14
-https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=7UWQ7FXSABUH8&item_name=minisatip&currency_code=EUR&bn=PP-DonationsBF:btn_donateCC_LG.gif:NonHostedGuest
15
-
16
-Usage:
17
-
18
-minisatip [-f] [-r remote_rtp_host] [-d device_id] [-w http_server[:port]] [-p public_host] [-s rtp_port] [-a no] [-m mac] [-l] [-a X:Y:Z] [-e X-Y,Z]
19
-		-f foreground, otherwise run in background
20
-		-r remote_rtp_host: send remote rtp to remote_rtp_host
21
-		-d specify the device id (in case there are multiple SAT>IP servers in the network)
22
-		-w http_server[:port]: specify the host and the port where the xml file can be downloaded from
23
-		-x port: port for listening on http
24
-		-y rtsp_port: port for listening for rtsp requests (default: 554)
25
-		-s force to get signal from the DVB hardware every 200ms (use with care, only when needed)
26
-		-a x:y:z simulate x DVB-S2, y DVB-T2 and z DVB-C adapters on this box (0 means autodetect)
27
-		-m xx: simulate xx as local mac address, generates UUID based on mac
28
-		-e list_of_enabled adapters: enable only specified adapters, example 0-2,5,7 (no spaces between parameters)
29
-		-c X: bandwidth capping for the output to the network (default: unlimited)
30
-		-b X: set the DVR buffer to X KB (default: XX KB)
31
-		-l increases the verbosity (you can use multiple -l), logging to stdout in foreground mode or in /tmp/log when a daemon
32
-		-p url: specify playlist url using X_SATIPM3U header
33
-		-u unicable_string: defines the unicable adapters (A) and their slot (S), frequency (F) and optionally the PIN for the switch:\n\
34
-			The format is: A1:S1-F1[-PIN][,A2:S2-F2[-PIN][,...]] example: 2:0-1284[-1111]
35
-		-j jess_string: same format as unicable_string 
36
-		-g use syslog instead stdout for logging, multiple -g - print to stderr as well\n\
37
-		-o host:port: specify the hostname and port for the dvbapi server (oscam) 
38
-		-s DELSYS:host:port - specify the remote satip host and port with delivery system DELSYS: example: dvbs2:192.168.9.9[:554]
39
-		-t clean the PSI from all CA information, the client will see the channel as clear if decrypted successfully
40
-
41
-Example of Usage:
42
-
43
-	minisatip 
44
-
45
-	- Will act as a daemon and listen for connections on port 1900 (udp), 554 (rtsp) and 8080 (http) and will be able to serve satip clients connected to the LAN
46
-	
47
-	minisatip -r xx.xx.xx.xx 
48
-	
49
-	- Forces to send the rtp packets to xx.xx.xx.xx instead of the IP that the connection comes from
50
-	
51
-	- Connect to oscam using the dvbapi protocol
52
-	
53
-	minisatip -o 192.168.9.9:9000
54
-	
55
-Examples:
56
-	- In order to listen to a radio on Hotbird 13E, after minisatip is started open the following URL in your favourite media player:
57
-
58
-	"http://MINISATIP_HOST:8080/?msys=dvbs&freq=11623&pol=v&sr=27500&pids=0,10750,254"
59
-	
60
-	msys can be one of: dvbs, dvbs2, dvbt, dvbt2, dvbc, dvbc2, atsc, dvbcb ( - DVBC_ANNEX_B )
61
-	
62
-
63
-   	

+ 0
- 2122
m/minisatip-0.5.69-476-gbd493b1/debian/changelog
File diff suppressed because it is too large
View File


+ 0
- 1
m/minisatip-0.5.69-476-gbd493b1/debian/compat View File

@@ -1 +0,0 @@
1
-7

+ 0
- 13
m/minisatip-0.5.69-476-gbd493b1/debian/control View File

@@ -1,13 +0,0 @@
1
-Source: minisatip
2
-Section: video
3
-Priority: extra
4
-Maintainer: Frodo <frodo-vdr@gmx.net>
5
-Build-Depends: debhelper (>= 9), libdvbcsa-dev, libssl-dev, libxml2-dev, libmcli-dev
6
-Standards-Version: 3.9.5
7
-Homepage: https://code.google.com/p/satip/
8
-
9
-Package: minisatip
10
-Architecture: any
11
-Depends: ${misc:Depends}, libdvbcsa1, libssl1.0.0, libxml2, libmcli
12
-Description: minisatip single threaded satip server
13
-

+ 0
- 36
m/minisatip-0.5.69-476-gbd493b1/debian/copyright View File

@@ -1,36 +0,0 @@
1
-Upstream Homepage:
2
-     git clone https://github.com/catalinii/minisatip.git
3
-
4
-Upstream Author:
5
-     catalinii
6
-
7
-Debian Maintainer(s):
8
-     Frodo <frodo-vdr (at) gmx (dot) net>
9
-
10
-Copyright:
11
-    (C) 2015 catalinii
12
-
13
-Copyright (Debian packaging):
14
-    (C) 2015 Frodo
15
-
16
-License:
17
-    This program is free software; you can redistribute it and/or modify
18
-    it under the terms of the GNU General Public License as published by
19
-    the Free Software Foundation; either version 2 of the License, or
20
-    (at your option) any later version.
21
-
22
-    This program is distributed in the hope that it will be useful,
23
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
24
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
25
-    GNU General Public License for more details.
26
-
27
-    You should have received a copy of the GNU General Public License along
28
-    with this program; if not, write to the Free Software Foundation, Inc.,
29
-    51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
30
-
31
-    The complete text of the GNU General Public License can be found
32
-    in /usr/share/common-licenses/GPL-2 on most Debian systems.
33
-
34
-License (Debian packaging):
35
-    The Debian packaging is licensed under the GPL, version 2 or any
36
-    later version, see /usr/share/common-licenses/GPL-2.

+ 0
- 103
m/minisatip-0.5.69-476-gbd493b1/debian/default/minisatip View File

@@ -1,103 +0,0 @@
1
-#
2
-# minisatip options
3
-#
4
-# minisatip [-[fgltz]] [-a x:y:z] [-b X:Y] [-c X] [-d A:C-U ] [-D device_id] [-e X-Y,Z] [-i prio] [-j A1:S1-F1[-PIN]] [-m mac] [-o oscam_host:dvbapi_port] [-p public_host] [-r remote_rtp_host] [-R document_root] [-s [DELSYS:]host[:port] [-u A1:S1-F1[-PIN]] [-w http_server[:port]] [-x http_port] [-X xml_path] [-y rtsp_port]
5
-#
6
-#
7
-# -a x:y:z simulate x DVB-S2, y DVB-T2 and z DVB-C adapters on this box (0 means auto-detect)
8
-#         eg: -a 1:2:3
9
-#         - it will report 1 dvb-s2 device, 2 dvb-t2 devices and 3 dvb-c devices
10
-#
11
-# -b --buffers X:Y : set the app adapter buffer to X Bytes (default: 25004) and set the kernel DVB buffer to Y Bytes (default: 5775360) - both multiple of 188
12
-#         eg: -b 18800:18988
13
-#
14
-# -c X: bandwidth capping for the output to the network [default: unlimited]
15
-#         eg: -c 2048  (does not allow minisatip to send more than 2048KB/s to all remote servers)
16
-#
17
-# -d --diseqc ADAPTER1:COMMITED1-UNCOMMITED1[,ADAPTER2:COMMITED2-UNCOMMITED2[,...]
18
-#         The first argument is the adapter number, second is the number of commited packets to send to a Diseqc 1.0 switch, third the number of uncommited commands to sent to a Diseqc 1.1 switch
19
-#         The higher number between the commited and uncommited will be sent first.
20
-#         eg: -d 0:1-0  (which is the default for each adapter).
21
-#
22
-# -D --device-id DVC_ID: specify the device id (in case there are multiple SAT>IP servers in the network)
23
-#         eg: -D 4
24
-#
25
-# -e --enable-adapters list_of_enabled adapters: enable only specified adapters
26
-#         eg: -e 0-2,5,7 (no spaces between parameters)
27
-#         - keep in mind that the first adapters are the local ones starting with 0 after that are the satip adapters
28
-#         if you have 3 local dvb cards 0-2 will be the local adapters, 3,4, ... will be the satip servers specified with argument -s
29
-#
30
-# -f  foreground, otherwise run in background
31
-#
32
-# -g use syslog instead stdout for logging, multiple -g - print to stderr as well
33
-#
34
-# -i --priority prio: set the process priority to prio (-10 increases the priority by 10)
35
-#
36
-# -l increases the verbosity (you can use multiple -l), logging to stdout in foreground mode or in /tmp/log when a daemon
37
-#         eg: -l -l -l
38
-#
39
-# -m xx: simulate xx as local mac address, generates UUID based on mac
40
-#         -m 001122334455
41
-#
42
-# -o --dvbapi host:port - specify the hostname and port for the dvbapi server (oscam)
43
-#         eg: -o 192.168.9.9:9000
44
-#        192.168.9.9 is the host where oscam is running and 9000 is the port configured in dvbapi section in oscam.conf
45
-#
46
-# -p url: specify playlist url using X_SATIPM3U header
47
-#         eg: -p http://192.168.2.3:8080/playlist
48
-#         - this will add X_SATIPM3U tag into the satip description xml
49
-#
50
-# -r --remote-rtp  remote_rtp_host: send the rtp stream to remote_rtp_host instead of the ip the connection comes from
51
-#         eg: -r 192.168.7.9
52
-#
53
-# -R --document-root directory: document root for the minisatip web page and images
54
-#
55
-# -s --satip-servers DELSYS:host:port - specify the remote satip host and port with delivery system DELSYS, it is possible to use multiple -s
56
-#         DELSYS - can be one of: dvbs, dvbs2, dvbt, dvbt2, dvbc, dvbc2, isdbt, atsc, dvbcb ( - DVBC_ANNEX_B ) [default: dvbs2]
57
-#         host - the server of the satip server
58
-#         port - rtsp port for the satip server [default: 554]
59
-#         eg: -s 192.168.1.2 -s dvbt:192.168.1.3:554 -s dvbc:192.168.1.4
60
-#         - specifies 1 dvbs2 (and dvbs)satip server with address 192.168.1.2:554
61
-#         - specifies 1 dvbt satip server  with address 192.168.1.3:554
62
-#         - specifies 1 dvbc satip server  with address 192.168.1.4:554
63
-#
64
-# -S --slave ADAPTER1,ADAPTER2-ADAPTER4[,..] - specify slave adapters
65
-#     Allows specifying bonded adapters (multiple adapters connected with a splitter to the same LNB)
66
-#     Only one adapter needs to be master all others needs to have this parameter specified
67
-#     eg: -S 1-2
68
-#     - specifies adapter 1 to 2 as slave, in this case adapter 0 can be the master that controls the LNB
69
-#
70
-# -t --cleanpsi clean the PSI from all CA information, the client will see the channel as clear if decrypted successfully
71
-#
72
-# -T --threads: enables/disable multiple threads (reduces memory consumptions) (default: ENABLED)
73
-#
74
-# -u --unicable unicable_string: defines the unicable adapters (A) and their slot (S), frequency (F) and optionally the PIN for the switch:
75
-#         The format is: A1:S1-F1[-PIN][,A2:S2-F2[-PIN][,...]]
76
-#         eg: 2:0-1284[-1111]
77
-#
78
-# -j --jess jess_string - same format as -u
79
-#
80
-# -w --http-host http_server[:port]: specify the host and the port (if not 80) where the xml file can be downloaded from [default: default_local_ip_address:8080]
81
-#         eg: -w 192.168.1.1:8080
82
-#
83
-# -x --http-port port: port for listening on http [default: 8080]
84
-#         eg: -x 9090
85
-#
86
-# -X --xml PATH: the path to the xml that is provided as part of the satip protocol
87
-#     by default desc.xml is provided by minisatip without needing an additional file,
88
-#     however satip.xml is included if it needs to be customized
89
-#
90
-# -y --rtsp-port rtsp_port: port for listening for rtsp requests [default: 554]
91
-#         eg: -y 5544
92
-#         - changing this to a port > 1024 removes the requirement for minisatip to run as root
93
-#
94
-# -z --check-signal force to get signal from the DVB hardware every 200ms (use with care, only when needed)
95
-#         - retrieving signal could take sometimes more than 200ms which could impact the rtp stream, using it only when you need to adjust your dish
96
-#
97
-# Example:
98
-# OPTIONS="-a 0:0:0 -s [IP-OctopusNet] -s [IP-DigibitR1] -x 9090 -o [IP-Oscam]:[Port DVBAPI Oscam]"
99
-OPTIONS="-x 9090"
100
-
101
-# remove comment to start minisatip
102
-START=yes
103
-

+ 0
- 1
m/minisatip-0.5.69-476-gbd493b1/debian/docs View File

@@ -1 +0,0 @@
1
-README.md

+ 0
- 57
m/minisatip-0.5.69-476-gbd493b1/debian/get-new-snapshot.sh View File

@@ -1,57 +0,0 @@
1
-#!/bin/bash
2
-# set -x
3
-
4
-DISTRIBUTION=trusty
5
-GITSOURCE='https://github.com/catalinii/minisatip.git'
6
-BUILDPREFIX=frodo
7
-FORCEVERSION=''
8
-
9
-DEB_SOURCE_PACKAGE=$(egrep '^Source: ' debian/control | cut -f 2 -d ' ')
10
-
11
-PKGVERSION=`dpkg-parsechangelog | sed -n 's/^Version: \(.*\)-.*/\1/p'`
12
-SUBVERSION=$(dpkg-parsechangelog | grep ^Version: | sed -e 's/^Version:\s*//' -e 's/~.*//g' | awk -F'-' '{ print $4 }' | sed -e "s/${BUILDPREFIX}.*//g")
13
-
14
-git pull origin
15
-CHANGES=$(git log --pretty=format:"%h: %s" -1)
16
-
17
-GIT_SHA=$(git show --pretty=format:"%h" --quiet | head -1 || true)
18
-# UPSTREAMVERSION="$(git describe)"
19
-UPSTREAMVERSION="$(git describe --tags 2> /dev/null)"
20
-if [ $? -ne 0 ] ; then
21
-	VERSION_BUILD=$(grep '#define VERSION_BUILD' minisatip.h | sed -e 's/^.*=//g' -e 's/[";]//g' | awk {' print $3 '})
22
-	VERSION_MAIN=$(grep '#define VERSION CC' minisatip.h | awk -F'(' '{print $2}' | awk -F',' '{print $1}')
23
-	SOURCEVERSION=${VERSION_MAIN}${VERSION_BUILD}
24
-        GITHEAD=`git rev-list HEAD | wc -l`
25
-        UPSTREAMVERSION="${SOURCEVERSION}-${GITHEAD}-g${GIT_SHA}"
26
-fi
27
-
28
-
29
-
30
-test=$(grep ${GIT_SHA} debian/changelog)
31
-if [ $? -eq 0 ] ; then
32
-        SUBVERSION=$((SUBVERSION +1))
33
-else
34
-        SUBVERSION=0
35
-fi
36
-
37
-NEWVERSION=${UPSTREAMVERSION}-${SUBVERSION}${BUILDPREFIX}0~${DISTRIBUTION}
38
-
39
-if [ ! -f ../${DEB_SOURCE_PACKAGE}_${VERSION_FULL}.orig.tar.xz ] ; then
40
-        test=$(git config -l | grep xz)
41
-        if [ $? -ne 0 ] ; then
42
-                git config tar.tar.xz.command "xz -c"
43
-        fi
44
-        git archive --format=tar.xz --prefix=${DEB_SOURCE_PACKAGE}-${UPSTREAMVERSION}/ --output=../${DEB_SOURCE_PACKAGE}_${UPSTREAMVERSION}.orig.tar.xz origin/master
45
-fi
46
-dch -v ${FORCEVERSION}${NEWVERSION} -u medium -D ${DISTRIBUTION} --force-distribution "new upstream snapshot"
47
-[ $? -ne 0 ] && exit 1
48
-while read -r line ; do dch -a "${line}" ; done <<< "${CHANGES}"
49
-debuild -S -sa
50
-
51
-OTHERDISTRIBUTION=xenial
52
-OTHERVERSION=${UPSTREAMVERSION}-${SUBVERSION}${BUILDPREFIX}0~${OTHERDISTRIBUTION}
53
-dch -v ${FORCEVERSION}${OTHERVERSION} --force-bad-version -u medium -D ${OTHERDISTRIBUTION} --force-distribution "rebuild for ${OTHERDISTRIBUTION}"
54
-while read -r line ; do dch -a "${line}" ; done <<< "${CHANGES}"
55
-debuild -S -sa
56
-
57
-exit 0

+ 0
- 3
m/minisatip-0.5.69-476-gbd493b1/debian/install View File

@@ -1,3 +0,0 @@
1
-minisatip usr/bin
2
-debian/default/minisatip etc/default
3
-html/* var/lib/minisatip

+ 0
- 79
m/minisatip-0.5.69-476-gbd493b1/debian/minisatip.init View File

@@ -1,79 +0,0 @@
1
-#!/bin/sh
2
-# Start/stop the minisatip daemon
3
-#
4
-### BEGIN INIT INFO
5
-# Provides:          minisatip
6
-# Required-Start:    $syslog $network $pcscd
7
-# Required-Stop:     $syslog $network $pcscd
8
-# Default-Start:     2 3 4 5
9
-# Default-Stop:      0 1 6
10
-# Short-Description: Start and Stop minisatip
11
-# Description: minisatip init script. This script start and stop minisatip
12
-### END INIT INFO
13
-
14
-. /lib/lsb/init-functions
15
-
16
-DESC="minisatip Server"
17
-BINARY=minisatip
18
-DAEMON=/usr/bin/$BINARY
19
-PIDFILE=/var/run/minisatip.pid
20
-LOG=/var/log/minisatip.log
21
-CONFIG=/etc/default/minisatip
22
-START="$DAEMON -- --document-root /var/lib/minisatip $OPTIONS"
23
-
24
-#test -f $DAEMON || exit 0
25
-[ -x $DAEMON ] || exit 1
26
-[ -f $CONFIG ] || exit 1
27
-
28
-. $CONFIG
29
-
30
-if [ -z "$START" ]; then
31
-  echo "Start was disabled in $CONFIG"
32
-  exit 1
33
-fi
34
-
35
-
36
-START="$DAEMON -- $OPTIONS"
37
-
38
-clear_file() {
39
-  # Clear log and pid file if exists
40
-  if [ -e $PIDFILE ]; then
41
-    rm -f $PIDFILE
42
-  fi
43
-
44
-  if [ -e $LOG ]; then
45
-    rm -f $LOG
46
-  fi
47
-}
48
-
49
-case "$1" in
50
-  start)
51
-    clear_file
52
-    log_daemon_msg "Starting $DESC"
53
-    start-stop-daemon --start --quiet --exe $DAEMON --startas $START
54
-    pidof $BINARY > $PIDFILE
55
-    log_end_msg $?
56
-  ;;
57
-  stop)
58
-    log_daemon_msg "Stopping $DESC"
59
-    start-stop-daemon --stop --quiet --exe $DAEMON
60
-    log_end_msg $?
61
-  ;;
62
-  restart)
63
-    log_daemon_msg "Restarting $DESC" 
64
-    start-stop-daemon --stop --retry 5 --quiet --exe $DAEMON
65
-    clear_file
66
-    start-stop-daemon --start --quiet --exe $DAEMON --startas $START
67
-    pidof $BINARY > $PIDFILE
68
-    log_end_msg $?
69
-  ;;
70
-  status)
71
-    status_of_proc -p $PIDFILE $DAEMON $BINARY && exit 0 || exit $?
72
-  ;;
73
-  *)
74
-    log_action_msg "Usage: /etc/init.d/${BINARY} {start|stop|restart|status}"
75
-    exit 2
76
-  ;;
77
-esac
78
-
79
-exit 0

+ 0
- 44
m/minisatip-0.5.69-476-gbd493b1/debian/minisatip.upstart View File

@@ -1,44 +0,0 @@
1
-# minisatip - satip server
2
-#
3
-
4
-description "minisatip server"
5
-
6
-start on local-filesystems and net-device-up IFACE!=lo
7
-stop on runlevel [!2345]
8
-
9
-emits minisatip-started
10
-emits minisatip-stopped
11
-
12
-console log
13
-
14
-respawn
15
-respawn limit 5 60
16
-
17
-pre-start script
18
-  if [ -f /etc/default/minisatip ] ; then
19
-    . /etc/default/minisatip
20
-  fi
21
-  if [ "$START" != 'yes' ] ; then
22
-    echo "minisatip is disabled in /etc/default/minisatip"
23
-    exit 1
24
-  fi
25
-
26
-  if [ ! -x /usr/bin/minisatip ] ; then
27
-    exit 1
28
-  fi
29
-
30
-end script
31
-
32
-script
33
-  . /etc/default/minisatip
34
-  exec /usr/bin/minisatip -f --document-root /var/lib/minisatip $OPTIONS
35
-end script
36
-
37
-post-start script
38
-    initctl emit --no-wait minisatip-started
39
-end script
40
-
41
-post-stop script
42
-    initctl emit --no-wait minisatip-stopped
43
-end script
44
-

+ 0
- 16
m/minisatip-0.5.69-476-gbd493b1/debian/rules View File

@@ -1,16 +0,0 @@
1
-#!/usr/bin/make -f
2
-
3
-
4
-#export DH_VERBOSE=1
5
-%:
6
-	dh $@
7
-
8
-override_dh_auto_configure:
9
-	dh_auto_configure -- --with-mcli=/usr/include/libmcli
10
-
11
-override_dh_installinit:
12
-	dh_installinit --name=minisatip --no-start
13
-
14
-override_dh_auto_clean:
15
-	@-rm -f *.o minisatip config.log config.status Makefile
16
-

+ 0
- 1
m/minisatip-0.5.69-476-gbd493b1/debian/source/format View File

@@ -1 +0,0 @@
1
-3.0 (quilt)

+ 0
- 1145
m/minisatip-0.5.69-476-gbd493b1/dvb.c
File diff suppressed because it is too large
View File


+ 0
- 245
m/minisatip-0.5.69-476-gbd493b1/dvb.h View File

@@ -1,245 +0,0 @@
1
-#ifndef DVB_H
2
-#define DVB_H
3
-
4
-#ifdef DISABLE_LINUXDVB
5
-//#include <linux/types.h>
6
-#include <stdint.h>
7
-#include <time.h>
8
-#define DVBAPIVERSION 0x0500
9
-#define LOGDVBAPIVERSION 0x0000
10
-#endif
11
-
12
-#ifndef DISABLE_LINUXDVB
13
-#include <linux/dvb/frontend.h>
14
-#include <linux/dvb/dmx.h>
15
-#include <linux/dvb/ca.h>
16
-#include <linux/dvb/version.h>
17
-#define DVBAPIVERSION (DVB_API_VERSION << 8 | DVB_API_VERSION_MINOR)
18
-#define LOGDVBAPIVERSION DVBAPIVERSION
19
-#endif
20
-
21
-#if DVBAPIVERSION < 0x0500
22
-#error minisatip requires Linux DVB driver API version 5.0 or higher!
23
-#endif
24
-
25
-
26
-#ifdef DISABLE_LINUXDVB
27
-typedef enum fe_delivery_system {
28
-        SYS_UNDEFINED,
29
-        SYS_DVBC_ANNEX_AC,
30
-        SYS_DVBC_ANNEX_B,
31
-        SYS_DVBT,
32
-        SYS_DSS,
33
-        SYS_DVBS,
34
-        SYS_DVBS2,
35
-        SYS_DVBH,
36
-        SYS_ISDBT,
37
-        SYS_ISDBS,
38
-        SYS_ISDBC,
39
-        SYS_ATSC,
40
-        SYS_ATSCMH,
41
-        SYS_DMBTH,
42
-        SYS_CMMB,
43
-        SYS_DAB,
44
-        SYS_DVBT2,
45
-        SYS_TURBO,
46
-} fe_delivery_system_t;
47
-typedef enum fe_status {
48
-        FE_HAS_SIGNAL   = 0x01,
49
-        FE_HAS_CARRIER  = 0x02,
50
-        FE_HAS_VITERBI  = 0x04,
51
-        FE_HAS_SYNC     = 0x08,
52
-        FE_HAS_LOCK     = 0x10,
53
-        FE_TIMEDOUT     = 0x20,
54
-        FE_REINIT       = 0x40
55
-} fe_status_t;
56
-typedef enum fe_code_rate {
57
-        FEC_NONE = 0,
58
-        FEC_1_2,
59
-        FEC_2_3,
60
-        FEC_3_4,
61
-        FEC_4_5,
62
-        FEC_5_6,
63
-        FEC_6_7,
64
-        FEC_7_8,
65
-        FEC_8_9,
66
-        FEC_AUTO,
67
-        FEC_3_5,
68
-        FEC_9_10,
69
-} fe_code_rate_t;
70
-typedef enum fe_rolloff {
71
-        ROLLOFF_35,
72
-        ROLLOFF_20,
73
-        ROLLOFF_25,
74
-        ROLLOFF_AUTO,
75
-} fe_rolloff_t;
76
-typedef enum fe_pilot {
77
-        PILOT_ON,
78
-        PILOT_OFF,
79
-        PILOT_AUTO,
80
-} fe_pilot_t;
81
-typedef enum fe_bandwidth {
82
-        BANDWIDTH_8_MHZ,
83
-        BANDWIDTH_7_MHZ,
84
-        BANDWIDTH_6_MHZ,
85
-        BANDWIDTH_AUTO,
86
-        BANDWIDTH_5_MHZ,
87
-        BANDWIDTH_10_MHZ,
88
-        BANDWIDTH_1_712_MHZ,
89
-} fe_bandwidth_t;
90
-typedef enum fe_guard_interval {
91
-        GUARD_INTERVAL_1_32,
92
-        GUARD_INTERVAL_1_16,
93
-        GUARD_INTERVAL_1_8,
94
-        GUARD_INTERVAL_1_4,
95
-        GUARD_INTERVAL_AUTO,
96
-        GUARD_INTERVAL_1_128,
97
-        GUARD_INTERVAL_19_128,
98
-        GUARD_INTERVAL_19_256,
99
-} fe_guard_interval_t;
100
-typedef enum fe_spectral_inversion {
101
-        INVERSION_OFF,
102
-        INVERSION_ON,
103
-        INVERSION_AUTO
104
-} fe_spectral_inversion_t;
105
-typedef enum fe_transmit_mode {
106
-        TRANSMISSION_MODE_2K,
107
-        TRANSMISSION_MODE_8K,
108
-        TRANSMISSION_MODE_AUTO,
109
-        TRANSMISSION_MODE_4K,
110
-        TRANSMISSION_MODE_1K,
111
-        TRANSMISSION_MODE_16K,
112
-        TRANSMISSION_MODE_32K,
113
-} fe_transmit_mode_t;
114
-typedef enum fe_type {
115
-        FE_QPSK,
116
-        FE_QAM,
117
-        FE_OFDM,
118
-        FE_ATSC
119
-} fe_type_t;
120
-typedef enum fe_modulation {
121
-        QPSK,
122
-        QAM_16,
123
-        QAM_32,
124
-        QAM_64,
125
-        QAM_128,
126
-        QAM_256,
127
-        QAM_AUTO,
128
-        VSB_8,
129
-        VSB_16,
130
-        PSK_8,
131
-        APSK_16,
132
-        APSK_32,
133
-        DQPSK,
134
-} fe_modulation_t;
135
-#endif
136
-
137
-
138
-#if DVBAPIVERSION < 0x0505
139
-#define DTV_ENUM_DELSYS 44
140
-#define SYS_DVBC_ANNEX_A       SYS_DVBC_ANNEX_AC
141
-#endif
142
-
143
-#ifndef SYS_DVBC2
144
-#define SYS_DVBC2 19 // support for DVB-C2 DD 
145
-#endif
146
-
147
-#ifndef SYS_DVBT2
148
-#define SYS_DVBT2 16
149
-#endif
150
-
151
-#define LP_CODERATE_DEFAULT (0)
152
-
153
-#ifndef DTV_STREAM_ID
154
-#define DTV_STREAM_ID           42
155
-#endif
156
-
157
-#define MIN_FRQ_DVBT  174000
158
-#define MAX_FRQ_DVBT  858000
159
-#define MIN_FRQ_DVBC   51000
160
-#define MAX_FRQ_DVBC  860000
161
-#define MIN_FRQ_DVBS  950000
162
-#define MAX_FRQ_DVBS 2150000
163
-
164
-typedef struct diseqc
165
-{
166
-#define SWITCH_UNICABLE 1
167
-#define SWITCH_JESS 2
168
-#define SWITCH_SLAVE 3
169
-	int switch_type;
170
-	/* parameters */
171
-	int uslot; // unicable/jess slot
172
-	int ufreq; // unicable/jess frequency
173
-	int pin;
174
-	int only13v; // unicable - use 13V voltage only
175
-	int fast;    // don't send diseqc without position change
176
-	int committed_no, uncommitted_no; // diseqc info
177
-	/* timing */
178
-	int before_cmd;
179
-	int after_cmd;
180
-	int after_repeated_cmd;
181
-	int after_switch;
182
-	int after_burst;
183
-	int after_tone;
184
-	
185
-	int lnb_low, lnb_high, lnb_circular, lnb_switch;
186
-} diseqc;
187
-
188
-typedef struct struct_transponder
189
-{
190
-	fe_delivery_system_t sys;
191
-	int freq;
192
-	int inversion;
193
-	int mtype;
194
-	int fe;
195
-
196
-	// DVB-T
197
-	int hprate;
198
-	int tmode;
199
-	int gi;
200
-	int bw;
201
-	int sm;
202
-	int t2id;
203
-
204
-	// DVB-S2
205
-	int ro;
206
-	int plts;
207
-	int fec;
208
-	int sr;
209
-	int pol;
210
-	int diseqc;
211
-
212
-	diseqc diseqc_param;
213
-
214
-	// DVB-C2
215
-	int c2tft;
216
-	int ds;
217
-	int plp;
218
-	
219
-	char *apids, *pids, *dpids, *x_pmt;
220
-} transponder;
221
-
222
-#define MAX_PIDS 64
223
-
224
-#ifndef DISABLE_LINUXDVB
225
-//int tune_it(int fd_frontend, unsigned int freq, unsigned int srate, char pol, int tone, fe_spectral_inversion_t specInv, unsigned char diseqc,fe_modulation_t modulation,fe_code_rate_t HP_CodeRate,fe_transmit_mode_t TransmissionMode,fe_guard_interval_t guardInterval, fe_bandwidth_t bandwidth);
226
-int tune_it_s2 (int fd_frontend, transponder * tp);
227
-
228
-fe_delivery_system_t dvb_delsys (int aid, int fd, fe_delivery_system_t *sys);
229
-#endif
230
-int detect_dvb_parameters (char *s, transponder * tp);
231
-void init_dvb_parameters (transponder * tp);
232
-void copy_dvb_parameters (transponder * s, transponder * d);
233
-
234
-char *get_pilot(int i);
235
-char *get_rolloff(int i);
236
-char *get_delsys(int i);
237
-char *get_fec(int i);
238
-char *get_modulation(int i);
239
-char *get_tmode(int i);
240
-char *get_gi(int i);
241
-char *get_specinv(int i);
242
-char *get_pol(int i);
243
-
244
-
245
-#endif							 /*  */

+ 0
- 1142
m/minisatip-0.5.69-476-gbd493b1/dvbapi.c
File diff suppressed because it is too large
View File


+ 0
- 129
m/minisatip-0.5.69-476-gbd493b1/dvbapi.h View File

@@ -1,129 +0,0 @@
1
-#ifndef DISABLE_DVBAPI
2
-#ifndef DVBAPI_H
3
-#define DVBAPI_H
4
-
5
-#include "adapter.h"
6
-#include "stream.h"
7
-
8
-
9
-#define DVBAPI_PROTOCOL_VERSION         2
10
-
11
-#define DVBAPI_FILTER_DATA     0xFFFF0000
12
-#define DVBAPI_CLIENT_INFO     0xFFFF0001
13
-#define DVBAPI_SERVER_INFO     0xFFFF0002
14
-#define DVBAPI_DMX_SET_FILTER  	   0x403c6f2b
15
-#define DVBAPI_CA_SET_PID      0x40086f87
16
-#define DVBAPI_CA_SET_DESCR    0x40106f86
17
-#define DVBAPI_DMX_STOP        0x00006f2a
18
-#define CA_SET_DESCR_X     0x866f10
19
-#define CA_SET_DESCR_AES   0x40106f87
20
-#define CA_SET_DESCR_AES_X 0x876f10
21
-#define CA_SET_PID_X       0x876f08
22
-#define DMX_STOP_X         0x2a6f00
23
-#define DMX_SET_FILTER_X   0x2b6f3c
24
-#define DVBAPI_ECM_INFO    0xFFFF0003
25
-#define CA_SET_DESCR_MODE  0x400c6f88
26
-
27
-
28
-#define AOT_CA_PMT 0x9F803282
29
-
30
-#define CAPMT_LIST_MORE    0x00    // append a 'MORE' CAPMT object the list and start receiving the next object
31
-#define CAPMT_LIST_FIRST   0x01    // clear the list when a 'FIRST' CAPMT object is received, and start receiving the next object
32
-#define CAPMT_LIST_LAST    0x02    // append a 'LAST' CAPMT object to the list and start working with the list
33
-#define CAPMT_LIST_ONLY    0x03    // clear the list when an 'ONLY' CAPMT object is received, and start working with the object
34
-#define CAPMT_LIST_ADD     0x04    // append an 'ADD' CAPMT object to the current list and start working with the updated list
35
-#define CAPMT_LIST_UPDATE  0x05    // replace an entry in the list with an 'UPDATE' CAPMT object, and start working with the updated list
36
-
37
-
38
-#define MAX_KEYS 255
39
-#define MAX_PMT_DATA 1880
40
-
41
-#define	CA_ALGO_DVBCSA 0
42
-#define	CA_ALGO_DES 1
43
-#define CA_ALGO_AES128 2
44
-
45
-#define CA_MODE_ECB 0
46
-#define	CA_MODE_CBC 1
47
-
48
-typedef struct struct_batch  // same as struct dvbcsa_bs_batch_s
49
-{
50
-  unsigned char         *data;  /* pointer to payload */
51
-  unsigned int          len;    /* payload bytes lenght */
52
-} dvbapi_batch;
53
-
54
-
55
-typedef void *(*Create_cwkey)(void );
56
-typedef void (*Delete_cwkey)(void *);
57
-typedef int (*Batch_size)(void);
58
-typedef void (*Set_CW)(unsigned char *cw,void *key);
59
-typedef void (*Decrypt_Stream)(void *key, dvbapi_batch *batch, int batch_len);
60
-
61
-
62
-
63
-typedef struct struct_dvbapi_op
64
-{
65
-	int algo;
66
-	int mode;
67
-	Create_cwkey create_cwkey;
68
-	Delete_cwkey delete_cwkey;
69
-	Batch_size batch_size;
70
-	Set_CW set_cw;
71
-	Decrypt_Stream decrypt_stream;
72
-} dvbapi_op;
73
-
74
-
75
-typedef struct struct_key
76
-{
77
-	char enabled;
78
-	SMutex mutex;
79
-	void *key[2];
80
-	char key_ok[2];
81
-	unsigned char cw[2][16];
82
-	char next_cw[2][16];
83
-	uint32_t cw_time[2];
84
-	int key_len;
85
-	int sid;
86
-	int pmt_pid;
87
-	int64_t last_ecm, last_dmx_stop;
88
-	uint8_t hops;
89
-	uint16_t caid, info_pid;
90
-	uint32_t prid;
91
-	int ecmtime;
92
-	int id;
93
-	int adapter;
94
-	int demux;
95
-	int ver;
96
-	int ecms;
97
-	int program_id;  // pmt sid
98
-	unsigned char *pi, *ecm_info, *cardsystem, *reader, *from, *protocol;
99
-	int pi_len;
100
-	dvbapi_batch batch[130];
101
-	int parity;
102
-	int blen;
103
-	int64_t last_parity_change;
104
-	struct struct_key *next_key;
105
-	dvbapi_op *op;
106
-} SKey;
107
-
108
-#define MAX_KEY_TIME 25000 // 25s
109
-
110
-void init_dvbapi();
111
-int have_dvbapi();
112
-int dvbapi_enabled();
113
-int send_ecm(adapter *ad, void *arg);
114
-int batch_size();
115
-int decrypt_stream(adapter *ad, void *arg);
116
-int keys_add(int i, int adapter, int sid, int pmt);
117
-int keys_del(int i);
118
-SKey *get_key(int i);
119
-int dvbapi_process_pmt(unsigned char *b, adapter *ad);
120
-void dvbapi_pid_add(adapter *a,int pid, SPid *cp, int existing);
121
-void dvbapi_pid_del(adapter *a,int pid, SPid *cp);
122
-void dvbapi_delete_keys_for_adapter(int aid);
123
-void register_dvbapi();
124
-void unregister_dvbapi();
125
-void send_client_info(sockets *s);
126
-int set_algo(SKey *k, int algo, int mode);
127
-
128
-#endif
129
-#endif

+ 0
- 53
m/minisatip-0.5.69-476-gbd493b1/html/dLAN.xml View File

@@ -1,53 +0,0 @@
1
-<?xml version="1.0"?>
2
-<root xmlns="urn:schemas-upnp-org:device-1-0" configId="">
3
-    <specVersion>
4
-        <major>1</major>
5
-        <minor>1</minor>
6
-    </specVersion>
7
-    <device>
8
-        <deviceType>urn:ses-com:device:SatIPServer:1</deviceType>
9
-        <friendlyName>dLAN&#174; TV SAT Multituner</friendlyName>
10
-        <manufacturer>devolo</manufacturer>
11
-        <manufacturerURL>http://www.devolo.de</manufacturerURL>
12
-        <modelDescription>dLAN&#174; TV SAT Multituner</modelDescription>
13
-        <modelName>dLAN&#174; TV SAT Multituner</modelName>
14
-        <modelNumber>2440</modelNumber>
15
-        <modelURL>http://www.sat-ohne-kabel.de</modelURL>
16
-        <serialNumber></serialNumber>
17
-        <UDN></UDN>
18
-        <UPC></UPC>
19
-        <iconList>
20
-            <icon>
21
-                <mimetype>image/jpeg</mimetype>
22
-                <width>48</width>
23
-                <height>48</height>
24
-                <depth>32</depth>
25
-                <url>/images/satip48.jpg</url>
26
-            </icon>
27
-            <icon>
28
-                <mimetype>image/png</mimetype>
29
-                <width>48</width>
30
-                <height>48</height>
31
-                <depth>32</depth>
32
-                <url>/images/satip48.png</url>
33
-            </icon>
34
-            <icon>
35
-                <mimetype>image/jpeg</mimetype>
36
-                <width>120</width>
37
-                <height>120</height>
38
-                <depth>32</depth>
39
-                <url>/images/satip120.jpg</url>
40
-            </icon>
41
-            <icon>
42
-                <mimetype>image/png</mimetype>
43
-                <width>120</width>
44
-                <height>120</height>
45
-                <depth>32</depth>
46
-                <url>/images/satip120.png</url>
47
-            </icon>
48
-        </iconList>
49
-        <presentationURL>/</presentationURL>
50
-        <firmwareVersion></firmwareVersion>
51
-        <firmwareDate></firmwareDate>
52
-    </device>
53
-</root>

BIN
m/minisatip-0.5.69-476-gbd493b1/html/dvbc.png View File


BIN
m/minisatip-0.5.69-476-gbd493b1/html/dvbc2.png View File


BIN
m/minisatip-0.5.69-476-gbd493b1/html/dvbs.png View File


BIN
m/minisatip-0.5.69-476-gbd493b1/html/dvbs2.png View File


BIN
m/minisatip-0.5.69-476-gbd493b1/html/dvbs2x.png View File


BIN
m/minisatip-0.5.69-476-gbd493b1/html/dvbt.png View File


BIN
m/minisatip-0.5.69-476-gbd493b1/html/dvbt2.png View File


+ 0
- 5
m/minisatip-0.5.69-476-gbd493b1/html/jquery-1.12.0.min.js
File diff suppressed because it is too large
View File


+ 0
- 1
m/minisatip-0.5.69-476-gbd493b1/html/jquery.dataTables.min.css
File diff suppressed because it is too large
View File


+ 0
- 166
m/minisatip-0.5.69-476-gbd493b1/html/jquery.dataTables.min.js View File

@@ -1,166 +0,0 @@
1
-/*!
2
- DataTables 1.10.11
3
- ©2008-2015 SpryMedia Ltd - datatables.net/license
4
-*/
5
-(function(h){"function"===typeof define&&define.amd?define(["jquery"],function(D){return h(D,window,document)}):"object"===typeof exports?module.exports=function(D,I){D||(D=window);I||(I="undefined"!==typeof window?require("jquery"):require("jquery")(D));return h(I,D,D.document)}:h(jQuery,window,document)})(function(h,D,I,k){function Y(a){var b,c,d={};h.each(a,function(e){if((b=e.match(/^([^A-Z]+?)([A-Z])/))&&-1!=="a aa ai ao as b fn i m o s ".indexOf(b[1]+" "))c=e.replace(b[0],b[2].toLowerCase()),
6
-d[c]=e,"o"===b[1]&&Y(a[e])});a._hungarianMap=d}function K(a,b,c){a._hungarianMap||Y(a);var d;h.each(b,function(e){d=a._hungarianMap[e];if(d!==k&&(c||b[d]===k))"o"===d.charAt(0)?(b[d]||(b[d]={}),h.extend(!0,b[d],b[e]),K(a[d],b[d],c)):b[d]=b[e]})}function Fa(a){var b=m.defaults.oLanguage,c=a.sZeroRecords;!a.sEmptyTable&&(c&&"No data available in table"===b.sEmptyTable)&&E(a,a,"sZeroRecords","sEmptyTable");!a.sLoadingRecords&&(c&&"Loading..."===b.sLoadingRecords)&&E(a,a,"sZeroRecords","sLoadingRecords");
7
-a.sInfoThousands&&(a.sThousands=a.sInfoThousands);(a=a.sDecimal)&&db(a)}function eb(a){A(a,"ordering","bSort");A(a,"orderMulti","bSortMulti");A(a,"orderClasses","bSortClasses");A(a,"orderCellsTop","bSortCellsTop");A(a,"order","aaSorting");A(a,"orderFixed","aaSortingFixed");A(a,"paging","bPaginate");A(a,"pagingType","sPaginationType");A(a,"pageLength","iDisplayLength");A(a,"searching","bFilter");"boolean"===typeof a.sScrollX&&(a.sScrollX=a.sScrollX?"100%":"");"boolean"===typeof a.scrollX&&(a.scrollX=
8
-a.scrollX?"100%":"");if(a=a.aoSearchCols)for(var b=0,c=a.length;b<c;b++)a[b]&&K(m.models.oSearch,a[b])}function fb(a){A(a,"orderable","bSortable");A(a,"orderData","aDataSort");A(a,"orderSequence","asSorting");A(a,"orderDataType","sortDataType");var b=a.aDataSort;b&&!h.isArray(b)&&(a.aDataSort=[b])}function gb(a){if(!m.__browser){var b={};m.__browser=b;var c=h("<div/>").css({position:"fixed",top:0,left:0,height:1,width:1,overflow:"hidden"}).append(h("<div/>").css({position:"absolute",top:1,left:1,
9
-width:100,overflow:"scroll"}).append(h("<div/>").css({width:"100%",height:10}))).appendTo("body"),d=c.children(),e=d.children();b.barWidth=d[0].offsetWidth-d[0].clientWidth;b.bScrollOversize=100===e[0].offsetWidth&&100!==d[0].clientWidth;b.bScrollbarLeft=1!==Math.round(e.offset().left);b.bBounding=c[0].getBoundingClientRect().width?!0:!1;c.remove()}h.extend(a.oBrowser,m.__browser);a.oScroll.iBarWidth=m.__browser.barWidth}function hb(a,b,c,d,e,f){var g,j=!1;c!==k&&(g=c,j=!0);for(;d!==e;)a.hasOwnProperty(d)&&
10
-(g=j?b(g,a[d],d,a):a[d],j=!0,d+=f);return g}function Ga(a,b){var c=m.defaults.column,d=a.aoColumns.length,c=h.extend({},m.models.oColumn,c,{nTh:b?b:I.createElement("th"),sTitle:c.sTitle?c.sTitle:b?b.innerHTML:"",aDataSort:c.aDataSort?c.aDataSort:[d],mData:c.mData?c.mData:d,idx:d});a.aoColumns.push(c);c=a.aoPreSearchCols;c[d]=h.extend({},m.models.oSearch,c[d]);ja(a,d,h(b).data())}function ja(a,b,c){var b=a.aoColumns[b],d=a.oClasses,e=h(b.nTh);if(!b.sWidthOrig){b.sWidthOrig=e.attr("width")||null;var f=
11
-(e.attr("style")||"").match(/width:\s*(\d+[pxem%]+)/);f&&(b.sWidthOrig=f[1])}c!==k&&null!==c&&(fb(c),K(m.defaults.column,c),c.mDataProp!==k&&!c.mData&&(c.mData=c.mDataProp),c.sType&&(b._sManualType=c.sType),c.className&&!c.sClass&&(c.sClass=c.className),h.extend(b,c),E(b,c,"sWidth","sWidthOrig"),c.iDataSort!==k&&(b.aDataSort=[c.iDataSort]),E(b,c,"aDataSort"));var g=b.mData,j=Q(g),i=b.mRender?Q(b.mRender):null,c=function(a){return"string"===typeof a&&-1!==a.indexOf("@")};b._bAttrSrc=h.isPlainObject(g)&&
12
-(c(g.sort)||c(g.type)||c(g.filter));b._setter=null;b.fnGetData=function(a,b,c){var d=j(a,b,k,c);return i&&b?i(d,b,a,c):d};b.fnSetData=function(a,b,c){return R(g)(a,b,c)};"number"!==typeof g&&(a._rowReadObject=!0);a.oFeatures.bSort||(b.bSortable=!1,e.addClass(d.sSortableNone));a=-1!==h.inArray("asc",b.asSorting);c=-1!==h.inArray("desc",b.asSorting);!b.bSortable||!a&&!c?(b.sSortingClass=d.sSortableNone,b.sSortingClassJUI=""):a&&!c?(b.sSortingClass=d.sSortableAsc,b.sSortingClassJUI=d.sSortJUIAscAllowed):
13
-!a&&c?(b.sSortingClass=d.sSortableDesc,b.sSortingClassJUI=d.sSortJUIDescAllowed):(b.sSortingClass=d.sSortable,b.sSortingClassJUI=d.sSortJUI)}function U(a){if(!1!==a.oFeatures.bAutoWidth){var b=a.aoColumns;Ha(a);for(var c=0,d=b.length;c<d;c++)b[c].nTh.style.width=b[c].sWidth}b=a.oScroll;(""!==b.sY||""!==b.sX)&&ka(a);u(a,null,"column-sizing",[a])}function Z(a,b){var c=la(a,"bVisible");return"number"===typeof c[b]?c[b]:null}function $(a,b){var c=la(a,"bVisible"),c=h.inArray(b,c);return-1!==c?c:null}
14
-function aa(a){return h(F(a.aoColumns,"nTh")).filter(":visible").length}function la(a,b){var c=[];h.map(a.aoColumns,function(a,e){a[b]&&c.push(e)});return c}function Ia(a){var b=a.aoColumns,c=a.aoData,d=m.ext.type.detect,e,f,g,j,i,h,l,q,t;e=0;for(f=b.length;e<f;e++)if(l=b[e],t=[],!l.sType&&l._sManualType)l.sType=l._sManualType;else if(!l.sType){g=0;for(j=d.length;g<j;g++){i=0;for(h=c.length;i<h;i++){t[i]===k&&(t[i]=B(a,i,e,"type"));q=d[g](t[i],a);if(!q&&g!==d.length-1)break;if("html"===q)break}if(q){l.sType=
15
-q;break}}l.sType||(l.sType="string")}}function ib(a,b,c,d){var e,f,g,j,i,n,l=a.aoColumns;if(b)for(e=b.length-1;0<=e;e--){n=b[e];var q=n.targets!==k?n.targets:n.aTargets;h.isArray(q)||(q=[q]);f=0;for(g=q.length;f<g;f++)if("number"===typeof q[f]&&0<=q[f]){for(;l.length<=q[f];)Ga(a);d(q[f],n)}else if("number"===typeof q[f]&&0>q[f])d(l.length+q[f],n);else if("string"===typeof q[f]){j=0;for(i=l.length;j<i;j++)("_all"==q[f]||h(l[j].nTh).hasClass(q[f]))&&d(j,n)}}if(c){e=0;for(a=c.length;e<a;e++)d(e,c[e])}}
16
-function N(a,b,c,d){var e=a.aoData.length,f=h.extend(!0,{},m.models.oRow,{src:c?"dom":"data",idx:e});f._aData=b;a.aoData.push(f);for(var g=a.aoColumns,j=0,i=g.length;j<i;j++)g[j].sType=null;a.aiDisplayMaster.push(e);b=a.rowIdFn(b);b!==k&&(a.aIds[b]=f);(c||!a.oFeatures.bDeferRender)&&Ja(a,e,c,d);return e}function ma(a,b){var c;b instanceof h||(b=h(b));return b.map(function(b,e){c=Ka(a,e);return N(a,c.data,e,c.cells)})}function B(a,b,c,d){var e=a.iDraw,f=a.aoColumns[c],g=a.aoData[b]._aData,j=f.sDefaultContent,
17
-i=f.fnGetData(g,d,{settings:a,row:b,col:c});if(i===k)return a.iDrawError!=e&&null===j&&(L(a,0,"Requested unknown parameter "+("function"==typeof f.mData?"{function}":"'"+f.mData+"'")+" for row "+b+", column "+c,4),a.iDrawError=e),j;if((i===g||null===i)&&null!==j&&d!==k)i=j;else if("function"===typeof i)return i.call(g);return null===i&&"display"==d?"":i}function jb(a,b,c,d){a.aoColumns[c].fnSetData(a.aoData[b]._aData,d,{settings:a,row:b,col:c})}function La(a){return h.map(a.match(/(\\.|[^\.])+/g)||
18
-[""],function(a){return a.replace(/\\./g,".")})}function Q(a){if(h.isPlainObject(a)){var b={};h.each(a,function(a,c){c&&(b[a]=Q(c))});return function(a,c,f,g){var j=b[c]||b._;return j!==k?j(a,c,f,g):a}}if(null===a)return function(a){return a};if("function"===typeof a)return function(b,c,f,g){return a(b,c,f,g)};if("string"===typeof a&&(-1!==a.indexOf(".")||-1!==a.indexOf("[")||-1!==a.indexOf("("))){var c=function(a,b,f){var g,j;if(""!==f){j=La(f);for(var i=0,n=j.length;i<n;i++){f=j[i].match(ba);g=
19
-j[i].match(V);if(f){j[i]=j[i].replace(ba,"");""!==j[i]&&(a=a[j[i]]);g=[];j.splice(0,i+1);j=j.join(".");if(h.isArray(a)){i=0;for(n=a.length;i<n;i++)g.push(c(a[i],b,j))}a=f[0].substring(1,f[0].length-1);a=""===a?g:g.join(a);break}else if(g){j[i]=j[i].replace(V,"");a=a[j[i]]();continue}if(null===a||a[j[i]]===k)return k;a=a[j[i]]}}return a};return function(b,e){return c(b,e,a)}}return function(b){return b[a]}}function R(a){if(h.isPlainObject(a))return R(a._);if(null===a)return function(){};if("function"===
20
-typeof a)return function(b,d,e){a(b,"set",d,e)};if("string"===typeof a&&(-1!==a.indexOf(".")||-1!==a.indexOf("[")||-1!==a.indexOf("("))){var b=function(a,d,e){var e=La(e),f;f=e[e.length-1];for(var g,j,i=0,n=e.length-1;i<n;i++){g=e[i].match(ba);j=e[i].match(V);if(g){e[i]=e[i].replace(ba,"");a[e[i]]=[];f=e.slice();f.splice(0,i+1);g=f.join(".");if(h.isArray(d)){j=0;for(n=d.length;j<n;j++)f={},b(f,d[j],g),a[e[i]].push(f)}else a[e[i]]=d;return}j&&(e[i]=e[i].replace(V,""),a=a[e[i]](d));if(null===a[e[i]]||
21
-a[e[i]]===k)a[e[i]]={};a=a[e[i]]}if(f.match(V))a[f.replace(V,"")](d);else a[f.replace(ba,"")]=d};return function(c,d){return b(c,d,a)}}return function(b,d){b[a]=d}}function Ma(a){return F(a.aoData,"_aData")}function na(a){a.aoData.length=0;a.aiDisplayMaster.length=0;a.aiDisplay.length=0;a.aIds={}}function oa(a,b,c){for(var d=-1,e=0,f=a.length;e<f;e++)a[e]==b?d=e:a[e]>b&&a[e]--; -1!=d&&c===k&&a.splice(d,1)}function ca(a,b,c,d){var e=a.aoData[b],f,g=function(c,d){for(;c.childNodes.length;)c.removeChild(c.firstChild);
22
-c.innerHTML=B(a,b,d,"display")};if("dom"===c||(!c||"auto"===c)&&"dom"===e.src)e._aData=Ka(a,e,d,d===k?k:e._aData).data;else{var j=e.anCells;if(j)if(d!==k)g(j[d],d);else{c=0;for(f=j.length;c<f;c++)g(j[c],c)}}e._aSortData=null;e._aFilterData=null;g=a.aoColumns;if(d!==k)g[d].sType=null;else{c=0;for(f=g.length;c<f;c++)g[c].sType=null;Na(a,e)}}function Ka(a,b,c,d){var e=[],f=b.firstChild,g,j,i=0,n,l=a.aoColumns,q=a._rowReadObject,d=d!==k?d:q?{}:[],t=function(a,b){if("string"===typeof a){var c=a.indexOf("@");
23
--1!==c&&(c=a.substring(c+1),R(a)(d,b.getAttribute(c)))}},S=function(a){if(c===k||c===i)j=l[i],n=h.trim(a.innerHTML),j&&j._bAttrSrc?(R(j.mData._)(d,n),t(j.mData.sort,a),t(j.mData.type,a),t(j.mData.filter,a)):q?(j._setter||(j._setter=R(j.mData)),j._setter(d,n)):d[i]=n;i++};if(f)for(;f;){g=f.nodeName.toUpperCase();if("TD"==g||"TH"==g)S(f),e.push(f);f=f.nextSibling}else{e=b.anCells;f=0;for(g=e.length;f<g;f++)S(e[f])}if(b=b.firstChild?b:b.nTr)(b=b.getAttribute("id"))&&R(a.rowId)(d,b);return{data:d,cells:e}}
24
-function Ja(a,b,c,d){var e=a.aoData[b],f=e._aData,g=[],j,i,n,l,q;if(null===e.nTr){j=c||I.createElement("tr");e.nTr=j;e.anCells=g;j._DT_RowIndex=b;Na(a,e);l=0;for(q=a.aoColumns.length;l<q;l++){n=a.aoColumns[l];i=c?d[l]:I.createElement(n.sCellType);i._DT_CellIndex={row:b,column:l};g.push(i);if((!c||n.mRender||n.mData!==l)&&(!h.isPlainObject(n.mData)||n.mData._!==l+".display"))i.innerHTML=B(a,b,l,"display");n.sClass&&(i.className+=" "+n.sClass);n.bVisible&&!c?j.appendChild(i):!n.bVisible&&c&&i.parentNode.removeChild(i);
25
-n.fnCreatedCell&&n.fnCreatedCell.call(a.oInstance,i,B(a,b,l),f,b,l)}u(a,"aoRowCreatedCallback",null,[j,f,b])}e.nTr.setAttribute("role","row")}function Na(a,b){var c=b.nTr,d=b._aData;if(c){var e=a.rowIdFn(d);e&&(c.id=e);d.DT_RowClass&&(e=d.DT_RowClass.split(" "),b.__rowc=b.__rowc?pa(b.__rowc.concat(e)):e,h(c).removeClass(b.__rowc.join(" ")).addClass(d.DT_RowClass));d.DT_RowAttr&&h(c)