1 /* $NetBSD: at_proto.c,v 1.4 2001/11/15 09:48:26 lukem Exp $ */
2
3 /*
4 * Copyright (c) 1990,1991 Regents of The University of Michigan.
5 * All Rights Reserved.
6 *
7 * Permission to use, copy, modify, and distribute this software and
8 * its documentation for any purpose and without fee is hereby granted,
9 * provided that the above copyright notice appears in all copies and
10 * that both that copyright notice and this permission notice appear
11 * in supporting documentation, and that the name of The University
12 * of Michigan not be used in advertising or publicity pertaining to
13 * distribution of the software without specific, written prior
14 * permission. This software is supplied as is without expressed or
15 * implied warranties of any kind.
16 *
17 * This product includes software developed by the University of
18 * California, Berkeley and its contributors.
19 *
20 * Research Systems Unix Group
21 * The University of Michigan
22 * c/o Wesley Craig
23 * 535 W. William Street
24 * Ann Arbor, Michigan
25 * +1-313-764-2278
26 * netatalk@umich.edu
27 */
28
29 #include <sys/cdefs.h>
30 __KERNEL_RCSID(0, "$NetBSD: at_proto.c,v 1.4 2001/11/15 09:48:26 lukem Exp $");
31
32 #include <sys/param.h>
33 #include <sys/systm.h>
34 #include <sys/protosw.h>
35 #include <sys/domain.h>
36 #include <sys/socket.h>
37
38 #include <sys/kernel.h>
39 #include <net/if.h>
40 #include <net/radix.h>
41 #include <net/if_ether.h>
42 #include <netinet/in.h>
43 #include <net/route.h>
44
45 #include <netatalk/at.h>
46 #include <netatalk/ddp.h>
47 #include <netatalk/at_var.h>
48 #include <netatalk/ddp_var.h>
49 #include <netatalk/at_extern.h>
50
51
52 struct protosw atalksw[] = {
53 {
54 /* Identifiers */
55 SOCK_DGRAM, &atalkdomain, ATPROTO_DDP, PR_ATOMIC|PR_ADDR,
56 /*
57 * protocol-protocol interface.
58 * fields are pr_input, pr_output, pr_ctlinput, and pr_ctloutput.
59 * pr_input can be called from the udp protocol stack for iptalk
60 * packets bound for a local socket.
61 * pr_output can be used by higher level appletalk protocols, should
62 * they be included in the kernel.
63 */
64 0, ddp_output, 0, 0,
65 /* socket-protocol interface. */
66 ddp_usrreq,
67 /* utility routines. */
68 ddp_init, 0, 0, 0,
69 },
70 };
71
72 struct domain atalkdomain = {
73 PF_APPLETALK, "appletalk", 0, 0, 0,
74 atalksw, &atalksw[sizeof(atalksw)/sizeof(atalksw[0])],
75 0, rn_inithead,
76 32,
77 sizeof(struct sockaddr_at)
78 };
79
80
Cache object: 896b888db4a804d895e8f052d2287828
|