Lines Matching refs:l2cap_sock
54 static int l2cap_sock, unix_sock; variable
75 l2cap_sock = socket(PF_BLUETOOTH, SOCK_SEQPACKET, BTPROTO_L2CAP); in init_server()
76 if (l2cap_sock < 0) { in init_server()
86 if (bind(l2cap_sock, (struct sockaddr *) &l2addr, sizeof(l2addr)) < 0) { in init_server()
93 if (setsockopt(l2cap_sock, SOL_L2CAP, L2CAP_LM, &opt, sizeof(opt)) < 0) { in init_server()
103 if (getsockopt(l2cap_sock, SOL_L2CAP, L2CAP_OPTIONS, &opts, &optlen) < 0) { in init_server()
111 if (setsockopt(l2cap_sock, SOL_L2CAP, L2CAP_OPTIONS, &opts, sizeof(opts)) < 0) { in init_server()
117 listen(l2cap_sock, 5); in init_server()
212 if (data == &l2cap_sock) { in io_accept_event()
216 nsk = accept(l2cap_sock, (struct sockaddr *) &addr, &len); in io_accept_event()
268 l2cap_io = g_io_channel_unix_new(l2cap_sock); in start_sdp_server()
272 io_accept_event, &l2cap_sock); in start_sdp_server()