Lines Matching refs:new_skey
498 sctp_sharedkey_t *new_skey) in sctp_insert_sharedkey() argument
502 if ((shared_keys == NULL) || (new_skey == NULL)) in sctp_insert_sharedkey()
507 LIST_INSERT_HEAD(shared_keys, new_skey, next); in sctp_insert_sharedkey()
512 if (new_skey->keyid < skey->keyid) { in sctp_insert_sharedkey()
514 LIST_INSERT_BEFORE(skey, new_skey, next); in sctp_insert_sharedkey()
516 } else if (new_skey->keyid == skey->keyid) { in sctp_insert_sharedkey()
522 new_skey->keyid); in sctp_insert_sharedkey()
527 new_skey->keyid); in sctp_insert_sharedkey()
528 LIST_INSERT_BEFORE(skey, new_skey, next); in sctp_insert_sharedkey()
535 LIST_INSERT_AFTER(skey, new_skey, next); in sctp_insert_sharedkey()
590 sctp_sharedkey_t *new_skey; in sctp_copy_sharedkey() local
594 new_skey = sctp_alloc_sharedkey(); in sctp_copy_sharedkey()
595 if (new_skey == NULL) in sctp_copy_sharedkey()
598 new_skey->key = sctp_set_key(skey->key->key, skey->key->keylen); in sctp_copy_sharedkey()
600 new_skey->key = NULL; in sctp_copy_sharedkey()
601 new_skey->keyid = skey->keyid; in sctp_copy_sharedkey()
602 return (new_skey); in sctp_copy_sharedkey()
608 sctp_sharedkey_t *skey, *new_skey; in sctp_copy_skeylist() local
614 new_skey = sctp_copy_sharedkey(skey); in sctp_copy_skeylist()
615 if (new_skey != NULL) { in sctp_copy_skeylist()
616 if (sctp_insert_sharedkey(dest, new_skey)) { in sctp_copy_skeylist()
617 sctp_free_sharedkey(new_skey); in sctp_copy_skeylist()