version 1.3, 1993/05/18 18:20:12 |
version 1.4, 1993/05/21 05:27:15 |
Line 97 rip_output(m, so) |
|
Line 97 rip_output(m, so) |
|
* If the user handed us a complete IP packet, use it. |
* If the user handed us a complete IP packet, use it. |
* Otherwise, allocate an mbuf for a header and fill it in. |
* Otherwise, allocate an mbuf for a header and fill it in. |
*/ |
*/ |
if (rp->rinp_flags & RINPF_HDRINCL) |
if (rp->rinp_flags & RINPF_HDRINCL) { |
ip = mtod(m, struct ip *); |
ip = mtod(m, struct ip *); |
else { |
if (ip->ip_len > m->m_pkthdr.len) |
|
return EMSGSIZE; |
|
ip->ip_len = m->m_pkthdr.len; |
|
} else { |
M_PREPEND(m, sizeof(struct ip), M_WAIT); |
M_PREPEND(m, sizeof(struct ip), M_WAIT); |
ip = mtod(m, struct ip *); |
ip = mtod(m, struct ip *); |
ip->ip_tos = 0; |
ip->ip_tos = 0; |