- l->i_hst = p->ip_dst.s_host;
- l->i_impno = p->ip_dst.s_imp;
- l->i_mlen = p->ip_len + L1822;
- l->i_link = IPLINK;
- l->i_type = 0;
- l->i_htype = 0;
- l->i_stype = 0;
-*/
- if ((l->i_shost = p->ip_src.s_host) == 0)
- l->i_shost = 253;
- if ((l->i_dhost = p->ip_dst.s_host) == 0)
- l->i_dhost = 253;
- l->i_type = IPTYPE;
-
- /* finish ip leader by calculating checksum and doing
- necessary byte-swapping */
-
- p->ip_sum = 0;
- p->ip_len = htons(p->ip_len);
- p->ip_id = htons(p->ip_id);
- p->ip_off = htons(p->ip_off);
- p->ip_sum = cksum(m, sizeof(struct ip));
-
- m->m_off -= L1822; /* -> 1822 leader */
- m->m_len += L1822;
-
- m->m_act = NULL;
-
-#ifndef IMPLOOP
-
- /* put output message on queue */
-
- s = splimp();
- if (imp_stat.outq_head != NULL)
- imp_stat.outq_tail->m_act = m;
- else
- imp_stat.outq_head = m;
- imp_stat.outq_tail = m;
- splx(s);
-
- /* if no outstanding output, start some */
-
- if (!imp_stat.outactive)
- imp_output(0);
-
-#else
- /* software looping: put msg chain on input queue */
-
- if (imp_stat.inq_head != NULL)
- imp_stat.inq_tail->m_act = m;
- else
- imp_stat.inq_head = m;
- imp_stat.inq_tail = m;
-
-#endif IMPLOOP
- return (1);
-}
-
-ip_setup(up, m, len) /* setup an ip header for raw write */
-register struct ucb *up;
-register struct mbuf *m;
-int len;