dvb_net.h 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. /*
  2. * dvb_net.h
  3. *
  4. * Copyright (C) 2001 Ralph Metzler for convergence integrated media GmbH
  5. *
  6. * This program is free software; you can redistribute it and/or
  7. * modify it under the terms of the GNU Lesser General Public License
  8. * as published by the Free Software Foundation; either version 2.1
  9. * of the License, or (at your option) any later version.
  10. *
  11. * This program is distributed in the hope that it will be useful,
  12. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  14. * GNU General Public License for more details.
  15. *
  16. * You should have received a copy of the GNU Lesser General Public License
  17. * along with this program; if not, write to the Free Software
  18. * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
  19. *
  20. */
  21. #ifndef _DVB_NET_H_
  22. #define _DVB_NET_H_
  23. #include <linux/module.h>
  24. #include <linux/netdevice.h>
  25. #include <linux/inetdevice.h>
  26. #include <linux/etherdevice.h>
  27. #include <linux/skbuff.h>
  28. #include "dvbdev.h"
  29. #define DVB_NET_DEVICES_MAX 10
  30. #ifdef CONFIG_DVB_NET
  31. struct dvb_net {
  32. struct dvb_device *dvbdev;
  33. struct net_device *device[DVB_NET_DEVICES_MAX];
  34. int state[DVB_NET_DEVICES_MAX];
  35. unsigned int exit:1;
  36. struct dmx_demux *demux;
  37. struct mutex ioctl_mutex;
  38. };
  39. void dvb_net_release(struct dvb_net *);
  40. int dvb_net_init(struct dvb_adapter *, struct dvb_net *, struct dmx_demux *);
  41. #else
  42. struct dvb_net {
  43. struct dvb_device *dvbdev;
  44. };
  45. static inline void dvb_net_release(struct dvb_net *dvbnet)
  46. {
  47. }
  48. static inline int dvb_net_init(struct dvb_adapter *adap,
  49. struct dvb_net *dvbnet, struct dmx_demux *dmx)
  50. {
  51. return 0;
  52. }
  53. #endif /* ifdef CONFIG_DVB_NET */
  54. #endif