Deleted Added
full compact
36c36
< * $FreeBSD: head/sys/net/if_fddisubr.c 93381 2002-03-29 10:29:10Z mdodd $
---
> * $FreeBSD: head/sys/net/if_fddisubr.c 93382 2002-03-29 10:40:35Z mdodd $
93a94,96
> static u_char fddibroadcastaddr[FDDI_ADDR_LEN] =
> { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff };
>
553a557,652
> void
> fddi_ifdetach(ifp, bpf)
> struct ifnet *ifp;
> int bpf;
> {
>
> if (bpf)
> bpfdetach(ifp);
>
> if_detach(ifp);
>
> return;
> }
>
> int
> fddi_ioctl (ifp, command, data)
> struct ifnet *ifp;
> int command;
> caddr_t data;
> {
> struct ifaddr *ifa;
> struct ifreq *ifr;
> int error;
>
> ifa = (struct ifaddr *) data;
> ifr = (struct ifreq *) data;
> error = 0;
>
> switch (command) {
> case SIOCSIFADDR:
> ifp->if_flags |= IFF_UP;
>
> switch (ifa->ifa_addr->sa_family) {
> #ifdef INET
> case AF_INET: /* before arpwhohas */
> ifp->if_init(ifp->if_softc);
> arp_ifinit(ifp, ifa);
> break;
> #endif
> #ifdef IPX
> /*
> * XXX - This code is probably wrong
> */
> case AF_IPX: {
> struct ipx_addr *ina;
> struct arpcom *ac;
>
> ina = &(IA_SIPX(ifa)->sipx_addr);
> ac = IFP2AC(ifp);
>
> if (ipx_nullhost(*ina)) {
> ina->x_host = *(union ipx_host *)
> ac->ac_enaddr;
> } else {
> bcopy((caddr_t) ina->x_host.c_host,
> (caddr_t) ac->ac_enaddr,
> sizeof(ac->ac_enaddr));
> }
>
> /*
> * Set new address
> */
> ifp->if_init(ifp->if_softc);
> }
> break;
> #endif
> default:
> ifp->if_init(ifp->if_softc);
> break;
> }
> case SIOCGIFADDR: {
> struct sockaddr *sa;
>
> sa = (struct sockaddr *) & ifr->ifr_data;
> bcopy(IFP2AC(ifp)->ac_enaddr,
> (caddr_t) sa->sa_data, FDDI_ADDR_LEN);
>
> }
> break;
> case SIOCSIFMTU:
> /*
> * Set the interface MTU.
> */
> if (ifr->ifr_mtu > FDDIMTU) {
> error = EINVAL;
> } else {
> ifp->if_mtu = ifr->ifr_mtu;
> }
> break;
> default:
> break;
> }
>
> return (error);
> }
>