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 /* BUG: saddr may be NULL */
310 eb->cookie = saddr->cookie;
312 eb->sent = ec_tx_done;
314 if (dev->hard_header) {
316 struct ec_framehdr *fh;
318 res = dev->hard_header(skb, dev, ntohs(proto),
320 /* Poke in our control byte and
321 port number. Hack, hack. */
322 fh = (struct ec_framehdr *)(skb->data);
325 if (sock->type != SOCK_DGRAM) {
326 skb->tail = skb->data;
332 /* Copy the data. Returns -EFAULT on error */
333 err = memcpy_fromiovec(skb_put(skb,len), msg->msg_iov, len);
334 skb->protocol = proto;
336 skb->priority = sk->priority;
341 if (!(dev->flags & IFF_UP))
363 #ifdef CONFIG_ECONET_AUNUDP
364 /* AUN virtual Econet. */
367 return -ENETDOWN; /* No socket - can't send */
369 /* Make up a UDP datagram and hand it off to some higher intellect. */
371 memset(&udpdest, 0, sizeof(udpdest));
372 udpdest.sin_family = AF_INET;
373 udpdest.sin_port = htons(AUN_PORT);
375 /* At the moment we use the stupid Acorn scheme of Econet address
376 y.x maps to IP a.b.c.x. This should be replaced with something
377 more flexible and more aware of subnet masks. */
379 struct in_device *idev = in_dev_get(dev);
380 unsigned long network = 0;
382 read_lock(&idev->lock);
384 network = ntohl(idev->ifa_list->ifa_address) &
385 0xffffff00; /* !!! */
386 read_unlock(&idev->lock);
389 udpdest.sin_addr.s_addr = htonl(network | addr.station);
394 ah.code = 2; /* magic */
397 /* tack our header on the front of the iovec */
398 size = sizeof(struct aunhdr);
399 iov[0].iov_base = (void *)&ah;
400 iov[0].iov_len = size;
401 for (i = 0; i < msg->msg_iovlen; i++) {
402 void *base = msg->msg_iov[i].iov_base;
403 size_t len = msg->msg_iov[i].iov_len;
404 /* Check it now since we switch to KERNEL_DS later. */
405 if ((err = verify_area(VERIFY_READ, base, len)) < 0)
407 iov[i+1].iov_base = base;
408 iov[i+1].iov_len = len;
412 /* Get a skbuff (no data, just holds our cb information) */
413 if ((skb = sock_alloc_send_skb(sk, 0,
414 msg->msg_flags & MSG_DONTWAIT, &err)) == NULL)
417 eb = (struct ec_cb *)&skb->cb;
419 eb->cookie = saddr->cookie;
420 eb->timeout = (5*HZ);
423 eb->seq = (aun_seq++);
426 skb_queue_tail(&aun_queue, skb);
428 udpmsg.msg_name = (void *)&udpdest;
429 udpmsg.msg_namelen = sizeof(udpdest);
430 udpmsg.msg_iov = &iov[0];
431 udpmsg.msg_iovlen = msg->msg_iovlen + 1;
432 udpmsg.msg_control = NULL;
433 udpmsg.msg_controllen = 0;
436 oldfs = get_fs(); set_fs(KERNEL_DS); /* More privs :-) */
437 err = sock_sendmsg(udpsock, &udpmsg, size);
446 * Look up the address of a socket.
449 static int econet_getname(struct socket *sock, struct sockaddr *uaddr,
450 int *uaddr_len, int peer)
452 struct sock *sk = sock->sk;
453 struct sockaddr_ec *sec = (struct sockaddr_ec *)uaddr;
458 sec->sec_family = AF_ECONET;
459 sec->port = sk->protinfo.af_econet->port;
460 sec->addr.station = sk->protinfo.af_econet->station;
461 sec->addr.net = sk->protinfo.af_econet->net;
463 *uaddr_len = sizeof(*sec);
467 static void econet_destroy_timer(unsigned long data)
469 struct sock *sk=(struct sock *)data;
471 if (!atomic_read(&sk->wmem_alloc) && !atomic_read(&sk->rmem_alloc)) {
477 sk->timer.expires=jiffies+10*HZ;
478 add_timer(&sk->timer);
479 printk(KERN_DEBUG "econet socket destroy delayed\n");
483 * Close an econet socket.
486 static int econet_release(struct socket *sock)
488 struct sock *sk = sock->sk;
493 sklist_remove_socket(&econet_sklist, sk);
496 * Now the socket is dead. No more input will appear.
499 sk->state_change(sk); /* It is useless. Just for sanity. */
507 skb_queue_purge(&sk->receive_queue);
509 if (atomic_read(&sk->rmem_alloc) || atomic_read(&sk->wmem_alloc)) {
510 sk->timer.data=(unsigned long)sk;
511 sk->timer.expires=jiffies+HZ;
512 sk->timer.function=econet_destroy_timer;
513 add_timer(&sk->timer);
523 * Create an Econet socket
526 static int econet_create(struct socket *sock, int protocol)
531 /* Econet only provides datagram services. */
532 if (sock->type != SOCK_DGRAM)
533 return -ESOCKTNOSUPPORT;
535 sock->state = SS_UNCONNECTED;
539 sk = sk_alloc(PF_ECONET, GFP_KERNEL, 1);
544 sock->ops = &econet_ops;
545 sock_init_data(sock,sk);
547 sk->protinfo.af_econet = kmalloc(sizeof(struct econet_opt), GFP_KERNEL);
548 if (sk->protinfo.af_econet == NULL)
550 memset(sk->protinfo.af_econet, 0, sizeof(struct econet_opt));
552 sk->family = PF_ECONET;
555 sklist_insert_socket(&econet_sklist, sk);
566 * Handle Econet specific ioctls
569 static int ec_dev_ioctl(struct socket *sock, unsigned int cmd, void *arg)
572 struct ec_device *edev;
573 struct net_device *dev;
574 struct sockaddr_ec *sec;
577 * Fetch the caller's info block into kernel space
580 if (copy_from_user(&ifr, arg, sizeof(struct ifreq)))
583 if ((dev = dev_get_by_name(ifr.ifr_name)) == NULL)
586 sec = (struct sockaddr_ec *)&ifr.ifr_addr;
594 /* Magic up a new one. */
595 edev = kmalloc(sizeof(struct ec_device), GFP_KERNEL);
597 printk("af_ec: memory squeeze.\n");
601 memset(edev, 0, sizeof(struct ec_device));
605 net2dev_map[edev->net] = NULL;
606 edev->station = sec->addr.station;
607 edev->net = sec->addr.net;
608 net2dev_map[sec->addr.net] = dev;
610 net2dev_map[0] = dev;
621 memset(sec, 0, sizeof(struct sockaddr_ec));
622 sec->addr.station = edev->station;
623 sec->addr.net = edev->net;
624 sec->sec_family = AF_ECONET;
626 if (copy_to_user(arg, &ifr, sizeof(struct ifreq)))
636 * Handle generic ioctls
639 static int econet_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg)
641 struct sock *sk = sock->sk;
648 if (get_user(pid, (int *) arg))
650 if (current->pid != pid && current->pgrp != -pid && !capable(CAP_NET_ADMIN))
656 return put_user(sk->proc, (int *)arg);
658 if(sk->stamp.tv_sec==0)
660 return copy_to_user((void *)arg, &sk->stamp, sizeof(struct timeval)) ? -EFAULT : 0;
680 case SIOCSIFHWBROADCAST:
681 return(dev_ioctl(cmd,(void *) arg));
685 return ec_dev_ioctl(sock, cmd, (void *)arg);
689 return(dev_ioctl(cmd,(void *) arg));
695 static struct net_proto_family econet_family_ops = {
697 create: econet_create,
700 static struct proto_ops SOCKOPS_WRAPPED(econet_ops) = {
703 release: econet_release,
705 connect: sock_no_connect,
706 socketpair: sock_no_socketpair,
707 accept: sock_no_accept,
708 getname: econet_getname,
711 listen: sock_no_listen,
712 shutdown: sock_no_shutdown,
713 setsockopt: sock_no_setsockopt,
714 getsockopt: sock_no_getsockopt,
715 sendmsg: econet_sendmsg,
716 recvmsg: econet_recvmsg,
718 sendpage: sock_no_sendpage,
721 #include <linux/smp_lock.h>
722 SOCKOPS_WRAP(econet, PF_ECONET);
725 * Find the listening socket, if any, for the given data.
728 static struct sock *ec_listening_socket(unsigned char port, unsigned char
729 station, unsigned char net)
731 struct sock *sk = econet_sklist;
735 struct econet_opt *opt = sk->protinfo.af_econet;
736 if ((opt->port == port || opt->port == 0) &&
737 (opt->station == station || opt->station == 0) &&
738 (opt->net == net || opt->net == 0))
748 * Queue a received packet for a socket.
751 static int ec_queue_packet(struct sock *sk, struct sk_buff *skb,
752 unsigned char stn, unsigned char net,
753 unsigned char cb, unsigned char port)
755 struct ec_cb *eb = (struct ec_cb *)&skb->cb;
756 struct sockaddr_ec *sec = (struct sockaddr_ec *)&eb->sec;
758 memset(sec, 0, sizeof(struct sockaddr_ec));
759 sec->sec_family = AF_ECONET;
760 sec->type = ECTYPE_PACKET_RECEIVED;
764 sec->addr.station = stn;
766 return sock_queue_rcv_skb(sk, skb);
769 #ifdef CONFIG_ECONET_AUNUDP
772 * Send an AUN protocol response.
775 static void aun_send_response(__u32 addr, unsigned long seq, int code, int cb)
777 struct sockaddr_in sin;
780 struct msghdr udpmsg;
784 memset(&sin, 0, sizeof(sin));
785 sin.sin_family = AF_INET;
786 sin.sin_port = htons(AUN_PORT);
787 sin.sin_addr.s_addr = addr;
795 iov.iov_base = (void *)&ah;
796 iov.iov_len = sizeof(ah);
798 udpmsg.msg_name = (void *)&sin;
799 udpmsg.msg_namelen = sizeof(sin);
800 udpmsg.msg_iov = &iov;
801 udpmsg.msg_iovlen = 1;
802 udpmsg.msg_control = NULL;
803 udpmsg.msg_controllen = 0;
806 oldfs = get_fs(); set_fs(KERNEL_DS);
807 err = sock_sendmsg(udpsock, &udpmsg, sizeof(ah));
813 * Handle incoming AUN packets. Work out if anybody wants them,
814 * and send positive or negative acknowledgements as appropriate.
817 static void aun_incoming(struct sk_buff *skb, struct aunhdr *ah, size_t len)
819 struct iphdr *ip = skb->nh.iph;
820 unsigned char stn = ntohl(ip->saddr) & 0xff;
822 struct sk_buff *newskb;
823 struct ec_device *edev = skb->dev->ec_ptr;
828 if ((sk = ec_listening_socket(ah->port, stn, edev->net)) == NULL)
829 goto bad; /* Nobody wants it */
831 newskb = alloc_skb((len - sizeof(struct aunhdr) + 15) & ~15,
835 printk(KERN_DEBUG "AUN: memory squeeze, dropping packet.\n");
836 /* Send nack and hope sender tries again */
840 memcpy(skb_put(newskb, len - sizeof(struct aunhdr)), (void *)(ah+1),
841 len - sizeof(struct aunhdr));
843 if (ec_queue_packet(sk, newskb, stn, edev->net, ah->cb, ah->port))
845 /* Socket is bankrupt. */
850 aun_send_response(ip->saddr, ah->handle, 3, 0);
854 aun_send_response(ip->saddr, ah->handle, 4, 0);
858 * Handle incoming AUN transmit acknowledgements. If the sequence
859 * number matches something in our backlog then kill it and tell
860 * the user. If the remote took too long to reply then we may have
861 * dropped the packet already.
864 static void aun_tx_ack(unsigned long seq, int result)
870 spin_lock_irqsave(&aun_queue_lock, flags);
871 skb = skb_peek(&aun_queue);
872 while (skb && skb != (struct sk_buff *)&aun_queue)
874 struct sk_buff *newskb = skb->next;
875 eb = (struct ec_cb *)&skb->cb;
881 spin_unlock_irqrestore(&aun_queue_lock, flags);
882 printk(KERN_DEBUG "AUN: unknown sequence %ld\n", seq);
886 tx_result(skb->sk, eb->cookie, result);
888 spin_unlock_irqrestore(&aun_queue_lock, flags);
893 * Deal with received AUN frames - sort out what type of thing it is
894 * and hand it to the right function.
897 static void aun_data_available(struct sock *sk, int slen)
906 while ((skb = skb_recv_datagram(sk, 0, 1, &err)) == NULL) {
907 if (err == -EAGAIN) {
908 printk(KERN_ERR "AUN: no data available?!");
911 printk(KERN_DEBUG "AUN: recvfrom() error %d\n", -err);
914 data = skb->h.raw + sizeof(struct udphdr);
915 ah = (struct aunhdr *)data;
916 len = skb->len - sizeof(struct udphdr);
922 aun_incoming(skb, ah, len);
925 aun_tx_ack(ah->handle, ECTYPE_TRANSMIT_OK);
928 aun_tx_ack(ah->handle, ECTYPE_TRANSMIT_NOT_LISTENING);
931 /* This isn't quite right yet. */
933 aun_send_response(ip->saddr, ah->handle, 6, ah->cb);
937 printk(KERN_DEBUG "unknown AUN packet (type %d)\n", data[0]);
940 skb_free_datagram(sk, skb);
944 * Called by the timer to manage the AUN transmit queue. If a packet
945 * was sent to a dead or nonexistent host then we will never get an
946 * acknowledgement back. After a few seconds we need to spot this and
950 static void ab_cleanup(unsigned long h)
955 spin_lock_irqsave(&aun_queue_lock, flags);
956 skb = skb_peek(&aun_queue);
957 while (skb && skb != (struct sk_buff *)&aun_queue)
959 struct sk_buff *newskb = skb->next;
960 struct ec_cb *eb = (struct ec_cb *)&skb->cb;
961 if ((jiffies - eb->start) > eb->timeout)
963 tx_result(skb->sk, eb->cookie,
964 ECTYPE_TRANSMIT_NOT_PRESENT);
970 spin_unlock_irqrestore(&aun_queue_lock, flags);
972 mod_timer(&ab_cleanup_timer, jiffies + (HZ*2));
975 static int __init aun_udp_initialise(void)
978 struct sockaddr_in sin;
980 skb_queue_head_init(&aun_queue);
981 spin_lock_init(&aun_queue_lock);
982 init_timer(&ab_cleanup_timer);
983 ab_cleanup_timer.expires = jiffies + (HZ*2);
984 ab_cleanup_timer.function = ab_cleanup;
985 add_timer(&ab_cleanup_timer);
987 memset(&sin, 0, sizeof(sin));
988 sin.sin_port = htons(AUN_PORT);
990 /* We can count ourselves lucky Acorn machines are too dim to
992 if ((error = sock_create(PF_INET, SOCK_DGRAM, 0, &udpsock)) < 0)
994 printk("AUN: socket error %d\n", -error);
998 udpsock->sk->reuse = 1;
999 udpsock->sk->allocation = GFP_ATOMIC; /* we're going to call it
1002 error = udpsock->ops->bind(udpsock, (struct sockaddr *)&sin,
1006 printk("AUN: bind error %d\n", -error);
1010 udpsock->sk->data_ready = aun_data_available;
1015 sock_release(udpsock);
1021 #ifdef CONFIG_ECONET_NATIVE
1024 * Receive an Econet frame from a device.
1027 static int econet_rcv(struct sk_buff *skb, struct net_device *dev, struct packet_type *pt)
1029 struct ec_framehdr *hdr = (struct ec_framehdr *)skb->data;
1031 struct ec_device *edev = dev->ec_ptr;
1039 if (skb->len < sizeof(struct ec_framehdr))
1041 /* Frame is too small to be any use */
1046 /* First check for encapsulated IP */
1047 if (hdr->port == EC_PORT_IP)
1049 skb->protocol = htons(ETH_P_IP);
1050 skb_pull(skb, sizeof(struct ec_framehdr));
1055 sk = ec_listening_socket(hdr->port, hdr->src_stn, hdr->src_net);
1062 if (ec_queue_packet(sk, skb, edev->net, hdr->src_stn, hdr->cb,
1070 static struct packet_type econet_packet_type = {
1071 type: __constant_htons(ETH_P_ECONET),
1075 static void econet_hw_initialise(void)
1077 dev_add_pack(&econet_packet_type);
1082 static int econet_notifier(struct notifier_block *this, unsigned long msg, void *data)
1084 struct net_device *dev = (struct net_device *)data;
1085 struct ec_device *edev;
1088 case NETDEV_UNREGISTER:
1089 /* A device has gone down - kill any data we hold for it. */
1093 if (net2dev_map[0] == dev)
1095 net2dev_map[edev->net] = NULL;
1105 static struct notifier_block econet_netdev_notifier = {
1106 notifier_call: econet_notifier,
1109 static void __exit econet_proto_exit(void)
1111 #ifdef CONFIG_ECONET_AUNUDP
1112 del_timer(&ab_cleanup_timer);
1114 sock_release(udpsock);
1116 unregister_netdevice_notifier(&econet_netdev_notifier);
1117 sock_unregister(econet_family_ops.family);
1120 static int __init econet_proto_init(void)
1122 sock_register(&econet_family_ops);
1123 #ifdef CONFIG_ECONET_AUNUDP
1124 spin_lock_init(&aun_queue_lock);
1125 aun_udp_initialise();
1127 #ifdef CONFIG_ECONET_NATIVE
1128 econet_hw_initialise();
1130 register_netdevice_notifier(&econet_netdev_notifier);
1134 module_init(econet_proto_init);
1135 module_exit(econet_proto_exit);
1137 MODULE_LICENSE("GPL");