ipx_proto.c revision 11819
111819Sjulian/* 211819Sjulian * Copyright (c) 1995, Mike Mitchell 311819Sjulian * Copyright (c) 1984, 1985, 1986, 1987, 1993 411819Sjulian * The Regents of the University of California. All rights reserved. 511819Sjulian * 611819Sjulian * Redistribution and use in source and binary forms, with or without 711819Sjulian * modification, are permitted provided that the following conditions 811819Sjulian * are met: 911819Sjulian * 1. Redistributions of source code must retain the above copyright 1011819Sjulian * notice, this list of conditions and the following disclaimer. 1111819Sjulian * 2. Redistributions in binary form must reproduce the above copyright 1211819Sjulian * notice, this list of conditions and the following disclaimer in the 1311819Sjulian * documentation and/or other materials provided with the distribution. 1411819Sjulian * 3. All advertising materials mentioning features or use of this software 1511819Sjulian * must display the following acknowledgement: 1611819Sjulian * This product includes software developed by the University of 1711819Sjulian * California, Berkeley and its contributors. 1811819Sjulian * 4. Neither the name of the University nor the names of its contributors 1911819Sjulian * may be used to endorse or promote products derived from this software 2011819Sjulian * without specific prior written permission. 2111819Sjulian * 2211819Sjulian * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 2311819Sjulian * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 2411819Sjulian * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 2511819Sjulian * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 2611819Sjulian * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 2711819Sjulian * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 2811819Sjulian * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 2911819Sjulian * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 3011819Sjulian * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 3111819Sjulian * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 3211819Sjulian * SUCH DAMAGE. 3311819Sjulian * 3411819Sjulian * @(#)ipx_proto.c 3511819Sjulian */ 3611819Sjulian 3711819Sjulian#include <sys/param.h> 3811819Sjulian#include <sys/socket.h> 3911819Sjulian#include <sys/protosw.h> 4011819Sjulian#include <sys/domain.h> 4111819Sjulian#include <sys/kernel.h> 4211819Sjulian#include <sys/mbuf.h> 4311819Sjulian 4411819Sjulian#include <net/radix.h> 4511819Sjulian 4611819Sjulian#include <netipx/ipx.h> 4711819Sjulian#include <netipx/spx.h> 4811819Sjulian 4911819Sjulian/* 5011819Sjulian * IPX protocol family: IPX, ERR, PXP, SPX, ROUTE. 5111819Sjulian */ 5211819Sjulian 5311819Sjulianstruct protosw ipxsw[] = { 5411819Sjulian{ 0, &ipxdomain, 0, 0, 5511819Sjulian 0, ipx_output, 0, 0, 5611819Sjulian 0, 5711819Sjulian ipx_init, 0, 0, 0 5811819Sjulian}, 5911819Sjulian{ SOCK_DGRAM, &ipxdomain, 0, PR_ATOMIC|PR_ADDR, 6011819Sjulian 0, 0, ipx_ctlinput, ipx_ctloutput, 6111819Sjulian ipx_usrreq, 6211819Sjulian 0, 0, 0, 0 6311819Sjulian}, 6411819Sjulian{ SOCK_STREAM, &ipxdomain, IPXPROTO_SPX, PR_CONNREQUIRED|PR_WANTRCVD, 6511819Sjulian spx_input, 0, spx_ctlinput, spx_ctloutput, 6611819Sjulian spx_usrreq, 6711819Sjulian spx_init, spx_fasttimo, spx_slowtimo, 0 6811819Sjulian}, 6911819Sjulian{ SOCK_SEQPACKET,&ipxdomain, IPXPROTO_SPX, PR_CONNREQUIRED|PR_WANTRCVD|PR_ATOMIC, 7011819Sjulian spx_input, 0, spx_ctlinput, spx_ctloutput, 7111819Sjulian spx_usrreq_sp, 7211819Sjulian 0, 0, 0, 0 7311819Sjulian}, 7411819Sjulian{ SOCK_RAW, &ipxdomain, IPXPROTO_RAW, PR_ATOMIC|PR_ADDR, 7511819Sjulian ipx_input, ipx_output, 0, ipx_ctloutput, 7611819Sjulian ipx_raw_usrreq, 7711819Sjulian 0, 0, 0, 0 7811819Sjulian}, 7911819Sjulian{ SOCK_RAW, &ipxdomain, IPXPROTO_ERROR, PR_ATOMIC|PR_ADDR, 8011819Sjulian ipx_ctlinput, ipx_output, 0, ipx_ctloutput, 8111819Sjulian ipx_raw_usrreq, 8211819Sjulian 0, 0, 0, 0 8311819Sjulian}, 8411819Sjulian#ifdef IPTUNNEL 8511819Sjulian#if 0 8611819Sjulian{ SOCK_RAW, &ipxdomain, IPPROTO_IPX, PR_ATOMIC|PR_ADDR, 8711819Sjulian iptun_input, rip_output, iptun_ctlinput, 0, 8811819Sjulian rip_usrreq, 8911819Sjulian 0, 0, 0, 0, 9011819Sjulian}, 9111819Sjulian#endif 9211819Sjulian#endif 9311819Sjulian}; 9411819Sjulian 9511819Sjulianstruct domain ipxdomain = 9611819Sjulian { AF_IPX, "network systems", 0, 0, 0, 9711819Sjulian ipxsw, &ipxsw[sizeof(ipxsw)/sizeof(ipxsw[0])], 0, 9811819Sjulian rn_inithead, 16, sizeof(struct sockaddr_ipx)}; 9911819Sjulian 10011819SjulianDOMAIN_SET(ipx); 101