1 /* 1 2 * dvb_net.h 3 * 4 * Copyright (C) 2001 Ralph Metzler for conver 5 * 6 * This program is free software; you can redi 7 * modify it under the terms of the GNU Lesser 8 * as published by the Free Software Foundatio 9 * of the License, or (at your option) any lat 10 * 11 * This program is distributed in the hope tha 12 * but WITHOUT ANY WARRANTY; without even the 13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR 14 * GNU General Public License for more details 15 * 16 */ 17 18 #ifndef _DVB_NET_H_ 19 #define _DVB_NET_H_ 20 21 #include <linux/module.h> 22 23 #include <media/dvbdev.h> 24 25 struct net_device; 26 27 #define DVB_NET_DEVICES_MAX 10 28 29 #ifdef CONFIG_DVB_NET 30 31 /** 32 * struct dvb_net - describes a DVB network in 33 * 34 * @dvbdev: pointer to &struct dvb 35 * @device: array of pointers to & 36 * @state: array of integers to e 37 * different than zero me 38 * in usage. 39 * @exit: flag to indicate when 40 * @demux: pointer to &struct dmx 41 * @ioctl_mutex: protect access to this 42 * @remove_mutex: mutex that avoids a ra 43 * called when the hardwa 44 * file_operations of dvb 45 * 46 * Currently, the core supports up to %DVB_NET 47 * devices. 48 */ 49 50 struct dvb_net { 51 struct dvb_device *dvbdev; 52 struct net_device *device[DVB_NET_DEVI 53 int state[DVB_NET_DEVICES_MAX]; 54 unsigned int exit:1; 55 struct dmx_demux *demux; 56 struct mutex ioctl_mutex; 57 struct mutex remove_mutex; 58 }; 59 60 /** 61 * dvb_net_init - nitializes a digital TV netw 62 * 63 * @adap: pointer to &struct dvb_adapter 64 * @dvbnet: pointer to &struct dvb_net. 65 * @dmxdemux: pointer to &struct dmx_demux. 66 */ 67 int dvb_net_init(struct dvb_adapter *adap, str 68 struct dmx_demux *dmxdemux); 69 70 /** 71 * dvb_net_release - releases a digital TV net 72 * 73 * @dvbnet: pointer to &struct dvb_net. 74 */ 75 void dvb_net_release(struct dvb_net *dvbnet); 76 77 #else 78 79 struct dvb_net { 80 struct dvb_device *dvbdev; 81 }; 82 83 static inline void dvb_net_release(struct dvb_ 84 { 85 } 86 87 static inline int dvb_net_init(struct dvb_adap 88 struct dvb_net 89 { 90 return 0; 91 } 92 93 #endif /* ifdef CONFIG_DVB_NET */ 94 95 #endif 96
Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.