/* tp_usrreq.c 1.2 82/05/15 */
#include "../h/socketvar.h"
#include "../h/protosw.h"
#include "../net/dn_systm.h"
#include "../net/tp_var.h"
* Transport protocol interface to socket abstraction.
* Used ONLY to initialize the Transport layer. May be
* used for routing control in the future.
* Process a Transport user request. Only allowed
* operation is PRU_ATTACH to initialize the Transport
tp_usrreq(so
, req
, m
, addr
)
if (so
->so_pcb
!= 0 || req
!= PRU_ATTACH
) {
return (EINVAL
); /* XXX */
if (tpstate
!= TPS_HALT
) {
sleep((caddr_t
)&tpstate
, PZERO
+1);
* Perform transport initialization for a line
m
->m_len
= sizeof (struct tpin
);
t
= mtod(m
, struct tpin
*);
t
->tpin_ctlflg
= TP_INIT
;
AD_SHORT(t
->tpin_srcnode
, tp_host
);
t
->tpin_tiinfo
= TPINNT_NRT
;
AD_SHORT(t
->tpin_blksize
, 1024);
n
= (*tpifp
->if_output
)(tpifp
, m
, PF_DECNET
);