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 * 31 * iso_usrreq.c : support for iso address family ioctls only. 32 * (which support ifconfig, for example) 33 */ 34 35 #ifndef lint 36 static char *rcsid = "$Header: iso_usrreq.c,v 4.2 88/06/29 15:00:06 hagens Exp $"; 37 #endif 38 39 #ifdef ISO 40 41 #include "../h/types.h" 42 #include "../h/param.h" 43 #include "../h/mbuf.h" 44 #include "../h/domain.h" 45 #include "../h/protosw.h" 46 #include "../h/socket.h" 47 #include "../h/socketvar.h" 48 #include "../h/errno.h" 49 50 #include "../net/if.h" 51 #include "../net/route.h" 52 53 #include "../netiso/iso.h" 54 #include "../netiso/clnp.h" 55 #include "../netiso/clnp_stat.h" 56 #include "../netiso/argo_debug.h" 57 58 59 /* 60 * FUNCTION: iso_usrreq 61 * 62 * PURPOSE: Provide a means of getting from soo_ioctl to iso_control 63 * 64 * RETURNS: unix error code 65 * 66 * SIDE EFFECTS: 67 * 68 * NOTES: Only PRU_CONTROL causes anything to occur. PRU_ATTACH 69 * and PRU_DETACH are noops so socket and close don't return 70 * an error code. 71 */ 72 iso_usrreq(so, req, m, nam, rights) 73 struct socket *so; /* socket: used only to get to this code */ 74 int req; /* request */ 75 struct mbuf *m; /* data for request */ 76 struct mbuf *nam; /* optional name */ 77 struct mbuf *rights; /* optional rights */ 78 { 79 int error; 80 81 switch (req) { 82 case PRU_CONTROL: 83 error = iso_control(so, (int)m, (caddr_t)nam, 84 (struct ifnet *)rights); 85 break; 86 87 case PRU_ATTACH: 88 case PRU_DETACH: 89 error = 0; 90 break; 91 92 default: 93 error = EOPNOTSUPP; 94 } 95 96 return error; 97 } 98 99 #endif ISO 100