at_proto.c revision 178888
165557Sjasone/*- 265557Sjasone * Copyright (c) 1990, 1991 Regents of The University of Michigan. 365557Sjasone * All Rights Reserved. 465557Sjasone * 565557Sjasone * Permission to use, copy, modify, and distribute this software and 665557Sjasone * its documentation for any purpose and without fee is hereby granted, 765557Sjasone * provided that the above copyright notice appears in all copies and 865557Sjasone * that both that copyright notice and this permission notice appear 965557Sjasone * in supporting documentation, and that the name of The University 1065557Sjasone * of Michigan not be used in advertising or publicity pertaining to 1165557Sjasone * distribution of the software without specific, written prior 1265557Sjasone * permission. This software is supplied as is without expressed or 1365557Sjasone * implied warranties of any kind. 1465557Sjasone * 1565557Sjasone * Research Systems Unix Group 1665557Sjasone * The University of Michigan 1765557Sjasone * c/o Mike Clark 1865557Sjasone * 535 W. William Street 1965557Sjasone * Ann Arbor, Michigan 2065557Sjasone * +1-313-763-0525 2165557Sjasone * netatalk@itd.umich.edu 2265557Sjasone * 2365557Sjasone * $FreeBSD: head/sys/netatalk/at_proto.c 178888 2008-05-09 23:03:00Z julian $ 2465557Sjasone */ 2565557Sjasone 2665557Sjasone#include <sys/param.h> 2765557Sjasone#include <sys/protosw.h> 2865557Sjasone#include <sys/domain.h> 2967352Sjhb#include <sys/socket.h> 3065557Sjasone 3165557Sjasone#include <sys/kernel.h> 3265557Sjasone 3365557Sjasone#include <net/route.h> 3472200Sbmilekic 3572200Sbmilekic#include <netatalk/at.h> 3672200Sbmilekic#include <netatalk/ddp_var.h> 3772200Sbmilekic#include <netatalk/at_extern.h> 3872200Sbmilekic 3965557Sjasonestatic struct domain atalkdomain; 4065557Sjasone 4165557Sjasonestatic struct protosw atalksw[] = { 4265557Sjasone { 4365557Sjasone /* Identifiers */ 4465557Sjasone .pr_type = SOCK_DGRAM, 4565557Sjasone .pr_domain = &atalkdomain, 4665557Sjasone .pr_protocol = ATPROTO_DDP, 4765557Sjasone .pr_flags = PR_ATOMIC|PR_ADDR, 4865557Sjasone .pr_output = ddp_output, 4965557Sjasone .pr_init = ddp_init, 5065557Sjasone .pr_usrreqs = &ddp_usrreqs, 5165557Sjasone }, 5265557Sjasone}; 5365557Sjasone 5465557Sjasonestatic struct domain atalkdomain = { 5565557Sjasone .dom_family = AF_APPLETALK, 5665557Sjasone .dom_name = "appletalk", 5765557Sjasone .dom_protosw = atalksw, 5868790Sjhb .dom_protoswNPROTOSW = &atalksw[sizeof(atalksw)/sizeof(atalksw[0])], 5967676Sjhb .dom_rtattach = at_inithead, 6065557Sjasone .dom_rtoffset = offsetof(struct sockaddr_at, sat_addr) << 3, 6167352Sjhb .dom_maxrtkey = sizeof(struct sockaddr_at), 6267352Sjhb}; 6376166Smarkm 6467352SjhbDOMAIN_SET(atalk); 6574912Sjhb