1*8413Swnj /* tp_output.c 1.3 82/10/09 */ 26833Ssam 36833Ssam #include "../h/param.h" 46833Ssam #include "../h/systm.h" 56833Ssam #include "../h/mbuf.h" 66833Ssam #include "../h/protosw.h" 76833Ssam #include "../h/socket.h" 86833Ssam #include "../net/if.h" 9*8413Swnj #include "../netdecnet/tp.h" 10*8413Swnj #include "../netdecnet/tp_var.h" 116833Ssam 126833Ssam /* 136833Ssam * Transport output routine. Fill in the 146833Ssam * transport header and pass it off to the 156833Ssam * interface. 166833Ssam */ tp_output(m,dstnode)176833Ssamtp_output(m, dstnode) 186833Ssam register struct mbuf *m; 196833Ssam u_short dstnode; 206833Ssam { 216833Ssam register struct tprh *t; 226833Ssam 236833Ssam if (tpstate != TPS_RUN) 246833Ssam return (1); 256833Ssam if (dstnode > tprp.tprp_nn) /* node number out of range? */ 266833Ssam return (1); 276833Ssam m->m_off -= sizeof (struct tprh); 286833Ssam m->m_len += sizeof (struct tprh); 296833Ssam t = mtod(m, struct tprh *); 306833Ssam t->tprh_rtflg = TP_RH; 316833Ssam AD_SHORT(t->tprh_srcnode, tp_host); 326833Ssam AD_SHORT(t->tprh_dstnode, dstnode); 336833Ssam t->tprh_forward = 0; 346833Ssam return ((*tpifp->if_output)(tpifp, m, PF_DECNET)); 356833Ssam } 36