Lines Matching defs:cookie
389 struct sctp_cookie_param *cookie;
408 /* FIXME: We really ought to build the cookie right
411 cookie = sctp_pack_cookie(asoc->ep, asoc, chunk, &cookie_len,
413 if (!cookie)
493 sctp_addto_chunk(retval, cookie_len, cookie);
527 kfree(cookie);
561 * This field must contain the exact cookie received in the
564 * An implementation SHOULD make the cookie as small as possible
572 void *cookie;
574 cookie = asoc->peer.cookie;
577 /* Build a cookie echo chunk. */
583 sctp_addto_chunk(retval, cookie_len, cookie);
1650 /* Build a cookie representing asoc.
1651 * This INCLUDES the param header needed to put the cookie in the INIT ACK.
1660 struct sctp_signed_cookie *cookie;
1664 /* Header size is static data prior to the actual cookie, including
1673 /* Pad out the cookie to a multiple to make the signature
1688 cookie = (struct sctp_signed_cookie *) retval->body;
1694 /* Copy the cookie part of the association itself. */
1695 cookie->c = asoc->c;
1696 /* Save the raw address list length in the cookie. */
1697 cookie->c.raw_addr_list_len = addrs_len;
1700 cookie->c.prsctp_capable = asoc->peer.prsctp_capable;
1702 /* Save adaptation indication in the cookie. */
1703 cookie->c.adaptation_ind = asoc->peer.adaptation_ind;
1705 /* Set an expiration time for the cookie. */
1706 cookie->c.expiration = ktime_add(asoc->cookie_life,
1710 memcpy(cookie + 1, init_chunk->chunk_hdr,
1714 memcpy((__u8 *)(cookie + 1) +
1724 crypto_shash_tfm_digest(tfm, (u8 *)&cookie->c, bodysize,
1725 cookie->signature);
1739 /* Unpack the cookie from COOKIE ECHO chunk, recreating the association. */
1748 struct sctp_signed_cookie *cookie;
1756 /* Header size is static data prior to the actual cookie, including
1765 /* Verify that the chunk looks like it even has a cookie.
1766 * There must be enough room for our cookie and our peer's
1773 /* Verify that the cookie has been padded out. */
1777 /* Process the cookie. */
1778 cookie = chunk->subh.cookie_hdr;
1779 bear_cookie = &cookie->c;
1799 if (memcmp(digest, cookie->signature, SCTP_SIGNATURE_SIZE)) {
1823 /* Check to see if the cookie is stale. If there is already
1824 * an association, there is no need to check cookie's expiration
1828 * a cookie may be considered expired, but this would only slow
1870 /* Populate the association from the cookie. */
2325 * the state cookie for an INIT-ACK chunk.
2369 * of the INIT from the cookie.
2465 /* Copy Initiation tag from INIT to VT_peer in cookie. */
2558 * came from a fresh INIT, and INIT ACK, or were stored in a cookie.
2632 kfree(asoc->peer.cookie);
2633 asoc->peer.cookie = kmemdup(param.cookie->body, asoc->peer.cookie_len, gfp);
2634 if (!asoc->peer.cookie)