1 /*********************************************************** 2 Copyright IBM Corporation 1987 3 4 All Rights Reserved 5 6 Permission to use, copy, modify, and distribute this software and its 7 documentation for any purpose and without fee is hereby granted, 8 provided that the above copyright notice appear in all copies and that 9 both that copyright notice and this permission notice appear in 10 supporting documentation, and that the name of IBM not be 11 used in advertising or publicity pertaining to distribution of the 12 software without specific, written prior permission. 13 14 IBM DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING 15 ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL 16 IBM BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR 17 ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, 18 WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, 19 ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS 20 SOFTWARE. 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 $ 30 * @(#)iso_usrreq.c 7.3 (Berkeley) 08/29/89 * 31 * 32 * iso_usrreq.c : support for iso address family ioctls only. 33 * (which support ifconfig, for example) 34 */ 35 36 #ifndef lint 37 static char *rcsid = "$Header: iso_usrreq.c,v 4.2 88/06/29 15:00:06 hagens Exp $"; 38 #endif 39 40 #ifdef ISO 41 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" 50 51 #include "../net/if.h" 52 #include "../net/route.h" 53 54 #include "iso.h" 55 #include "clnp.h" 56 #include "clnp_stat.h" 57 #include "argo_debug.h" 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 */ 73 iso_usrreq(so, req, m, nam, rights, control) 74 struct socket *so; /* socket: used only to get to this code */ 75 int req; /* request */ 76 struct mbuf *m; /* data for request */ 77 struct mbuf *nam; /* optional name */ 78 struct mbuf *rights; /* optional rights */ 79 struct mbuf *control; /* optional control info */ 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 102