dkim_nametable_first()

[back to index]

SYNOPSIS
#include <dkim.h>
DKIM_STAT dkim_nametable_first(
	DKIM_NAMETABLE *tbl,
	DKIM_ITER_CTX **ctx,
	const char **name,
	int *code
);
Get the first entry from the table and start iteration.
DESCRIPTION
Called When dkim_nametable_first() can be called at any time.
ARGUMENTS
ArgumentDescription
tbl A name table to use for iteration. One of values described in DKIM_NAMETABLE.
ctx Pointer to a variable of type (DKIM_ITER_CTX **) which will be set to point to an iteration context of the table.
name Pointer to a variable of type (char **) which will be set to point to the name in the first entry of the table.
code Pointer to a variable of type (int *) which will be set to the mnemonic code in the first entry of the table.
RETURN VALUES
Return ValueDescription
DKIM_STAT_OK The first entry of the table is retrieved successfully.
DKIM_STAT_ITER_EOT The iteration has reached to the end of the table, i.e. the table has no item. (name and code are not set)
DKIM_STAT_NORESOURCE The library was unable to create an iteration context.
NOTES
  • Pointer arguments name and code would be set only if DKIM_STAT_OK is returned.
  • The iteration context *ctx would be set except DKIM_STAT_NORESOURCE is returned.
  • The iteration context *ctx should be released by the caller by using dkim_iter_ctx_free() when the iteration is no longer needed.

Copyright (c) 2005, 2007 Sendmail, Inc. and its suppliers. All rights reserved.
Copyright (c) 2009-2014, 2024 The Trusted Domain Project. All rights reserved.
By using this file, you agree to the terms and conditions set forth in the respective licenses.