DPRINTF(("Unknown svr4 sockio %x\n", cmd));
DPRINTF(("Unknown svr4 sockio %lx\n", cmd));
svr4_sockioctl(fp, cmd, data, p, retval)	struct file *fp;	u_long cmd;	caddr_t data;	struct proc *p;	register_t *retval;{	int error;	int (*ctl) __P((struct file *, u_long,  caddr_t, struct proc *)) =			fp->f_ops->fo_ioctl;	*retval = 0;	switch (cmd) {	case SVR4_SIOCGIFNUM:		{			extern int if_index;			DPRINTF(("SIOCGIFNUM %d\n", if_index));			return copyout(&if_index, data, sizeof(if_index));		}	case SVR4_SIOCGIFFLAGS:		{			struct ifreq br;			struct svr4_ifreq sr;			if ((error = copyin(data, &sr, sizeof(sr))) != 0)				return error;			(void) strcpy(br.ifr_name, sr.svr4_ifr_name);			if ((error = (*ctl)(fp, SIOCGIFFLAGS, 					    (caddr_t) &br, p)) != 0)				return error;			sr.svr4_ifr_flags = bsd_to_svr4_flags(br.ifr_flags);			DPRINTF(("SIOCGIFFLAGS %s = %d\n", 				sr.svr4_ifr_name, sr.svr4_ifr_flags));			return 0;		}	case SVR4_SIOCGIFCONF:		{			struct svr4_ifconf sc;			if ((error = copyin(data, &sc, sizeof(sc))) != 0)				return error;			if ((error = (*ctl)(fp, OSIOCGIFCONF,					    (caddr_t) &sc, p)) != 0)				return error;			DPRINTF(("SIOCGIFCONF\n"));			return 0;		}	default:		DPRINTF(("Unknown svr4 sockio %x\n", cmd));		return 0;	/* ENOSYS really */	}}