Lines Matching refs:l2sock
69 int32_t unsock, l2sock;
119 l2sock = socket(PF_BLUETOOTH, SOCK_SEQPACKET, BLUETOOTH_PROTO_L2CAP);
120 if (l2sock < 0) {
128 if (getsockopt(l2sock, SOL_L2CAP, SO_L2CAP_IMTU, &imtu, &size) < 0) {
132 close(l2sock);
142 if (bind(l2sock, (struct sockaddr *) &l2, sizeof(l2)) < 0) {
146 close(l2sock);
150 if (listen(l2sock, 10) < 0) {
154 close(l2sock);
164 close(l2sock);
174 close(l2sock);
184 close(l2sock);
194 srv->maxfd = (unsock > l2sock)? unsock : l2sock;
207 FD_SET(l2sock, &srv->fdset);
208 srv->fdidx[l2sock].valid = 1;
209 srv->fdidx[l2sock].server = 1;
210 srv->fdidx[l2sock].control = 0;
211 srv->fdidx[l2sock].priv = 0;
212 srv->fdidx[l2sock].rsp_cs = 0;
213 srv->fdidx[l2sock].rsp_size = 0;
214 srv->fdidx[l2sock].rsp_limit = 0;
215 srv->fdidx[l2sock].omtu = 0; /* unknown */
216 srv->fdidx[l2sock].rsp = NULL;