-
-ip_send(ip)
- register struct ip *ip;
-{
- register struct mbuf *m;
- register struct imp *l;
- int hlen = ip->ip_hl << 2;
- int s;
-COUNT(IP_SEND);
-
- m = dtom(ip);
- l = (struct imp *)(mtod(m, caddr_t) - L1822);
- l->i_shost = ip->ip_src.s_host;
- l->i_dhost = ip->ip_dst.s_host;
- l->i_type = IPTYPE;
- ip->ip_sum = 0;
- ip->ip_len = htons((u_short)ip->ip_len);
- ip->ip_id = htons(ip->ip_id);
- ip->ip_off = htons((u_short)ip->ip_off);
- ip->ip_sum = inet_cksum(m, hlen);
- m->m_off -= L1822;
- m->m_len += L1822;
- m->m_act = NULL;
-#ifndef IMPLOOP
- 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 (!imp_stat.outactive)
- enstart(0);
-#else
- if (imp_stat.inq_head != NULL)
- imp_stat.inq_tail->m_act = m;
- else
- imp_stat.inq_head = m;
- imp_stat.inq_tail = m;
- setsoftnet();
-#endif IMPLOOP
-}