2 * An implementation of the Acorn Econet and AUN protocols.
3 * Philip Blundell <philb@gnu.org>
5 * This program is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU General Public License
7 * as published by the Free Software Foundation; either version
8 * 2 of the License, or (at your option) any later version.
12 #include <linux/config.h>
13 #include <linux/module.h>
15 #include <linux/types.h>
16 #include <linux/kernel.h>
17 #include <linux/sched.h>
18 #include <linux/string.h>
20 #include <linux/socket.h>
21 #include <linux/sockios.h>
23 #include <linux/errno.h>
24 #include <linux/interrupt.h>
25 #include <linux/if_ether.h>
26 #include <linux/netdevice.h>
27 #include <linux/inetdevice.h>
28 #include <linux/route.h>
29 #include <linux/inet.h>
30 #include <linux/etherdevice.h>
31 #include <linux/if_arp.h>
32 #include <linux/wireless.h>
33 #include <linux/skbuff.h>
35 #include <net/inet_common.h>
36 #include <linux/stat.h>
37 #include <linux/init.h>
38 #include <linux/if_ec.h>
41 #include <linux/spinlock.h>
43 #include <asm/uaccess.h>
44 #include <asm/system.h>
45 #include <asm/bitops.h>
47 static struct proto_ops econet_ops;
48 static struct sock *econet_sklist;
50 /* Since there are only 256 possible network numbers (or fewer, depends
51 how you count) it makes sense to use a simple lookup table. */
52 static struct net_device *net2dev_map[256];
54 #define EC_PORT_IP 0xd2
56 #ifdef CONFIG_ECONET_AUNUDP
57 static spinlock_t aun_queue_lock;
58 static struct socket *udpsock;
59 #define AUN_PORT 0x8000
64 unsigned char code; /* AUN magic protocol byte */
71 static unsigned long aun_seq;
73 /* Queue of packets waiting to be transmitted. */
74 static struct sk_buff_head aun_queue;
75 static struct timer_list ab_cleanup_timer;
77 #endif /* CONFIG_ECONET_AUNUDP */
79 /* Per-packet information */
82 struct sockaddr_ec sec;
83 unsigned long cookie; /* Supplied by user. */
84 #ifdef CONFIG_ECONET_AUNUDP
86 unsigned long seq; /* Sequencing */
87 unsigned long timeout; /* Timeout */
88 unsigned long start; /* jiffies */
90 #ifdef CONFIG_ECONET_NATIVE
91 void (*sent)(struct sk_buff *, int result);
96 * Pull a packet from our receive queue and hand it to the user.
97 * If necessary we block.
100 static int econet_recvmsg(struct socket *sock, struct msghdr *msg, int len,
101 int flags, struct scm_cookie *scm)
103 struct sock *sk = sock->sk;
107 msg->msg_namelen = sizeof(struct sockaddr_ec);
110 * Call the generic datagram receiver. This handles all sorts
111 * of horrible races and re-entrancy so we can forget about it
112 * in the protocol layers.
114 * Now it will return ENETDOWN, if device have just gone down,
115 * but then it will block.
118 skb=skb_recv_datagram(sk,flags,flags&MSG_DONTWAIT,&err);
121 * An error occurred so return it. Because skb_recv_datagram()
122 * handles the blocking we don't see and worry about blocking
130 * You lose any data beyond the buffer you gave. If it worries a
131 * user program they can ask the device for its MTU anyway.
138 msg->msg_flags|=MSG_TRUNC;
141 /* We can't use skb_copy_datagram here */
142 err = memcpy_toiovec(msg->msg_iov, skb->data, copied);
145 sk->stamp=skb->stamp;
148 memcpy(msg->msg_name, skb->cb, msg->msg_namelen);
151 * Free or return the buffer as appropriate. Again this
152 * hides all the races and re-entrancy issues from us.
157 skb_free_datagram(sk, skb);
163 * Bind an Econet socket.
166 static int econet_bind(struct socket *sock, struct sockaddr *uaddr, int addr_len)
168 struct sockaddr_ec *sec = (struct sockaddr_ec *)uaddr;
169 struct sock *sk=sock->sk;
175 if (addr_len < sizeof(struct sockaddr_ec) ||
176 sec->sec_family != AF_ECONET)
179 sk->protinfo.af_econet->cb = sec->cb;
180 sk->protinfo.af_econet->port = sec->port;
181 sk->protinfo.af_econet->station = sec->addr.station;
182 sk->protinfo.af_econet->net = sec->addr.net;
188 * Queue a transmit result for the user to be told about.
191 static void tx_result(struct sock *sk, unsigned long cookie, int result)
193 struct sk_buff *skb = alloc_skb(0, GFP_ATOMIC);
195 struct sockaddr_ec *sec;
199 printk(KERN_DEBUG "ec: memory squeeze, transmit result dropped.\n");
203 eb = (struct ec_cb *)&skb->cb;
204 sec = (struct sockaddr_ec *)&eb->sec;
205 memset(sec, 0, sizeof(struct sockaddr_ec));
206 sec->cookie = cookie;
207 sec->type = ECTYPE_TRANSMIT_STATUS | result;
208 sec->sec_family = AF_ECONET;
210 if (sock_queue_rcv_skb(sk, skb) < 0)
214 #ifdef CONFIG_ECONET_NATIVE
216 * Called by the Econet hardware driver when a packet transmit
217 * has completed. Tell the user.
220 static void ec_tx_done(struct sk_buff *skb, int result)
222 struct ec_cb *eb = (struct ec_cb *)&skb->cb;
223 tx_result(skb->sk, eb->cookie, result);
228 * Send a packet. We have to work out which device it's going out on
229 * and hence whether to use real Econet or the UDP emulation.
232 static int econet_sendmsg(struct socket *sock, struct msghdr *msg, int len,
233 struct scm_cookie *scm)
235 struct sock *sk = sock->sk;
236 struct sockaddr_ec *saddr=(struct sockaddr_ec *)msg->msg_name;
237 struct net_device *dev;
240 unsigned char port, cb;
243 #ifdef CONFIG_ECONET_NATIVE
244 unsigned short proto = 0;
246 #ifdef CONFIG_ECONET_AUNUDP
247 struct msghdr udpmsg;
248 struct iovec iov[msg->msg_iovlen+1];
250 struct sockaddr_in udpdest;
251 __kernel_size_t size;
260 if (msg->msg_flags&~MSG_DONTWAIT)
264 * Get and verify the address.
268 addr.station = sk->protinfo.af_econet->station;
269 addr.net = sk->protinfo.af_econet->net;
270 port = sk->protinfo.af_econet->port;
271 cb = sk->protinfo.af_econet->cb;
273 if (msg->msg_namelen < sizeof(struct sockaddr_ec))
275 addr.station = saddr->addr.station;
276 addr.net = saddr->addr.net;
281 /* Look for a device with the right network number. */
282 dev = net2dev_map[addr.net];
284 /* If not directly reachable, use some default */
287 dev = net2dev_map[0];
288 /* No interfaces at all? */
293 if (dev->type == ARPHRD_ECONET)
295 /* Real hardware Econet. We're not worthy etc. */
296 #ifdef CONFIG_ECONET_NATIVE
297 atomic_inc(&dev->refcnt);
299 skb = sock_alloc_send_skb(sk, len+dev->hard_header_len+15,
300 msg->msg_flags & MSG_DONTWAIT, &err);
304 skb_reserve(skb, (dev->hard_header_len+15)&~15);
305 skb->nh.raw = skb->data;
307 eb = (struct ec_cb *)&skb->cb;
309 eb->cookie = saddr->cookie;
311 eb->sent = ec_tx_done;
313 if (dev->hard_header) {
315 struct ec_framehdr *fh;
317 res = dev->hard_header(skb, dev, ntohs(proto),
319 /* Poke in our control byte and
320 port number. Hack, hack. */
321 fh = (struct ec_framehdr *)(skb->data);
324 if (sock->type != SOCK_DGRAM) {
325 skb->tail = skb->data;
331 /* Copy the data. Returns -EFAULT on error */
332 err = memcpy_fromiovec(skb_put(skb,len), msg->msg_iov, len);
333 skb->protocol = proto;
335 skb->priority = sk->priority;
340 if (!(dev->flags & IFF_UP))
362 #ifdef CONFIG_ECONET_AUNUDP
363 /* AUN virtual Econet. */
366 return -ENETDOWN; /* No socket - can't send */
368 /* Make up a UDP datagram and hand it off to some higher intellect. */
370 memset(&udpdest, 0, sizeof(udpdest));
371 udpdest.sin_family = AF_INET;
372 udpdest.sin_port = htons(AUN_PORT);
374 /* At the moment we use the stupid Acorn scheme of Econet address
375 y.x maps to IP a.b.c.x. This should be replaced with something
376 more flexible and more aware of subnet masks. */
378 struct in_device *idev = in_dev_get(dev);
379 unsigned long network = 0;
381 read_lock(&idev->lock);
383 network = ntohl(idev->ifa_list->ifa_address) &
384 0xffffff00; /* !!! */
385 read_unlock(&idev->lock);
388 udpdest.sin_addr.s_addr = htonl(network | addr.station);
393 ah.code = 2; /* magic */
396 /* tack our header on the front of the iovec */
397 size = sizeof(struct aunhdr);
398 iov[0].iov_base = (void *)&ah;
399 iov[0].iov_len = size;
400 for (i = 0; i < msg->msg_iovlen; i++) {
401 void *base = msg->msg_iov[i].iov_base;
402 size_t len = msg->msg_iov[i].iov_len;
403 /* Check it now since we switch to KERNEL_DS later. */
404 if ((err = verify_area(VERIFY_READ, base, len)) < 0)
406 iov[i+1].iov_base = base;
407 iov[i+1].iov_len = len;
411 /* Get a skbuff (no data, just holds our cb information) */
412 if ((skb = sock_alloc_send_skb(sk, 0,
413 msg->msg_flags & MSG_DONTWAIT, &err)) == NULL)
416 eb = (struct ec_cb *)&skb->cb;
418 eb->cookie = saddr->cookie;
419 eb->timeout = (5*HZ);
422 eb->seq = (aun_seq++);
425 skb_queue_tail(&aun_queue, skb);
427 udpmsg.msg_name = (void *)&udpdest;
428 udpmsg.msg_namelen = sizeof(udpdest);
429 udpmsg.msg_iov = &iov[0];
430 udpmsg.msg_iovlen = msg->msg_iovlen + 1;
431 udpmsg.msg_control = NULL;
432 udpmsg.msg_controllen = 0;
435 oldfs = get_fs(); set_fs(KERNEL_DS); /* More privs :-) */
436 err = sock_sendmsg(udpsock, &udpmsg, size);
445 * Look up the address of a socket.
448 static int econet_getname(struct socket *sock, struct sockaddr *uaddr,
449 int *uaddr_len, int peer)
451 struct sock *sk = sock->sk;
452 struct sockaddr_ec *sec = (struct sockaddr_ec *)uaddr;
457 sec->sec_family = AF_ECONET;
458 sec->port = sk->protinfo.af_econet->port;
459 sec->addr.station = sk->protinfo.af_econet->station;
460 sec->addr.net = sk->protinfo.af_econet->net;
462 *uaddr_len = sizeof(*sec);
466 static void econet_destroy_timer(unsigned long data)
468 struct sock *sk=(struct sock *)data;
470 if (!atomic_read(&sk->wmem_alloc) && !atomic_read(&sk->rmem_alloc)) {
476 sk->timer.expires=jiffies+10*HZ;
477 add_timer(&sk->timer);
478 printk(KERN_DEBUG "econet socket destroy delayed\n");
482 * Close an econet socket.
485 static int econet_release(struct socket *sock)
487 struct sock *sk = sock->sk;
492 sklist_remove_socket(&econet_sklist, sk);
495 * Now the socket is dead. No more input will appear.
498 sk->state_change(sk); /* It is useless. Just for sanity. */
506 skb_queue_purge(&sk->receive_queue);
508 if (atomic_read(&sk->rmem_alloc) || atomic_read(&sk->wmem_alloc)) {
509 sk->timer.data=(unsigned long)sk;
510 sk->timer.expires=jiffies+HZ;
511 sk->timer.function=econet_destroy_timer;
512 add_timer(&sk->timer);
522 * Create an Econet socket
525 static int econet_create(struct socket *sock, int protocol)
530 /* Econet only provides datagram services. */
531 if (sock->type != SOCK_DGRAM)
532 return -ESOCKTNOSUPPORT;
534 sock->state = SS_UNCONNECTED;
538 sk = sk_alloc(PF_ECONET, GFP_KERNEL, 1);
543 sock->ops = &econet_ops;
544 sock_init_data(sock,sk);
546 sk->protinfo.af_econet = kmalloc(sizeof(struct econet_opt), GFP_KERNEL);
547 if (sk->protinfo.af_econet == NULL)
549 memset(sk->protinfo.af_econet, 0, sizeof(struct econet_opt));
551 sk->family = PF_ECONET;
554 sklist_insert_socket(&econet_sklist, sk);
565 * Handle Econet specific ioctls
568 static int ec_dev_ioctl(struct socket *sock, unsigned int cmd, void *arg)
571 struct ec_device *edev;
572 struct net_device *dev;
573 struct sockaddr_ec *sec;
576 * Fetch the caller's info block into kernel space
579 if (copy_from_user(&ifr, arg, sizeof(struct ifreq)))
582 if ((dev = dev_get_by_name(ifr.ifr_name)) == NULL)
585 sec = (struct sockaddr_ec *)&ifr.ifr_addr;
593 /* Magic up a new one. */
594 edev = kmalloc(sizeof(struct ec_device), GFP_KERNEL);
596 printk("af_ec: memory squeeze.\n");
600 memset(edev, 0, sizeof(struct ec_device));
604 net2dev_map[edev->net] = NULL;
605 edev->station = sec->addr.station;
606 edev->net = sec->addr.net;
607 net2dev_map[sec->addr.net] = dev;
609 net2dev_map[0] = dev;
620 memset(sec, 0, sizeof(struct sockaddr_ec));
621 sec->addr.station = edev->station;
622 sec->addr.net = edev->net;
623 sec->sec_family = AF_ECONET;
625 if (copy_to_user(arg, &ifr, sizeof(struct ifreq)))
635 * Handle generic ioctls
638 static int econet_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg)
640 struct sock *sk = sock->sk;
647 if (get_user(pid, (int *) arg))
649 if (current->pid != pid && current->pgrp != -pid && !capable(CAP_NET_ADMIN))
655 return put_user(sk->proc, (int *)arg);
657 if(sk->stamp.tv_sec==0)
659 return copy_to_user((void *)arg, &sk->stamp, sizeof(struct timeval)) ? -EFAULT : 0;
679 case SIOCSIFHWBROADCAST:
680 return(dev_ioctl(cmd,(void *) arg));
684 return ec_dev_ioctl(sock, cmd, (void *)arg);
688 return(dev_ioctl(cmd,(void *) arg));
694 static struct net_proto_family econet_family_ops = {
696 create: econet_create,
699 static struct proto_ops SOCKOPS_WRAPPED(econet_ops) = {
702 release: econet_release,
704 connect: sock_no_connect,
705 socketpair: sock_no_socketpair,
706 accept: sock_no_accept,
707 getname: econet_getname,
710 listen: sock_no_listen,
711 shutdown: sock_no_shutdown,
712 setsockopt: sock_no_setsockopt,
713 getsockopt: sock_no_getsockopt,
714 sendmsg: econet_sendmsg,
715 recvmsg: econet_recvmsg,
717 sendpage: sock_no_sendpage,
720 #include <linux/smp_lock.h>
721 SOCKOPS_WRAP(econet, PF_ECONET);
724 * Find the listening socket, if any, for the given data.
727 static struct sock *ec_listening_socket(unsigned char port, unsigned char
728 station, unsigned char net)
730 struct sock *sk = econet_sklist;
734 struct econet_opt *opt = sk->protinfo.af_econet;
735 if ((opt->port == port || opt->port == 0) &&
736 (opt->station == station || opt->station == 0) &&
737 (opt->net == net || opt->net == 0))
747 * Queue a received packet for a socket.
750 static int ec_queue_packet(struct sock *sk, struct sk_buff *skb,
751 unsigned char stn, unsigned char net,
752 unsigned char cb, unsigned char port)
754 struct ec_cb *eb = (struct ec_cb *)&skb->cb;
755 struct sockaddr_ec *sec = (struct sockaddr_ec *)&eb->sec;
757 memset(sec, 0, sizeof(struct sockaddr_ec));
758 sec->sec_family = AF_ECONET;
759 sec->type = ECTYPE_PACKET_RECEIVED;
763 sec->addr.station = stn;
765 return sock_queue_rcv_skb(sk, skb);
768 #ifdef CONFIG_ECONET_AUNUDP
771 * Send an AUN protocol response.
774 static void aun_send_response(__u32 addr, unsigned long seq, int code, int cb)
776 struct sockaddr_in sin;
779 struct msghdr udpmsg;
783 memset(&sin, 0, sizeof(sin));
784 sin.sin_family = AF_INET;
785 sin.sin_port = htons(AUN_PORT);
786 sin.sin_addr.s_addr = addr;
794 iov.iov_base = (void *)&ah;
795 iov.iov_len = sizeof(ah);
797 udpmsg.msg_name = (void *)&sin;
798 udpmsg.msg_namelen = sizeof(sin);
799 udpmsg.msg_iov = &iov;
800 udpmsg.msg_iovlen = 1;
801 udpmsg.msg_control = NULL;
802 udpmsg.msg_controllen = 0;
805 oldfs = get_fs(); set_fs(KERNEL_DS);
806 err = sock_sendmsg(udpsock, &udpmsg, sizeof(ah));
812 * Handle incoming AUN packets. Work out if anybody wants them,
813 * and send positive or negative acknowledgements as appropriate.
816 static void aun_incoming(struct sk_buff *skb, struct aunhdr *ah, size_t len)
818 struct iphdr *ip = skb->nh.iph;
819 unsigned char stn = ntohl(ip->saddr) & 0xff;
821 struct sk_buff *newskb;
822 struct ec_device *edev = skb->dev->ec_ptr;
827 if ((sk = ec_listening_socket(ah->port, stn, edev->net)) == NULL)
828 goto bad; /* Nobody wants it */
830 newskb = alloc_skb((len - sizeof(struct aunhdr) + 15) & ~15,
834 printk(KERN_DEBUG "AUN: memory squeeze, dropping packet.\n");
835 /* Send nack and hope sender tries again */
839 memcpy(skb_put(newskb, len - sizeof(struct aunhdr)), (void *)(ah+1),
840 len - sizeof(struct aunhdr));
842 if (ec_queue_packet(sk, newskb, stn, edev->net, ah->cb, ah->port))
844 /* Socket is bankrupt. */
849 aun_send_response(ip->saddr, ah->handle, 3, 0);
853 aun_send_response(ip->saddr, ah->handle, 4, 0);
857 * Handle incoming AUN transmit acknowledgements. If the sequence
858 * number matches something in our backlog then kill it and tell
859 * the user. If the remote took too long to reply then we may have
860 * dropped the packet already.
863 static void aun_tx_ack(unsigned long seq, int result)
869 spin_lock_irqsave(&aun_queue_lock, flags);
870 skb = skb_peek(&aun_queue);
871 while (skb && skb != (struct sk_buff *)&aun_queue)
873 struct sk_buff *newskb = skb->next;
874 eb = (struct ec_cb *)&skb->cb;
880 spin_unlock_irqrestore(&aun_queue_lock, flags);
881 printk(KERN_DEBUG "AUN: unknown sequence %ld\n", seq);
885 tx_result(skb->sk, eb->cookie, result);
887 spin_unlock_irqrestore(&aun_queue_lock, flags);
892 * Deal with received AUN frames - sort out what type of thing it is
893 * and hand it to the right function.
896 static void aun_data_available(struct sock *sk, int slen)
905 while ((skb = skb_recv_datagram(sk, 0, 1, &err)) == NULL) {
906 if (err == -EAGAIN) {
907 printk(KERN_ERR "AUN: no data available?!");
910 printk(KERN_DEBUG "AUN: recvfrom() error %d\n", -err);
913 data = skb->h.raw + sizeof(struct udphdr);
914 ah = (struct aunhdr *)data;
915 len = skb->len - sizeof(struct udphdr);
921 aun_incoming(skb, ah, len);
924 aun_tx_ack(ah->handle, ECTYPE_TRANSMIT_OK);
927 aun_tx_ack(ah->handle, ECTYPE_TRANSMIT_NOT_LISTENING);
930 /* This isn't quite right yet. */
932 aun_send_response(ip->saddr, ah->handle, 6, ah->cb);
936 printk(KERN_DEBUG "unknown AUN packet (type %d)\n", data[0]);
939 skb_free_datagram(sk, skb);
943 * Called by the timer to manage the AUN transmit queue. If a packet
944 * was sent to a dead or nonexistent host then we will never get an
945 * acknowledgement back. After a few seconds we need to spot this and
949 static void ab_cleanup(unsigned long h)
954 spin_lock_irqsave(&aun_queue_lock, flags);
955 skb = skb_peek(&aun_queue);
956 while (skb && skb != (struct sk_buff *)&aun_queue)
958 struct sk_buff *newskb = skb->next;
959 struct ec_cb *eb = (struct ec_cb *)&skb->cb;
960 if ((jiffies - eb->start) > eb->timeout)
962 tx_result(skb->sk, eb->cookie,
963 ECTYPE_TRANSMIT_NOT_PRESENT);
969 spin_unlock_irqrestore(&aun_queue_lock, flags);
971 mod_timer(&ab_cleanup_timer, jiffies + (HZ*2));
974 static int __init aun_udp_initialise(void)
977 struct sockaddr_in sin;
979 skb_queue_head_init(&aun_queue);
980 spin_lock_init(&aun_queue_lock);
981 init_timer(&ab_cleanup_timer);
982 ab_cleanup_timer.expires = jiffies + (HZ*2);
983 ab_cleanup_timer.function = ab_cleanup;
984 add_timer(&ab_cleanup_timer);
986 memset(&sin, 0, sizeof(sin));
987 sin.sin_port = htons(AUN_PORT);
989 /* We can count ourselves lucky Acorn machines are too dim to
991 if ((error = sock_create(PF_INET, SOCK_DGRAM, 0, &udpsock)) < 0)
993 printk("AUN: socket error %d\n", -error);
997 udpsock->sk->reuse = 1;
998 udpsock->sk->allocation = GFP_ATOMIC; /* we're going to call it
1001 error = udpsock->ops->bind(udpsock, (struct sockaddr *)&sin,
1005 printk("AUN: bind error %d\n", -error);
1009 udpsock->sk->data_ready = aun_data_available;
1014 sock_release(udpsock);
1020 #ifdef CONFIG_ECONET_NATIVE
1023 * Receive an Econet frame from a device.
1026 static int econet_rcv(struct sk_buff *skb, struct net_device *dev, struct packet_type *pt)
1028 struct ec_framehdr *hdr = (struct ec_framehdr *)skb->data;
1030 struct ec_device *edev = dev->ec_ptr;
1038 if (skb->len < sizeof(struct ec_framehdr))
1040 /* Frame is too small to be any use */
1045 /* First check for encapsulated IP */
1046 if (hdr->port == EC_PORT_IP)
1048 skb->protocol = htons(ETH_P_IP);
1049 skb_pull(skb, sizeof(struct ec_framehdr));
1054 sk = ec_listening_socket(hdr->port, hdr->src_stn, hdr->src_net);
1061 return ec_queue_packet(sk, skb, edev->net, hdr->src_stn, hdr->cb,
1065 static struct packet_type econet_packet_type = {
1066 type: __constant_htons(ETH_P_ECONET),
1070 static void econet_hw_initialise(void)
1072 dev_add_pack(&econet_packet_type);
1077 static int econet_notifier(struct notifier_block *this, unsigned long msg, void *data)
1079 struct net_device *dev = (struct net_device *)data;
1080 struct ec_device *edev;
1083 case NETDEV_UNREGISTER:
1084 /* A device has gone down - kill any data we hold for it. */
1088 if (net2dev_map[0] == dev)
1090 net2dev_map[edev->net] = NULL;
1100 static struct notifier_block econet_netdev_notifier = {
1101 notifier_call: econet_notifier,
1104 static void __exit econet_proto_exit(void)
1106 #ifdef CONFIG_ECONET_AUNUDP
1107 del_timer(&ab_cleanup_timer);
1109 sock_release(udpsock);
1111 unregister_netdevice_notifier(&econet_netdev_notifier);
1112 sock_unregister(econet_family_ops.family);
1115 static int __init econet_proto_init(void)
1117 sock_register(&econet_family_ops);
1118 #ifdef CONFIG_ECONET_AUNUDP
1119 spin_lock_init(&aun_queue_lock);
1120 aun_udp_initialise();
1122 #ifdef CONFIG_ECONET_NATIVE
1123 econet_hw_initialise();
1125 register_netdevice_notifier(&econet_netdev_notifier);
1129 module_init(econet_proto_init);
1130 module_exit(econet_proto_exit);
1132 MODULE_LICENSE("GPL");