version 1.7, 1999/07/31 18:41:17 |
version 1.8, 1999/09/19 21:31:35 |
Line 441 nd6_ns_output(ifp, daddr6, taddr6, ln, d |
|
Line 441 nd6_ns_output(ifp, daddr6, taddr6, ln, d |
|
if (!dad && (mac = nd6_ifptomac(ifp))) { |
if (!dad && (mac = nd6_ifptomac(ifp))) { |
int optlen = sizeof(struct nd_opt_hdr) + ifp->if_addrlen; |
int optlen = sizeof(struct nd_opt_hdr) + ifp->if_addrlen; |
struct nd_opt_hdr *nd_opt = (struct nd_opt_hdr *)(nd_ns + 1); |
struct nd_opt_hdr *nd_opt = (struct nd_opt_hdr *)(nd_ns + 1); |
|
/* 8 byte alignments... */ |
|
optlen = (optlen + 7) & ~7; |
|
|
m->m_pkthdr.len += optlen; |
m->m_pkthdr.len += optlen; |
m->m_len += optlen; |
m->m_len += optlen; |
icmp6len += optlen; |
icmp6len += optlen; |
|
bzero((caddr_t)nd_opt, optlen); |
nd_opt->nd_opt_type = ND_OPT_SOURCE_LINKADDR; |
nd_opt->nd_opt_type = ND_OPT_SOURCE_LINKADDR; |
/* xxx 8 byte alignments? */ |
|
nd_opt->nd_opt_len = optlen >> 3; |
nd_opt->nd_opt_len = optlen >> 3; |
bcopy(mac, (caddr_t)(nd_opt + 1), ifp->if_addrlen); |
bcopy(mac, (caddr_t)(nd_opt + 1), ifp->if_addrlen); |
} |
} |
Line 790 nd6_na_output(ifp, daddr6, taddr6, flags |
|
Line 792 nd6_na_output(ifp, daddr6, taddr6, flags |
|
int optlen = sizeof(struct nd_opt_hdr) + ifp->if_addrlen; |
int optlen = sizeof(struct nd_opt_hdr) + ifp->if_addrlen; |
struct nd_opt_hdr *nd_opt = (struct nd_opt_hdr *)(nd_na + 1); |
struct nd_opt_hdr *nd_opt = (struct nd_opt_hdr *)(nd_na + 1); |
|
|
|
/* roundup to 8 bytes alignment! */ |
|
optlen = (optlen + 7) & ~7; |
|
|
m->m_pkthdr.len += optlen; |
m->m_pkthdr.len += optlen; |
m->m_len += optlen; |
m->m_len += optlen; |
icmp6len += optlen; |
icmp6len += optlen; |
|
bzero((caddr_t)nd_opt, optlen); |
nd_opt->nd_opt_type = ND_OPT_TARGET_LINKADDR; |
nd_opt->nd_opt_type = ND_OPT_TARGET_LINKADDR; |
/* xxx 8 bytes alignment? */ |
|
nd_opt->nd_opt_len = optlen >> 3; |
nd_opt->nd_opt_len = optlen >> 3; |
bcopy(mac, (caddr_t)(nd_opt + 1), ifp->if_addrlen); |
bcopy(mac, (caddr_t)(nd_opt + 1), ifp->if_addrlen); |
} else |
} else |
Line 818 nd6_ifptomac(ifp) |
|
Line 823 nd6_ifptomac(ifp) |
|
struct ifnet *ifp; |
struct ifnet *ifp; |
{ |
{ |
switch (ifp->if_type) { |
switch (ifp->if_type) { |
|
case IFT_ARCNET: |
case IFT_ETHER: |
case IFT_ETHER: |
case IFT_FDDI: |
case IFT_FDDI: |
#ifdef __NetBSD__ |
#ifdef __NetBSD__ |