Lines Matching refs:sp
71 static boolean MatchSender(sp, m) /* (CCBPtr sp, MATCH_SENDERPtr m) */
72 CCBPtr sp;
76 if (sp->state != sOpen && sp->state != sClosing)
79 if (sp->remCID != m->srcCID)
82 if (sp->remoteAddress.a.node != m->addr.a.node)
84 if (sp->remoteAddress.a.socket != m->addr.a.socket)
86 if (sp->remoteAddress.a.net && m->addr.a.net &&
87 (sp->remoteAddress.a.net != m->addr.a.net))
134 int RXAttention(sp, mp, f, len) /* (CCBPtr sp, ADSP_FRAMEPtr f, word len) */
135 CCBPtr sp;
149 ((sp->userFlags & eAttention) == 0)) /* & they read the previous */
151 diff = UAL_VALUE_NTOH(f->pktFirstByteSeq) - sp->attnRecvSeq;
160 sp->attnCode = (f->data[0] << 8) + f->data[1]; /* Save attn code */
161 sp->attn_mb = mp;
164 sp->attnPtr = (unsigned char *)gbuf_rptr(mp);
170 sp->attnSize = len - 2; /* Tell user how many bytes */
171 ++sp->attnRecvSeq;
173 sp->userFlags |= eAttention;
174 UrgentUser(sp); /* Notify user */
178 sp->sendAttnAck = 1; /* send attention ack for dupl. &
180 sp->callSend = 1;
187 if ((sp->attnSendSeq + 1) == UAL_VALUE_NTOH(f->pktNextRecvSeq)) {
188 sp->attnSendSeq++;
189 if ((pb = sp->sapb) == 0) { /* We never sent data ? !!! */
195 sp->sapb = (struct adspcmd *)pb->qLink; /* Unlink from queue */
198 RemoveTimerElem(&adspGlobal.fastTimers, &sp->AttnTimer);
205 completepb(sp, pb); /* Done with the send attention */
207 if (sp->sapb) { /* Another send attention pending? */
208 sp->sendAttnData = 1;
209 sp->callSend = 1;
211 if (sp->state == sClosing) /* this ack may allow us to close... */
212 CheckOkToClose(sp);