1/*- 2 * Copyright (c) 1990, 1991 Regents of The University of Michigan. 3 * All Rights Reserved. 4 * 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. 14 * 15 * Research Systems Unix Group 16 * The University of Michigan 17 * c/o Mike Clark 18 * 535 W. William Street 19 * Ann Arbor, Michigan 20 * +1-313-763-0525 21 * netatalk@itd.umich.edu 22 * 23 * $FreeBSD$ 24 */ 25 26#include <sys/param.h> 27#include <sys/systm.h> 28#include <sys/protosw.h> 29#include <sys/domain.h> 30#include <sys/socket.h> 31 32#include <sys/kernel.h> 33 34#include <net/route.h> 35 36#include <netatalk/at.h> 37#include <netatalk/ddp_var.h> 38#include <netatalk/at_extern.h> 39 40static struct domain atalkdomain; 41 42static struct protosw atalksw[] = { 43 { 44 /* Identifiers */ 45 .pr_type = SOCK_DGRAM, 46 .pr_domain = &atalkdomain, 47 .pr_protocol = ATPROTO_DDP, 48 .pr_flags = PR_ATOMIC|PR_ADDR, 49 .pr_output = ddp_output, 50 .pr_init = ddp_init, 51 .pr_usrreqs = &ddp_usrreqs, 52 }, 53}; 54 55static struct domain atalkdomain = { 56 .dom_family = AF_APPLETALK, 57 .dom_name = "appletalk", 58 .dom_protosw = atalksw, 59 .dom_protoswNPROTOSW = &atalksw[sizeof(atalksw)/sizeof(atalksw[0])], 60 .dom_rtattach = at_inithead, 61 .dom_rtoffset = offsetof(struct sockaddr_at, sat_addr) << 3, 62 .dom_maxrtkey = sizeof(struct sockaddr_at), 63}; 64 65DOMAIN_SET(atalk); 66