#define pr_fmt(fmt) …
#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/netdevice.h>
#include <linux/nospec.h>
#include <linux/etherdevice.h>
#include <linux/dvb/net.h>
#include <linux/uio.h>
#include <linux/uaccess.h>
#include <linux/crc32.h>
#include <linux/mutex.h>
#include <linux/sched.h>
#include <media/dvb_demux.h>
#include <media/dvb_net.h>
static inline __u32 iov_crc32( __u32 c, struct kvec *iov, unsigned int cnt )
{ … }
#define DVB_NET_MULTICAST_MAX …
#ifdef DVB_ULE_DEBUG
static unsigned char ule_hist[100*TS_SZ] = { 0 };
static unsigned char *ule_where = ule_hist, ule_dump;
static void hexdump(const unsigned char *buf, unsigned short len)
{
print_hex_dump_debug("", DUMP_PREFIX_OFFSET, 16, 1, buf, len, true);
}
#endif
struct dvb_net_priv { … };
static __be16 dvb_net_eth_type_trans(struct sk_buff *skb,
struct net_device *dev)
{ … }
#define TS_SZ …
#define TS_SYNC …
#define TS_TEI …
#define TS_SC …
#define TS_PUSI …
#define TS_AF_A …
#define TS_AF_D …
#define ULE_TEST …
#define ULE_BRIDGED …
#define ULE_OPTEXTHDR_PADDING …
static int ule_test_sndu( struct dvb_net_priv *p )
{ … }
static int ule_bridged_sndu( struct dvb_net_priv *p )
{ … }
static int ule_exthdr_padding(struct dvb_net_priv *p)
{ … }
static int handle_one_ule_extension( struct dvb_net_priv *p )
{ … }
static int handle_ule_extensions( struct dvb_net_priv *p )
{ … }
static inline void reset_ule( struct dvb_net_priv *p )
{ … }
struct dvb_net_ule_handle { … };
static int dvb_net_ule_new_ts_cell(struct dvb_net_ule_handle *h)
{ … }
static int dvb_net_ule_ts_pusi(struct dvb_net_ule_handle *h)
{ … }
static int dvb_net_ule_new_ts(struct dvb_net_ule_handle *h)
{ … }
static int dvb_net_ule_new_payload(struct dvb_net_ule_handle *h)
{ … }
static int dvb_net_ule_should_drop(struct dvb_net_ule_handle *h)
{ … }
static void dvb_net_ule_check_crc(struct dvb_net_ule_handle *h,
struct kvec iov[3],
u32 ule_crc, u32 expected_crc)
{ … }
static void dvb_net_ule(struct net_device *dev, const u8 *buf, size_t buf_len)
{ … }
static int dvb_net_ts_callback(const u8 *buffer1, size_t buffer1_len,
const u8 *buffer2, size_t buffer2_len,
struct dmx_ts_feed *feed,
u32 *buffer_flags)
{ … }
static void dvb_net_sec(struct net_device *dev,
const u8 *pkt, int pkt_len)
{ … }
static int dvb_net_sec_callback(const u8 *buffer1, size_t buffer1_len,
const u8 *buffer2, size_t buffer2_len,
struct dmx_section_filter *filter, u32 *buffer_flags)
{ … }
static netdev_tx_t dvb_net_tx(struct sk_buff *skb, struct net_device *dev)
{ … }
static u8 mask_normal[6]= …;
static u8 mask_allmulti[6]= …;
static u8 mac_allmulti[6]= …;
static u8 mask_promisc[6]= …;
static int dvb_net_filter_sec_set(struct net_device *dev,
struct dmx_section_filter **secfilter,
const u8 *mac, u8 *mac_mask)
{ … }
static int dvb_net_feed_start(struct net_device *dev)
{ … }
static int dvb_net_feed_stop(struct net_device *dev)
{ … }
static int dvb_set_mc_filter(struct net_device *dev, unsigned char *addr)
{ … }
static void wq_set_multicast_list (struct work_struct *work)
{ … }
static void dvb_net_set_multicast_list (struct net_device *dev)
{ … }
static void wq_restart_net_feed (struct work_struct *work)
{ … }
static int dvb_net_set_mac (struct net_device *dev, void *p)
{ … }
static int dvb_net_open(struct net_device *dev)
{ … }
static int dvb_net_stop(struct net_device *dev)
{ … }
static const struct header_ops dvb_header_ops = …;
static const struct net_device_ops dvb_netdev_ops = …;
static void dvb_net_setup(struct net_device *dev)
{ … }
static int get_if(struct dvb_net *dvbnet)
{ … }
static int dvb_net_add_if(struct dvb_net *dvbnet, u16 pid, u8 feedtype)
{ … }
static int dvb_net_remove_if(struct dvb_net *dvbnet, unsigned long num)
{ … }
static int dvb_net_do_ioctl(struct file *file,
unsigned int cmd, void *parg)
{ … }
static long dvb_net_ioctl(struct file *file,
unsigned int cmd, unsigned long arg)
{ … }
static int locked_dvb_net_open(struct inode *inode, struct file *file)
{ … }
static int dvb_net_close(struct inode *inode, struct file *file)
{ … }
static const struct file_operations dvb_net_fops = …;
static const struct dvb_device dvbdev_net = …;
void dvb_net_release (struct dvb_net *dvbnet)
{ … }
EXPORT_SYMBOL(…);
int dvb_net_init (struct dvb_adapter *adap, struct dvb_net *dvbnet,
struct dmx_demux *dmx)
{ … }
EXPORT_SYMBOL(…);