Lines Matching refs:pcb
120 register struct atpcb *pcb;
122 pcb = (struct atpcb *)zalloc(atpcb_zone);
123 if (pcb == NULL)
125 bzero((caddr_t)pcb, sizeof(*pcb));
129 pcb->ddp_flags |= DDPFLG_CHKSUM;
131 pcb->ddp_flags &= ~DDPFLG_CHKSUM;
133 pcb->ddp_flags |= DDPFLG_SLFSND;
135 pcb->ddp_flags &= ~DDPFLG_SLFSND;
137 pcb->atpcb_head = head;
138 pcb->atpcb_socket = so;
141 insque((queue_t)pcb, (queue_t)head);
142 so->so_pcb = (caddr_t)pcb;
148 int at_pcbdetach(pcb)
149 struct atpcb *pcb;
151 struct socket *so = pcb->atpcb_socket;
154 if (pcb->lport) {
155 ddp_notify_nbp(pcb->lport, pcb->pid, pcb->ddptype);
156 pcb->lport = 0;
161 if ((pcb->atpcb_next) && (pcb->atpcb_prev))
162 remque((queue_t)pcb);
163 zfree(atpcb_zone, pcb);
171 struct atpcb *pcb;
179 for (pcb = ddp_head.atpcb_next; pcb != &ddp_head;
180 pcb = pcb->atpcb_next) {
181 if (pcb->lport == ddpsock &&
182 (!pcb->ddptype || !proto || (pcb->ddptype == proto)))
188 int at_pcbbind(pcb, nam)
189 register struct atpcb *pcb;
198 if (pcb->lport != ATADDR_ANYPORT ||
199 pcb->laddr.s_node != ATADDR_ANYNODE ||
200 pcb->laddr.s_net != ATADDR_ANYNET)
211 if (! ddp_socket_inuse(ddpsock, pcb->ddptype))
221 if (ddp_socket_inuse(ddpsock, pcb->ddptype))
225 pcb->lport = ddpsock;
234 pcb->laddr = local->sat_addr;
245 pcb->laddr = local->sat_addr;