dvb_net.h 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  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. */
  17. #ifndef _DVB_NET_H_
  18. #define _DVB_NET_H_
  19. #include <linux/module.h>
  20. #include <linux/netdevice.h>
  21. #include <linux/inetdevice.h>
  22. #include <linux/etherdevice.h>
  23. #include <linux/skbuff.h>
  24. #include "dvbdev.h"
  25. #define DVB_NET_DEVICES_MAX 10
  26. #ifdef CONFIG_DVB_NET
  27. struct dvb_net {
  28. struct dvb_device *dvbdev;
  29. struct net_device *device[DVB_NET_DEVICES_MAX];
  30. int state[DVB_NET_DEVICES_MAX];
  31. unsigned int exit:1;
  32. struct dmx_demux *demux;
  33. struct mutex ioctl_mutex;
  34. };
  35. void dvb_net_release(struct dvb_net *);
  36. int dvb_net_init(struct dvb_adapter *, struct dvb_net *, struct dmx_demux *);
  37. #else
  38. struct dvb_net {
  39. struct dvb_device *dvbdev;
  40. };
  41. static inline void dvb_net_release(struct dvb_net *dvbnet)
  42. {
  43. }
  44. static inline int dvb_net_init(struct dvb_adapter *adap,
  45. struct dvb_net *dvbnet, struct dmx_demux *dmx)
  46. {
  47. return 0;
  48. }
  49. #endif /* ifdef CONFIG_DVB_NET */
  50. #endif