All pastes #505963 Raw Edit

Unnamed

public text v1 · immutable
·published 2007-05-23 20:09 UTC
rendered paste body
struct mbuf * np_phys_at_output(struct ifnet *ifp, struct mbuf *m, struct sockaddr *sa, struct rtentry *rt)
{
    struct at_hdr *ath ;

    ath = malloc(sizeof(ath), M_NP_AT_HDR, M_WAITOK | M_ZERO) ;

    m_adj(m, sizeof(struct ip6_hdr)) ;

    ath->at_flow = ip6->ip6_flow ;
    ath->at_plen = ip6->ip6_plen ;
    ath->at_nxt  = ip6->ip6_nxt ;
    ath->at_hlim = ip6->ip6_hlim ;
    ath->at_addr_src = ip6->ip6_src.s6_addr16[7] ;
    ath->at_addr_dst = ip6->ip6_dst.s6_addr16[7] ;
    
    M_PREPEND(m, sizeof(struct at_hdr), M_DONTWAIT) ;
    bcopy(m->m_data, ath, sizeof(struct at_hdr)) ;

    return m ;
}