2 * Copyright (c) 1990,1991 Regents of The University of Michigan.
5 * Permission to use, copy, modify, and distribute this software and
6 * its documentation for any purpose and without fee is hereby granted,
7 * provided that the above copyright notice appears in all copies and
8 * that both that copyright notice and this permission notice appear
9 * in supporting documentation, and that the name of The University
10 * of Michigan not be used in advertising or publicity pertaining to
11 * distribution of the software without specific, written prior
12 * permission. This software is supplied as is without expressed or
13 * implied warranties of any kind.
15 * Research Systems Unix Group
16 * The University of Michigan
18 * 535 W. William Street
21 * netatalk@itd.umich.edu
24 #include <sys/param.h>
25 #include <sys/protosw.h>
26 #include <sys/domain.h>
27 #include <sys/socket.h>
29 #include <sys/kernel.h>
31 #include <net/route.h>
33 #include <netatalk/at.h>
34 #include <netatalk/ddp_var.h>
35 #include <netatalk/at_extern.h>
37 extern struct domain atalkdomain;
39 static struct protosw atalksw[] = {
42 SOCK_DGRAM, &atalkdomain, ATPROTO_DDP, PR_ATOMIC|PR_ADDR,
44 * protocol-protocol interface.
45 * fields are pr_input, pr_output, pr_ctlinput, and pr_ctloutput.
46 * pr_input can be called from the udp protocol stack for iptalk
47 * packets bound for a local socket.
48 * pr_output can be used by higher level appletalk protocols, should
49 * they be included in the kernel.
52 /* socket-protocol interface. deprecated */
54 /* utility routines. */
60 static struct domain atalkdomain = {
61 AF_APPLETALK, "appletalk", 0, 0, 0,
62 atalksw, &atalksw[sizeof(atalksw)/sizeof(atalksw[0])],
64 8 * (u_long) &((struct sockaddr_at *) 0)->sat_addr,
65 sizeof(struct sockaddr_at)