diff options
| author | Matthew N. Dodd <mdodd@FreeBSD.org> | 2003-03-15 15:09:11 +0000 |
|---|---|---|
| committer | Matthew N. Dodd <mdodd@FreeBSD.org> | 2003-03-15 15:09:11 +0000 |
| commit | 67df65de973b90f289c359b41f28b008f3640666 (patch) | |
| tree | c3e855c027b2d8e7cb38bc48b595f30006acced0 | |
| parent | bfd86a6070c673446ea3900cb0ff7c6f1b282963 (diff) | |
Notes
| -rw-r--r-- | sys/net/if_fddisubr.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/sys/net/if_fddisubr.c b/sys/net/if_fddisubr.c index 743098cea0ed..398b39505b1b 100644 --- a/sys/net/if_fddisubr.c +++ b/sys/net/if_fddisubr.c @@ -97,7 +97,6 @@ static int fddi_output(struct ifnet *, struct mbuf *, struct sockaddr *, struct rtentry *); static void fddi_input(struct ifnet *ifp, struct mbuf *m); - #define IFP2AC(IFP) ((struct arpcom *)IFP) #define senderr(e) { error = (e); goto bad; } @@ -137,7 +136,6 @@ fddi_output(ifp, m, dst, rt0) goto bad; switch (dst->sa_family) { - #ifdef INET case AF_INET: { if (!arpresolve(ifp, rt, m, dst, edst, rt0)) @@ -145,7 +143,7 @@ fddi_output(ifp, m, dst, rt0) type = htons(ETHERTYPE_IP); break; } -#endif +#endif /* INET */ #ifdef INET6 case AF_INET6: if (!nd6_storelladdr(ifp, rt, m, dst, (u_char *)edst)) { @@ -154,14 +152,14 @@ fddi_output(ifp, m, dst, rt0) } type = htons(ETHERTYPE_IPV6); break; -#endif +#endif /* INET6 */ #ifdef IPX case AF_IPX: type = htons(ETHERTYPE_IPX); bcopy((caddr_t)&(((struct sockaddr_ipx *)dst)->sipx_addr.x_host), (caddr_t)edst, FDDI_ADDR_LEN); break; -#endif +#endif /* IPX */ #ifdef NETATALK case AF_APPLETALK: { struct at_ifaddr *aa; @@ -267,9 +265,10 @@ fddi_output(ifp, m, dst, rt0) l = mtod(m, struct llc *); l->llc_control = LLC_UI; l->llc_dsap = l->llc_ssap = LLC_SNAP_LSAP; - l->llc_snap.org_code[0] = l->llc_snap.org_code[1] = l->llc_snap.org_code[2] = 0; - bcopy((caddr_t)&type, (caddr_t)&l->llc_snap.ether_type, - sizeof(u_int16_t)); + l->llc_snap.org_code[0] = + l->llc_snap.org_code[1] = + l->llc_snap.org_code[2] = 0; + l->llc_snap.ether_type = htons(type); } /* @@ -400,7 +399,8 @@ fddi_input(ifp, m) case LLC_SNAP_LSAP: { u_int16_t type; - if (l->llc_control != LLC_UI || l->llc_ssap != LLC_SNAP_LSAP) { + if ((l->llc_control != LLC_UI) || + (l->llc_ssap != LLC_SNAP_LSAP)) { ifp->if_noproto++; goto dropanyway; } |
