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 $ 3036394Ssklower * 3136394Ssklower * iso_usrreq.c : support for iso address family ioctls only. 3236394Ssklower * (which support ifconfig, for example) 3336394Ssklower */ 3436394Ssklower 3536394Ssklower #ifndef lint 3636394Ssklower static char *rcsid = "$Header: iso_usrreq.c,v 4.2 88/06/29 15:00:06 hagens Exp $"; 3736394Ssklower #endif 3836394Ssklower 3936394Ssklower #ifdef ISO 4036394Ssklower 41*37469Ssklower #include "types.h" 42*37469Ssklower #include "param.h" 43*37469Ssklower #include "mbuf.h" 44*37469Ssklower #include "domain.h" 45*37469Ssklower #include "protosw.h" 46*37469Ssklower #include "socket.h" 47*37469Ssklower #include "socketvar.h" 48*37469Ssklower #include "errno.h" 4936394Ssklower 5036394Ssklower #include "../net/if.h" 5136394Ssklower #include "../net/route.h" 5236394Ssklower 53*37469Ssklower #include "iso.h" 54*37469Ssklower #include "clnp.h" 55*37469Ssklower #include "clnp_stat.h" 56*37469Ssklower #include "argo_debug.h" 5736394Ssklower 5836394Ssklower 5936394Ssklower /* 6036394Ssklower * FUNCTION: iso_usrreq 6136394Ssklower * 6236394Ssklower * PURPOSE: Provide a means of getting from soo_ioctl to iso_control 6336394Ssklower * 6436394Ssklower * RETURNS: unix error code 6536394Ssklower * 6636394Ssklower * SIDE EFFECTS: 6736394Ssklower * 6836394Ssklower * NOTES: Only PRU_CONTROL causes anything to occur. PRU_ATTACH 6936394Ssklower * and PRU_DETACH are noops so socket and close don't return 7036394Ssklower * an error code. 7136394Ssklower */ 72*37469Ssklower iso_usrreq(so, req, m, nam, rights, control) 7336394Ssklower struct socket *so; /* socket: used only to get to this code */ 7436394Ssklower int req; /* request */ 7536394Ssklower struct mbuf *m; /* data for request */ 7636394Ssklower struct mbuf *nam; /* optional name */ 7736394Ssklower struct mbuf *rights; /* optional rights */ 78*37469Ssklower struct mbuf *control; /* optional control info */ 7936394Ssklower { 8036394Ssklower int error; 8136394Ssklower 8236394Ssklower switch (req) { 8336394Ssklower case PRU_CONTROL: 8436394Ssklower error = iso_control(so, (int)m, (caddr_t)nam, 8536394Ssklower (struct ifnet *)rights); 8636394Ssklower break; 8736394Ssklower 8836394Ssklower case PRU_ATTACH: 8936394Ssklower case PRU_DETACH: 9036394Ssklower error = 0; 9136394Ssklower break; 9236394Ssklower 9336394Ssklower default: 9436394Ssklower error = EOPNOTSUPP; 9536394Ssklower } 9636394Ssklower 9736394Ssklower return error; 9836394Ssklower } 9936394Ssklower 10036394Ssklower #endif ISO 101