I'm running 8.3.0 on x86 (plain Darwin, not an Intel Mac).
I ported some driver code from ppc, and noticed that
packets where I had called mbuf_outbound_finalize()
resulted in kernel error messages:
cksum: out of data
This is because by the time a packet gets to a driver, the
ip->ip_len ends up in network byte order. In order to
use mbuf_outbound_finalize() on intel, I needed to byteswap
ip = (struct ip *)((char *)mbuf_data(m_head) + ETHER_HDR_LEN);
ip->ip_len = ntohs(ip->ip_len);
mbuf_outbound_finalize(m_head, PF_INET, ETHER_HDR_LEN);
ip->ip_len = htons(ip->ip_len);
This is just a heads up for the next guy who runs into this..