Lines Matching refs:addr
78 struct sockaddr_l2 addr; in l2cap_connect() local
85 memset(&addr, 0, sizeof(addr)); in l2cap_connect()
86 addr.l2_family = AF_BLUETOOTH; in l2cap_connect()
87 bacpy(&addr.l2_bdaddr, src); in l2cap_connect()
89 if (bind(sk, (struct sockaddr *) &addr, sizeof(addr)) < 0) { in l2cap_connect()
101 memset(&addr, 0, sizeof(addr)); in l2cap_connect()
102 addr.l2_family = AF_BLUETOOTH; in l2cap_connect()
103 bacpy(&addr.l2_bdaddr, dst); in l2cap_connect()
104 addr.l2_psm = htobs(psm); in l2cap_connect()
106 if (connect(sk, (struct sockaddr *) &addr, sizeof(addr)) < 0) { in l2cap_connect()
116 struct sockaddr_l2 addr; in l2cap_listen() local
123 memset(&addr, 0, sizeof(addr)); in l2cap_listen()
124 addr.l2_family = AF_BLUETOOTH; in l2cap_listen()
125 bacpy(&addr.l2_bdaddr, bdaddr); in l2cap_listen()
126 addr.l2_psm = htobs(psm); in l2cap_listen()
128 if (bind(sk, (struct sockaddr *) &addr, sizeof(addr)) < 0) { in l2cap_listen()
152 struct sockaddr_l2 addr; in l2cap_accept() local
156 memset(&addr, 0, sizeof(addr)); in l2cap_accept()
157 addrlen = sizeof(addr); in l2cap_accept()
159 if ((nsk = accept(sk, (struct sockaddr *) &addr, &addrlen)) < 0) in l2cap_accept()
163 bacpy(bdaddr, &addr.l2_bdaddr); in l2cap_accept()
171 char addr[18]; in request_authentication() local
174 ba2str(src, addr); in request_authentication()
175 dev_id = hci_devid(addr); in request_authentication()
207 char addr[18]; in request_encryption() local
210 ba2str(src, addr); in request_encryption()
211 dev_id = hci_devid(addr); in request_encryption()
253 struct sockaddr_l2 addr; in create_device() local
259 memset(&addr, 0, sizeof(addr)); in create_device()
260 addrlen = sizeof(addr); in create_device()
262 if (getsockname(csk, (struct sockaddr *) &addr, &addrlen) < 0) in create_device()
265 bacpy(&src, &addr.l2_bdaddr); in create_device()
267 memset(&addr, 0, sizeof(addr)); in create_device()
268 addrlen = sizeof(addr); in create_device()
270 if (getpeername(csk, (struct sockaddr *) &addr, &addrlen) < 0) in create_device()
273 bacpy(&dst, &addr.l2_bdaddr); in create_device()
427 char addr[18]; in do_show() local
440 ba2str(&ci[i].bdaddr, addr); in do_show()
441 printf("%s %s [%04x:%04x] %s %s\n", addr, ci[i].name, in do_show()
541 char addr[18]; in do_search() local
544 ba2str(bdaddr, addr); in do_search()
545 dev_id = hci_devid(addr); in do_search()
564 ba2str(&dst, addr); in do_search()
566 printf("\tConnecting to device %s\n", addr); in do_search()
580 ba2str(&dst, addr); in do_search()
582 printf("\tConnecting to device %s\n", addr); in do_search()
698 char addr[18]; in main() local
778 ba2str(&bdaddr, addr); in main()
836 syslog(LOG_INFO, "Bluetooth HID daemon (%s)", addr); in main()