136394Ssklower /*********************************************************** 236394Ssklower Copyright IBM Corporation 1987 336394Ssklower 436394Ssklower All Rights Reserved 536394Ssklower 636394Ssklower Permission to use, copy, modify, and distribute this software and its 736394Ssklower documentation for any purpose and without fee is hereby granted, 836394Ssklower provided that the above copyright notice appear in all copies and that 936394Ssklower both that copyright notice and this permission notice appear in 1036394Ssklower supporting documentation, and that the name of IBM not be 1136394Ssklower used in advertising or publicity pertaining to distribution of the 1236394Ssklower software without specific, written prior permission. 1336394Ssklower 1436394Ssklower IBM DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING 1536394Ssklower ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL 1636394Ssklower IBM BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR 1736394Ssklower ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, 1836394Ssklower WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, 1936394Ssklower ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS 2036394Ssklower SOFTWARE. 2136394Ssklower 2236394Ssklower ******************************************************************/ 2336394Ssklower 2436394Ssklower /* 2536394Ssklower * ARGO Project, Computer Sciences Dept., University of Wisconsin - Madison 2636394Ssklower */ 2736394Ssklower /* 2836394Ssklower * $Header: iso_usrreq.c,v 4.2 88/06/29 15:00:06 hagens Exp $ 2936394Ssklower * $Source: /usr/argo/sys/netiso/RCS/iso_usrreq.c,v $ 30*38841Ssklower * @(#)iso_usrreq.c 7.3 (Berkeley) 08/29/89 * 3136394Ssklower * 3236394Ssklower * iso_usrreq.c : support for iso address family ioctls only. 3336394Ssklower * (which support ifconfig, for example) 3436394Ssklower */ 3536394Ssklower 3636394Ssklower #ifndef lint 3736394Ssklower static char *rcsid = "$Header: iso_usrreq.c,v 4.2 88/06/29 15:00:06 hagens Exp $"; 3836394Ssklower #endif 3936394Ssklower 4036394Ssklower #ifdef ISO 4136394Ssklower 4237469Ssklower #include "types.h" 4337469Ssklower #include "param.h" 4437469Ssklower #include "mbuf.h" 4537469Ssklower #include "domain.h" 4637469Ssklower #include "protosw.h" 4737469Ssklower #include "socket.h" 4837469Ssklower #include "socketvar.h" 4937469Ssklower #include "errno.h" 5036394Ssklower 5136394Ssklower #include "../net/if.h" 5236394Ssklower #include "../net/route.h" 5336394Ssklower 5437469Ssklower #include "iso.h" 5537469Ssklower #include "clnp.h" 5637469Ssklower #include "clnp_stat.h" 5737469Ssklower #include "argo_debug.h" 5836394Ssklower 5936394Ssklower 6036394Ssklower /* 6136394Ssklower * FUNCTION: iso_usrreq 6236394Ssklower * 6336394Ssklower * PURPOSE: Provide a means of getting from soo_ioctl to iso_control 6436394Ssklower * 6536394Ssklower * RETURNS: unix error code 6636394Ssklower * 6736394Ssklower * SIDE EFFECTS: 6836394Ssklower * 6936394Ssklower * NOTES: Only PRU_CONTROL causes anything to occur. PRU_ATTACH 7036394Ssklower * and PRU_DETACH are noops so socket and close don't return 7136394Ssklower * an error code. 7236394Ssklower */ 7337469Ssklower iso_usrreq(so, req, m, nam, rights, control) 7436394Ssklower struct socket *so; /* socket: used only to get to this code */ 7536394Ssklower int req; /* request */ 7636394Ssklower struct mbuf *m; /* data for request */ 7736394Ssklower struct mbuf *nam; /* optional name */ 7836394Ssklower struct mbuf *rights; /* optional rights */ 7937469Ssklower struct mbuf *control; /* optional control info */ 8036394Ssklower { 8136394Ssklower int error; 8236394Ssklower 8336394Ssklower switch (req) { 8436394Ssklower case PRU_CONTROL: 8536394Ssklower error = iso_control(so, (int)m, (caddr_t)nam, 8636394Ssklower (struct ifnet *)rights); 8736394Ssklower break; 8836394Ssklower 8936394Ssklower case PRU_ATTACH: 9036394Ssklower case PRU_DETACH: 9136394Ssklower error = 0; 9236394Ssklower break; 9336394Ssklower 9436394Ssklower default: 9536394Ssklower error = EOPNOTSUPP; 9636394Ssklower } 9736394Ssklower 9836394Ssklower return error; 9936394Ssklower } 10036394Ssklower 10136394Ssklower #endif ISO 102