linux/net/8021q/vlan.c

// SPDX-License-Identifier: GPL-2.0-or-later
/*
 * INET		802.1Q VLAN
 *		Ethernet-type device handling.
 *
 * Authors:	Ben Greear <[email protected]>
 *              Please send support related email to: [email protected]
 *              VLAN Home Page: http://www.candelatech.com/~greear/vlan.html
 *
 * Fixes:
 *              Fix for packet capture - Nick Eggleston <[email protected]>;
 *		Add HW acceleration hooks - David S. Miller <[email protected]>;
 *		Correct all the locking - David S. Miller <[email protected]>;
 *		Use hash table for VLAN groups - David S. Miller <[email protected]>
 */

#define pr_fmt(fmt)

#include <linux/capability.h>
#include <linux/module.h>
#include <linux/netdevice.h>
#include <linux/skbuff.h>
#include <linux/slab.h>
#include <linux/init.h>
#include <linux/rculist.h>
#include <net/p8022.h>
#include <net/arp.h>
#include <linux/rtnetlink.h>
#include <linux/notifier.h>
#include <net/rtnetlink.h>
#include <net/net_namespace.h>
#include <net/netns/generic.h>
#include <linux/uaccess.h>

#include <linux/if_vlan.h>
#include "vlan.h"
#include "vlanproc.h"

#define DRV_VERSION

/* Global VLAN variables */

unsigned int vlan_net_id __read_mostly;

const char vlan_fullname[] =;
const char vlan_version[] =;

/* End of global variables definitions. */

static int vlan_group_prealloc_vid(struct vlan_group *vg,
				   __be16 vlan_proto, u16 vlan_id)
{}

static void vlan_stacked_transfer_operstate(const struct net_device *rootdev,
					    struct net_device *dev,
					    struct vlan_dev_priv *vlan)
{}

void unregister_vlan_dev(struct net_device *dev, struct list_head *head)
{}

int vlan_check_real_dev(struct net_device *real_dev,
			__be16 protocol, u16 vlan_id,
			struct netlink_ext_ack *extack)
{}

int register_vlan_dev(struct net_device *dev, struct netlink_ext_ack *extack)
{}

/*  Attach a VLAN device to a mac address (ie Ethernet Card).
 *  Returns 0 if the device was created or a negative error code otherwise.
 */
static int register_vlan_device(struct net_device *real_dev, u16 vlan_id)
{}

static void vlan_sync_address(struct net_device *dev,
			      struct net_device *vlandev)
{}

static void vlan_transfer_features(struct net_device *dev,
				   struct net_device *vlandev)
{}

static int __vlan_device_event(struct net_device *dev, unsigned long event)
{}

static int vlan_device_event(struct notifier_block *unused, unsigned long event,
			     void *ptr)
{}

static struct notifier_block vlan_notifier_block __read_mostly =;

/*
 *	VLAN IOCTL handler.
 *	o execute requested action or pass command to the device driver
 *   arg is really a struct vlan_ioctl_args __user *.
 */
static int vlan_ioctl_handler(struct net *net, void __user *arg)
{}

static int __net_init vlan_init_net(struct net *net)
{}

static void __net_exit vlan_exit_net(struct net *net)
{}

static struct pernet_operations vlan_net_ops =;

static int __init vlan_proto_init(void)
{}

static void __exit vlan_cleanup_module(void)
{}

module_init();
module_exit(vlan_cleanup_module);

MODULE_DESCRIPTION();
MODULE_LICENSE();
MODULE_VERSION();