1139823Simp/*-
211819Sjulian * Copyright (c) 1984, 1985, 1986, 1987, 1993
311819Sjulian *	The Regents of the University of California.  All rights reserved.
411819Sjulian *
511819Sjulian * Redistribution and use in source and binary forms, with or without
611819Sjulian * modification, are permitted provided that the following conditions
711819Sjulian * are met:
811819Sjulian * 1. Redistributions of source code must retain the above copyright
911819Sjulian *    notice, this list of conditions and the following disclaimer.
1011819Sjulian * 2. Redistributions in binary form must reproduce the above copyright
1111819Sjulian *    notice, this list of conditions and the following disclaimer in the
1211819Sjulian *    documentation and/or other materials provided with the distribution.
13165899Srwatson * 4. Neither the name of the University nor the names of its contributors
14165899Srwatson *    may be used to endorse or promote products derived from this software
15165899Srwatson *    without specific prior written permission.
16165899Srwatson *
17165899Srwatson * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
18165899Srwatson * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
19165899Srwatson * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
20165899Srwatson * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
21165899Srwatson * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
22165899Srwatson * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
23165899Srwatson * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
24165899Srwatson * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
25165899Srwatson * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
26165899Srwatson * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
27165899Srwatson * SUCH DAMAGE.
28165899Srwatson *
29165899Srwatson * Copyright (c) 1995, Mike Mitchell
30165899Srwatson *
31165899Srwatson * Redistribution and use in source and binary forms, with or without
32165899Srwatson * modification, are permitted provided that the following conditions
33165899Srwatson * are met:
34165899Srwatson * 1. Redistributions of source code must retain the above copyright
35165899Srwatson *    notice, this list of conditions and the following disclaimer.
36165899Srwatson * 2. Redistributions in binary form must reproduce the above copyright
37165899Srwatson *    notice, this list of conditions and the following disclaimer in the
38165899Srwatson *    documentation and/or other materials provided with the distribution.
3911819Sjulian * 3. All advertising materials mentioning features or use of this software
4011819Sjulian *    must display the following acknowledgement:
4111819Sjulian *	This product includes software developed by the University of
4211819Sjulian *	California, Berkeley and its contributors.
4311819Sjulian * 4. Neither the name of the University nor the names of its contributors
4411819Sjulian *    may be used to endorse or promote products derived from this software
4511819Sjulian *    without specific prior written permission.
4611819Sjulian *
4711819Sjulian * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
4811819Sjulian * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
4911819Sjulian * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
5011819Sjulian * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
5111819Sjulian * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
5211819Sjulian * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
5311819Sjulian * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
5411819Sjulian * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
5511819Sjulian * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
5611819Sjulian * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
5711819Sjulian * SUCH DAMAGE.
5811819Sjulian *
5912057Sjulian *	@(#)ipx_var.h
6012057Sjulian *
6150477Speter * $FreeBSD$
6211819Sjulian */
6311819Sjulian
6411819Sjulian#ifndef _NETIPX_IPX_VAR_H_
6511819Sjulian#define _NETIPX_IPX_VAR_H_
6611819Sjulian
6711819Sjulian/*
6811819Sjulian * IPX Kernel Structures and Variables
6911819Sjulian */
7011819Sjulianstruct	ipxstat {
7125652Sjhay	u_long	ipxs_total;		/* total packets received */
7225652Sjhay	u_long	ipxs_badsum;		/* checksum bad */
7325652Sjhay	u_long	ipxs_tooshort;		/* packet too short */
7425652Sjhay	u_long	ipxs_toosmall;		/* not enough data */
7525652Sjhay	u_long	ipxs_forward;		/* packets forwarded */
7625652Sjhay	u_long	ipxs_cantforward;	/* packets rcvd for unreachable dest */
7725652Sjhay	u_long	ipxs_delivered;		/* datagrams delivered to upper level*/
7825652Sjhay	u_long	ipxs_localout;		/* total ipx packets generated here */
7925652Sjhay	u_long	ipxs_odropped;		/* lost packets due to nobufs, etc. */
8025652Sjhay	u_long	ipxs_noroute;		/* packets discarded due to no route */
8125652Sjhay	u_long	ipxs_mtutoosmall;	/* the interface mtu is too small */
8211819Sjulian};
8311819Sjulian
8455205Speter#ifdef _KERNEL
8526965Sjhay
8644078Sdfr#ifdef SYSCTL_DECL
8744078SdfrSYSCTL_DECL(_net_ipx);
8844078SdfrSYSCTL_DECL(_net_ipx_ipx);
8944078Sdfr#endif
9044078Sdfr
9125652Sjhayextern int ipxcksum;
9225652Sjhayextern long ipx_pexseq;
9311819Sjulianextern struct ipxstat ipxstat;
9425652Sjhayextern struct pr_usrreqs ipx_usrreqs;
9525652Sjhayextern struct pr_usrreqs ripx_usrreqs;
9625652Sjhayextern struct sockaddr_ipx ipx_netmask;
9725652Sjhayextern struct sockaddr_ipx ipx_hostmask;
9811819Sjulian
99139442Srwatsonextern const union ipx_net ipx_zeronet;
100139442Srwatsonextern const union ipx_net ipx_broadnet;
101139442Srwatsonextern const union ipx_host ipx_broadhost;
10225652Sjhay
10326965Sjhaystruct ifnet;
10426965Sjhaystruct ipx_addr;
105139479Srwatsonstruct ipxpcb;
10626965Sjhaystruct mbuf;
10783366Sjulianstruct thread;
10826965Sjhaystruct route;
10926965Sjhaystruct sockaddr;
11026965Sjhaystruct socket;
11138482Swollmanstruct sockopt;
11226965Sjhay
11392745Salfredu_short	ipx_cksum(struct mbuf *m, int len);
11492745Salfredint	ipx_control(struct socket *so, u_long cmd, caddr_t data,
115169463Srwatson	    struct ifnet *ifp, struct thread *td);
11692745Salfredvoid	ipx_ctlinput(int cmd, struct sockaddr *arg_as_sa, void *dummy);
11792745Salfredint	ipx_ctloutput(struct socket *so, struct sockopt *sopt);
11892745Salfredvoid	ipx_drop(struct ipxpcb *ipxp, int errno);
11992745Salfredvoid	ipx_init(void);
12092745Salfredvoid	ipx_input(struct mbuf *m, struct ipxpcb *ipxp);
12192745Salfredint	ipx_outputfl(struct mbuf *m0, struct route *ro, int flags);
12292745Salfredint	ipx_output_type20(struct mbuf *);
12392745Salfredint	ipx_peeraddr(struct socket *so, struct sockaddr **nam);
12492745Salfredvoid	ipx_printhost(struct ipx_addr *addr);
12592745Salfredint	ipx_sockaddr(struct socket *so, struct sockaddr **nam);
12625652Sjhay
12755205Speter#endif /* _KERNEL */
12825652Sjhay
12926965Sjhay#endif /* !_NETIPX_IPX_VAR_H_ */
130