Lines Matching defs:key
55 (int sock, struct sockaddr_hci *addr, bdaddr_p bdaddr, uint8_t *key);
214 link_key_p key = NULL;
220 if ((key = get_key(bdaddr, 0)) != NULL) {
223 bt_ntoa(&key->bdaddr, NULL),
224 (key->name != NULL)? key->name : "No name",
225 (key->pin != NULL)? "exists" : "doesn't exist");
227 return (send_pin_code_reply(sock, addr, bdaddr, key->pin));
241 link_key_p key = NULL;
247 if ((key = get_key(bdaddr, 0)) != NULL) {
249 "remote bdaddr %s, name '%s', link key %s",
250 bt_ntoa(&key->bdaddr, NULL),
251 (key->name != NULL)? key->name : "No name",
252 (key->key != NULL)? "exists" : "doesn't exist");
254 return (send_link_key_reply(sock, addr, bdaddr, key->key));
257 syslog(LOG_DEBUG, "Could not find link key for remote bdaddr %s",
325 bdaddr_p bdaddr, uint8_t *key)
335 if (key != NULL) {
344 memcpy(&cp->key, key, sizeof(cp->key));
370 syslog(LOG_ERR, "Could not send link key reply to '%s' " \
385 link_key_p key = NULL;
391 if ((key = get_key(&ep->bdaddr, 1)) == NULL) {
397 syslog(LOG_DEBUG, "Updating link key for the entry, " \
398 "remote bdaddr %s, name '%s', link key %s",
399 bt_ntoa(&key->bdaddr, NULL),
400 (key->name != NULL)? key->name : "No name",
401 (key->key != NULL)? "exists" : "doesn't exist");
403 if (key->key == NULL) {
404 key->key = (uint8_t *) malloc(NG_HCI_KEY_SIZE);
405 if (key->key == NULL) {
406 syslog(LOG_ERR, "Could not allocate link key");
411 memcpy(key->key, &ep->key, NG_HCI_KEY_SIZE);