/*1* Moved here from drivers/net/net_init.c, which is:2* Written 1993,1994,1995 by Donald Becker.3*/45#include <linux/errno.h>6#include <linux/module.h>7#include <linux/netdevice.h>8#include <linux/if_arp.h>9#include <linux/if_ltalk.h>1011static void ltalk_setup(struct net_device *dev)12{13/* Fill in the fields of the device structure with localtalk-generic values. */1415dev->type = ARPHRD_LOCALTLK;16dev->hard_header_len = LTALK_HLEN;17dev->mtu = LTALK_MTU;18dev->addr_len = LTALK_ALEN;19dev->tx_queue_len = 10;2021dev->broadcast[0] = 0xFF;2223dev->flags = IFF_BROADCAST|IFF_MULTICAST|IFF_NOARP;24}2526/**27* alloc_ltalkdev - Allocates and sets up an localtalk device28* @sizeof_priv: Size of additional driver-private structure to be allocated29* for this localtalk device30*31* Fill in the fields of the device structure with localtalk-generic32* values. Basically does everything except registering the device.33*34* Constructs a new net device, complete with a private data area of35* size @sizeof_priv. A 32-byte (not bit) alignment is enforced for36* this private data area.37*/3839struct net_device *alloc_ltalkdev(int sizeof_priv)40{41return alloc_netdev(sizeof_priv, "lt%d", ltalk_setup);42}43EXPORT_SYMBOL(alloc_ltalkdev);444546