default: if (optname >= MRT_INIT) { #ifdef MROUTING if (op == PRCO_SETOPT) { error = ip_mrouter_cmd(optname, so, *m); if (*m) (void)m_free(*m); } else error = EINVAL; return (error); #else if (op == PRCO_SETOPT && *m) (void)m_free(*m); return (EOPNOTSUPP); #endif }
rip_ctloutput(op, so, level, optname, m)	int op;	struct socket *so;	int level, optname;	struct mbuf **m;{	register struct inpcb *inp = sotoinpcb(so);	register int error;	if (level != IPPROTO_IP) {		if (op == PRCO_SETOPT && *m)			(void) m_free(*m);		return (EINVAL);	}	switch (optname) {	case IP_HDRINCL:		error = 0;		if (op == PRCO_SETOPT) {			if (*m == 0 || (*m)->m_len < sizeof (int))				error = EINVAL;			else if (*mtod(*m, int *))				inp->inp_flags |= INP_HDRINCL;			else				inp->inp_flags &= ~INP_HDRINCL;			if (*m)				(void)m_free(*m);		} else {			*m = m_get(M_WAIT, M_SOOPTS);			(*m)->m_len = sizeof(int);			*mtod(*m, int *) = inp->inp_flags & INP_HDRINCL;		}		return (error);	case MRT_INIT:	case MRT_DONE:	case MRT_ADD_VIF:	case MRT_DEL_VIF:	case MRT_ADD_MFC:	case MRT_DEL_MFC:	case MRT_VERSION:	case MRT_ASSERT:#ifdef MROUTING		switch (op) {		case PRCO_SETOPT:			error = ip_mrouter_set(optname, so, m);			break;		case PRCO_GETOPT:			error = ip_mrouter_get(optname, so, m);			break;		default:			error = EINVAL;			break;		}		return (error);#else		if (op == PRCO_SETOPT && *m)			m_free(*m);		return (EOPNOTSUPP);#endif	default:		if (optname >= MRT_INIT) {#ifdef MROUTING			if (op == PRCO_SETOPT) {				error = ip_mrouter_cmd(optname, so, *m);				if (*m)					(void)m_free(*m);			} else				error = EINVAL;			return (error);#else			if (op == PRCO_SETOPT && *m)				(void)m_free(*m);			return (EOPNOTSUPP);#endif		}	}	return (ip_ctloutput(op, so, level, optname, m));}