be more careful about forwarding statistics
[unix-history] / usr / src / sys / netiso / iso_usrreq.c
CommitLineData
d8b9f99a
KS
1/***********************************************************
2 Copyright IBM Corporation 1987
3
4 All Rights Reserved
5
6Permission to use, copy, modify, and distribute this software and its
7documentation for any purpose and without fee is hereby granted,
8provided that the above copyright notice appear in all copies and that
9both that copyright notice and this permission notice appear in
10supporting documentation, and that the name of IBM not be
11used in advertising or publicity pertaining to distribution of the
12software without specific, written prior permission.
13
14IBM DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
15ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
16IBM BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
17ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
18WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
19ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
20SOFTWARE.
21
22******************************************************************/
23
24/*
25 * ARGO Project, Computer Sciences Dept., University of Wisconsin - Madison
26 */
27/*
28 * $Header: iso_usrreq.c,v 4.2 88/06/29 15:00:06 hagens Exp $
29 * $Source: /usr/argo/sys/netiso/RCS/iso_usrreq.c,v $
44f52ea5 30 * @(#)iso_usrreq.c 7.3 (Berkeley) %G% *
d8b9f99a
KS
31 *
32 * iso_usrreq.c : support for iso address family ioctls only.
33 * (which support ifconfig, for example)
34 */
35
36#ifndef lint
37static char *rcsid = "$Header: iso_usrreq.c,v 4.2 88/06/29 15:00:06 hagens Exp $";
38#endif
39
40#ifdef ISO
41
a50e2bc0
KS
42#include "types.h"
43#include "param.h"
44#include "mbuf.h"
45#include "domain.h"
46#include "protosw.h"
47#include "socket.h"
48#include "socketvar.h"
49#include "errno.h"
d8b9f99a
KS
50
51#include "../net/if.h"
52#include "../net/route.h"
53
a50e2bc0
KS
54#include "iso.h"
55#include "clnp.h"
56#include "clnp_stat.h"
57#include "argo_debug.h"
d8b9f99a
KS
58
59
60/*
61 * FUNCTION: iso_usrreq
62 *
63 * PURPOSE: Provide a means of getting from soo_ioctl to iso_control
64 *
65 * RETURNS: unix error code
66 *
67 * SIDE EFFECTS:
68 *
69 * NOTES: Only PRU_CONTROL causes anything to occur. PRU_ATTACH
70 * and PRU_DETACH are noops so socket and close don't return
71 * an error code.
72 */
a50e2bc0 73iso_usrreq(so, req, m, nam, rights, control)
d8b9f99a
KS
74struct socket *so; /* socket: used only to get to this code */
75int req; /* request */
76struct mbuf *m; /* data for request */
77struct mbuf *nam; /* optional name */
78struct mbuf *rights; /* optional rights */
a50e2bc0 79struct mbuf *control; /* optional control info */
d8b9f99a
KS
80{
81 int error;
82
83 switch (req) {
84 case PRU_CONTROL:
85 error = iso_control(so, (int)m, (caddr_t)nam,
86 (struct ifnet *)rights);
87 break;
88
89 case PRU_ATTACH:
90 case PRU_DETACH:
91 error = 0;
92 break;
93
94 default:
95 error = EOPNOTSUPP;
96 }
97
98 return error;
99}
100
101#endif ISO