1 2 #include "../h/param.h" 3 #include "../h/systm.h" 4 #include "../h/clock.h" 5 #include "../h/mbuf.h" 6 #include "../h/protosw.h" 7 #include "../h/socket.h" 8 #include "../net/in.h" 9 #include "../net/in_systm.h" 10 #include "../net/if.h" 11 #include "../net/tp.h" 12 #include "../net/tp_var.h" 13 14 15 /* 16 * Transport output routine. Fill in the 17 * transport header and pass it off to the 18 * interface. 19 */ 20 tp_output(m, dstnode) 21 register struct mbuf *m; 22 u_short dstnode; 23 { 24 register struct tprh *t; 25 26 if (tpstate != TPS_RUN) 27 return (1); 28 if (dstnode > tprp.tprp_nn) /* node number out of range? */ 29 return (1); 30 m->m_off -= sizeof (struct tprh); 31 m->m_len += sizeof (struct tprh); 32 t = mtod(m, struct tprh *); 33 t->tprh_rtflg = TP_RH; 34 AD_SHORT(t->tprh_srcnode, tp_host); 35 AD_SHORT(t->tprh_dstnode, dstnode); 36 t->tprh_forward = 0; 37 return ((*tpifp->if_output)(tpifp, m, PF_DECNET)); 38 } 39