rem: int udp_userreq(struct socket *so, int req,
add: static int udp_userreq(struct socket *so, int req,
context: int udp_userreq(struct socket *so, int req,			    struct mbuf *m, struct mbuf *addr, struct mbuf *ctrl){	struct inpcb *inp = sotoinpcb(so);	int error = 0;	if (req == PRU_CONTROL)		return in_control(so, (int)m, (caddr_t)addr, (struct ifnet *)ctrl);	if (inp == NULL && req != PRU_ATTACH) {		error = EINVAL;		goto release;	}	switch (req) {		case PRU_ATTACH:			/* we don't replace an existing inpcb! */			if (inp != NULL) {				error = EINVAL;				break;			}			error = in_pcballoc(so, &udb); /* udp head */			if (error)				break;			error = soreserve(so, udp_sendspace, udp_recvspace);			if (error)				break;			/* XXX - this is a hack! This should be the default ip TTL */			((struct inpcb*) so->so_pcb)->inp_ip.ip_ttl = 64;			break;		case PRU_DETACH:			/* This should really be protected when in kernel... */			if (inp == udp_last_inpcb)				udp_last_inpcb = &udb;			in_pcbdetach(inp);			break;		case PRU_BIND:			/* XXX - locking */			error = in_pcbbind(inp, addr);			break;		case PRU_SEND:			/* we can use this as we're in the same module... */			return udp_output(inp, m, addr, ctrl);		case PRU_LISTEN:			error = EINVAL;//EOPNOTSUPP;			break;		case PRU_CONNECT:			if (inp->faddr.s_addr != INADDR_ANY) {				error = EISCONN;				break;			}			error = in_pcbconnect(inp, addr);			if (error == 0)				socket_set_connected(so);			break;		case PRU_CONNECT2:			error = EINVAL;//EOPNOTSUPP;			break;		case PRU_ACCEPT:			error = EINVAL;//EOPNOTSUPP;			break;		case PRU_DISCONNECT:			if (inp->faddr.s_addr == INADDR_ANY) {				error = ENOTCONN;				break;			}			in_pcbdisconnect(inp);			inp->laddr.s_addr = INADDR_ANY;			so->so_state &= ~SS_ISCONNECTED;			break;		case PRU_SOCKADDR:			in_setsockaddr(inp, addr);			break;		case PRU_PEERADDR:			in_setpeeraddr(inp, addr);			break;		case PRU_SENSE:			/* will we ever see one of these???? */			/* generated by an fstat on bsd... */			return 0;		default:			printf("Unknown options passed to udp_userreq (%d)\n", req);	}release:	if (ctrl) {		printf("UDP control retained!\n");		m_freem(ctrl);	}	if (m)		m_freem(m);	return error;}