-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdvbcuse.h
81 lines (66 loc) · 2.34 KB
/
dvbcuse.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
/*
* CUSE based DVB loop driver
*
* Copyright (c) 2016 Andreas Steinmetz ([email protected])
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
* Free Software Foundation, version 2.
*
*/
#ifndef DVB_CUSE_H
#define DVB_CUSE_H
#ifndef CA_SET_PID /* removed in kernel 4.14 */
typedef struct ca_pid {
unsigned int pid;
int index; /* -1 == disable */
} ca_pid_t;
#define CA_SET_PID _IOW('o', 135, struct ca_pid)
#endif
typedef struct
{
int adapter;
int major;
int minbase;
int owner;
int group;
int perms;
int fe_enabled:1;
int dmx_enabled:1;
int dvr_enabled:1;
int ca_enabled:1;
int net_enabled:1;
char fe_pathname[PATH_MAX];
char dmx_pathname[PATH_MAX];
char dvr_pathname[PATH_MAX];
char ca_pathname[PATH_MAX];
char net_pathname[PATH_MAX];
int (*fe_open)(void *user,const char *pathname,int flags);
void (*fe_close)(void *user,int fd);
int (*fe_ioctl)(void *user,int fd,unsigned long request,void *arg);
int (*fe_poll)(void *user,struct pollfd *fd);
int (*dmx_open)(void *user,const char *pathname,int flags);
ssize_t (*dmx_read)(void *user,int fd,void *buf,size_t count);
void (*dmx_close)(void *user,int fd);
int (*dmx_ioctl)(void *user,int fd,unsigned long request,void *arg);
int (*dmx_poll)(void *user,struct pollfd *fd);
int (*dvr_open)(void *user,const char *pathname,int flags);
ssize_t (*dvr_read)(void *user,int fd,void *buf,size_t count);
ssize_t (*dvr_write)(void *user,int fd,const void *buf,size_t count);
void (*dvr_close)(void *user,int fd);
int (*dvr_ioctl)(void *user,int fd, unsigned long request,void *arg);
int (*dvr_poll)(void *user,struct pollfd *fd);
int (*ca_open)(void *user,const char *pathname,int flags);
ssize_t (*ca_read)(void *user,int fd,void *buf,size_t count);
ssize_t (*ca_write)(void *user,int fd,const void *buf,size_t count);
void (*ca_close)(void *user,int fd);
int (*ca_ioctl)(void *user,int fd,unsigned long request,void *arg);
int (*ca_poll)(void *user,struct pollfd *fd);
int (*net_open)(void *user,const char *pathname,int flags);
void (*net_close)(void *user,int fd);
int (*net_ioctl)(void *user,int fd,unsigned long request,void *arg);
void *user;
} DVBCUSE_DEVICE;
extern void *dvbcuse_create(DVBCUSE_DEVICE *config);
extern void dvbcuse_destroy(void *ctx);
#endif