rem: int rip_userreq(struct socket *so, int req, struct mbuf *m, struct mbuf *nam,
add: static int rip_userreq(struct socket *so, int req, struct mbuf *m, struct mbuf *nam,
context: int rip_userreq(struct socket *so, int req, struct mbuf *m, struct mbuf *nam,                struct mbuf *control){	int error = 0;	struct inpcb *inp = sotoinpcb(so);	struct ifnet *interfaces = get_interfaces();		switch(req) {		case PRU_ATTACH:			if (inp) {				printf("Trying to attach to a socket already attached!\n");				return EINVAL;			}			if ((error = soreserve(so, rip_sendspace, rip_recvspace)) ||			    (error = in_pcballoc(so, &rawinpcb)))				break;			inp = (struct inpcb*)so->so_pcb;			inp->inp_ip.ip_p = (int)nam;			break;		case PRU_DISCONNECT:			if ((so->so_state & SS_ISCONNECTED) == 0) {				error = ENOTCONN;				break;			}		case PRU_ABORT:			socket_set_disconnected(so);		case PRU_DETACH:			if (inp == NULL) {				printf("Can't detach from NULL protocol block!\n");				error = EINVAL;				break;			}			in_pcbdetach(inp);			break;		case PRU_SEND: {			uint32 dst;			if ((so->so_state & SS_ISCONNECTED)) {				if (nam) {					error = EISCONN;					break;				}				dst = inp->faddr.s_addr;			} else {				if (!nam) {					error = ENOTCONN;					break;				}				dst = mtod(nam, struct sockaddr_in *)->sin_addr.s_addr;			}			error = rip_output(m, so, dst);			m = NULL;			break;		}		case PRU_BIND: {			struct sockaddr_in *addr = mtod(nam, struct sockaddr_in *);			if (nam->m_len != sizeof(*addr)) {				error = EINVAL;				break;			}			if ((interfaces) ||			    ((addr->sin_family != AF_INET) &&			    (addr->sin_family != AF_IMPLINK)) ||			    (addr->sin_addr.s_addr && 			    ifa_ifwithaddr((struct sockaddr*)addr) == 0)) {				error = EADDRNOTAVAIL;				break;			}			inp->laddr = addr->sin_addr;			break;		}		case PRU_CONNECT: {			struct sockaddr_in *addr = mtod(nam, struct sockaddr_in *);						if (nam->m_len != sizeof(*addr)) {				error = EINVAL;				break;			}			if ((interfaces == NULL)) {				error = EADDRNOTAVAIL;				break;			}			if ((addr->sin_family != AF_INET) &&			    (addr->sin_family != AF_IMPLINK)) {				error = EAFNOSUPPORT;				break;			}			inp->faddr = addr->sin_addr;			socket_set_connected(so);			break;		}		case PRU_CONNECT2:			error = EOPNOTSUPP;			break;		case PRU_SHUTDOWN:			socket_set_cantsendmore(so);			break;		case PRU_RCVOOB:		case PRU_RCVD:		case PRU_LISTEN:		case PRU_ACCEPT:		case PRU_SENDOOB:			error = EINVAL;//EOPNOTSUPP;			break;					/* add remaining cases */	}		return error;}