// SPDX-License-Identifier: GPL-2.0-or-later /* * INET An implementation of the TCP/IP protocol suite for the LINUX * operating system. INET is implemented using the BSD Socket * interface as the means of communication with the user level. * * FDDI-type device handling. * * Version: @(#)fddi.c 1.0.0 08/12/96 * * Authors: Lawrence V. Stefani, <[email protected]> * * fddi.c is based on previous eth.c and tr.c work by * Ross Biro * Fred N. van Kempen, <[email protected]> * Mark Evans, <[email protected]> * Florian La Roche, <[email protected]> * Alan Cox, <[email protected]> * * Changes * Alan Cox : New arp/rebuild header * Maciej W. Rozycki : IPv6 support */ #include <linux/module.h> #include <linux/types.h> #include <linux/kernel.h> #include <linux/string.h> #include <linux/mm.h> #include <linux/socket.h> #include <linux/in.h> #include <linux/inet.h> #include <linux/netdevice.h> #include <linux/fddidevice.h> #include <linux/if_ether.h> #include <linux/skbuff.h> #include <linux/errno.h> #include <net/arp.h> #include <net/sock.h> /* * Create the FDDI MAC header for an arbitrary protocol layer * * saddr=NULL means use device source address * daddr=NULL means leave destination address (eg unresolved arp) */ static int fddi_header(struct sk_buff *skb, struct net_device *dev, unsigned short type, const void *daddr, const void *saddr, unsigned int len) { … } /* * Determine the packet's protocol ID and fill in skb fields. * This routine is called before an incoming packet is passed * up. It's used to fill in specific skb fields and to set * the proper pointer to the start of packet data (skb->data). */ __be16 fddi_type_trans(struct sk_buff *skb, struct net_device *dev) { … } EXPORT_SYMBOL(…); static const struct header_ops fddi_header_ops = …; static void fddi_setup(struct net_device *dev) { … } /** * alloc_fddidev - Register FDDI device * @sizeof_priv: Size of additional driver-private structure to be allocated * for this FDDI device * * Fill in the fields of the device structure with FDDI-generic values. * * Constructs a new net device, complete with a private data area of * size @sizeof_priv. A 32-byte (not bit) alignment is enforced for * this private data area. */ struct net_device *alloc_fddidev(int sizeof_priv) { … } EXPORT_SYMBOL(…); MODULE_DESCRIPTION(…) …; MODULE_LICENSE(…) …;