Lines Matching defs:token

6172 /* for locating a matching token for continued access for walking lists,    */
7575 /* ipf_token_head but there is a chance that a token might have a ref count */
7598 /* type(I) - the token type to match */
7599 /* uid(I) - uid owning the token */
7600 /* ptr(I) - context pointer for the token */
7602 /* This function looks for a a token in the current list that matches up */
7605 /* the token has a reference held elsewhere, setting ipt_complete to 2 */
7607 /* lead to a token to be deleted. */
7640 /* Parameters: token(I) - pointer to token structure */
7642 /* Mark a token as being ineligable for being found with ipf_token_find. */
7645 ipf_token_mark_complete(token)
7646 ipftoken_t *token;
7648 if (token->ipt_complete == 0)
7649 token->ipt_complete = 1;
7655 /* Returns: ipftoken_t * - NULL if no memory, else pointer to token */
7657 /* type(I) - the token type to match */
7658 /* uid(I) - uid owning the token */
7659 /* ptr(I) - context pointer for the token */
7661 /* This function looks for a live token in the list of current tokens that */
7728 /* token(I) - pointer to token structure */
7731 /* This function unlinks a token structure from the linked list of tokens */
7736 ipf_token_unlink(softc, token)
7738 ipftoken_t *token;
7741 if (softc->ipf_token_tail == &token->ipt_next)
7742 softc->ipf_token_tail = token->ipt_pnext;
7744 *token->ipt_pnext = token->ipt_next;
7745 if (token->ipt_next != NULL)
7746 token->ipt_next->ipt_pnext = token->ipt_pnext;
7747 token->ipt_next = NULL;
7748 token->ipt_pnext = NULL;
7754 /* Returns: int - 0 == token freed, else reference count */
7756 /* token(I) - pointer to token structure */
7759 /* Drop the reference count on the token structure and if it drops to zero, */
7760 /* call the dereference function for the token type because it is then */
7761 /* possible to free the token data structure. */
7764 ipf_token_deref(softc, token)
7766 ipftoken_t *token;
7770 ASSERT(token->ipt_ref > 0);
7771 token->ipt_ref--;
7772 if (token->ipt_ref > 0)
7773 return token->ipt_ref;
7775 data = token->ipt_data;
7779 switch (token->ipt_type)
7807 ipf_lookup_iterderef(softc, token->ipt_type, data);
7812 ipf_token_unlink(softc, token);
7813 KFREE(token);
8020 /* data(I) - the token type to match */
8021 /* uid(I) - uid owning the token */
8022 /* ptr(I) - context pointer for the token */
8025 /* ipf_getnextrule. It's role is to find the right token in the kernel for */
8034 ipftoken_t *token;
8039 token = ipf_token_find(softc, IPFGENITER_IPF, uid, ctx);
8040 if (token != NULL) {
8041 error = ipf_getnextrule(softc, token, data);
8043 ipf_token_deref(softc, token);
8061 /* token(I) - pointer to ipftoken_t structure */
8068 ipf_geniter(softc, token, itp)
8070 ipftoken_t *token;
8078 error = ipf_frag_pkt_next(softc, token, itp);
8094 /* data(I) - the token type to match */
8095 /* uid(I) - uid owning the token */
8096 /* ptr(I) - context pointer for the token */
8106 ipftoken_t *token;
8114 token = ipf_token_find(softc, iter.igi_type, uid, ctx);
8115 if (token != NULL) {
8116 token->ipt_subtype = iter.igi_type;
8117 error = ipf_geniter(softc, token, &iter);
8119 ipf_token_deref(softc, token);
8134 /* data(I) - the token type to match */
8137 /* uid(I) - uid owning the token */
8138 /* ptr(I) - context pointer for the token */
9281 RWLOCK_INIT(&softc->ipf_tokens, "ipf token rwlock");