MCPcopy Create free account
hub / github.com/F-Stack/f-stack / sctp_alloc_key

Function sctp_alloc_key

freebsd/netinet/sctp_auth.c:243–256  ·  view source on GitHub ↗

* allocate structure space for a key of length keylen */

Source from the content-addressed store, hash-verified

241 * allocate structure space for a key of length keylen
242 */
243sctp_key_t *
244sctp_alloc_key(uint32_t keylen)
245{
246 sctp_key_t *new_key;
247
248 SCTP_MALLOC(new_key, sctp_key_t *, sizeof(*new_key) + keylen,
249 SCTP_M_AUTH_KY);
250 if (new_key == NULL) {
251 /* out of memory */
252 return (NULL);
253 }
254 new_key->keylen = keylen;
255 return (new_key);
256}
257
258void
259sctp_free_key(sctp_key_t *key)

Callers 6

sctp_generate_random_keyFunction · 0.85
sctp_set_keyFunction · 0.85
sctp_compute_hashkeyFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected