1139827Simp/*- 2165972Srwatson * Copyright (c) 1990, 1991 Regents of The University of Michigan. 315885Sjulian * All Rights Reserved. 415885Sjulian * 515885Sjulian * Permission to use, copy, modify, and distribute this software and 615885Sjulian * its documentation for any purpose and without fee is hereby granted, 715885Sjulian * provided that the above copyright notice appears in all copies and 815885Sjulian * that both that copyright notice and this permission notice appear 915885Sjulian * in supporting documentation, and that the name of The University 1015885Sjulian * of Michigan not be used in advertising or publicity pertaining to 1115885Sjulian * distribution of the software without specific, written prior 1215885Sjulian * permission. This software is supplied as is without expressed or 1315885Sjulian * implied warranties of any kind. 1415885Sjulian * 1515885Sjulian * Research Systems Unix Group 1615885Sjulian * The University of Michigan 1715885Sjulian * c/o Mike Clark 1815885Sjulian * 535 W. William Street 1915885Sjulian * Ann Arbor, Michigan 2015885Sjulian * +1-313-763-0525 2115885Sjulian * netatalk@itd.umich.edu 22139827Simp * 23139827Simp * $FreeBSD$ 2415885Sjulian */ 2515885Sjulian 2615885Sjulian#include <sys/param.h> 27263478Sglebius#include <sys/systm.h> 2815885Sjulian#include <sys/protosw.h> 2915885Sjulian#include <sys/domain.h> 3015885Sjulian#include <sys/socket.h> 3115885Sjulian 3215885Sjulian#include <sys/kernel.h> 3333834Sbde 3415885Sjulian#include <net/route.h> 3515885Sjulian 3618207Sbde#include <netatalk/at.h> 3718207Sbde#include <netatalk/ddp_var.h> 3815885Sjulian#include <netatalk/at_extern.h> 3915885Sjulian 40149992Srodrigcstatic struct domain atalkdomain; 4115885Sjulian 4229185Sbdestatic struct protosw atalksw[] = { 43165972Srwatson { 44165972Srwatson /* Identifiers */ 45165972Srwatson .pr_type = SOCK_DGRAM, 46165972Srwatson .pr_domain = &atalkdomain, 47165972Srwatson .pr_protocol = ATPROTO_DDP, 48165972Srwatson .pr_flags = PR_ATOMIC|PR_ADDR, 49165972Srwatson .pr_output = ddp_output, 50165972Srwatson .pr_init = ddp_init, 51165972Srwatson .pr_usrreqs = &ddp_usrreqs, 52165972Srwatson }, 5315885Sjulian}; 5415885Sjulian 5529185Sbdestatic struct domain atalkdomain = { 56152242Sru .dom_family = AF_APPLETALK, 57152242Sru .dom_name = "appletalk", 58152242Sru .dom_protosw = atalksw, 59152242Sru .dom_protoswNPROTOSW = &atalksw[sizeof(atalksw)/sizeof(atalksw[0])], 60178888Sjulian .dom_rtattach = at_inithead, 61152242Sru .dom_rtoffset = offsetof(struct sockaddr_at, sat_addr) << 3, 62165972Srwatson .dom_maxrtkey = sizeof(struct sockaddr_at), 6315885Sjulian}; 6415885Sjulian 6515885SjulianDOMAIN_SET(atalk); 66