Back to index

opendkim  2.6.2
Functions | Variables
dkim-tables.c File Reference
#include <sys/types.h>
#include <string.h>
#include <assert.h>
#include "dkim-tables.h"
#include "dkim-internal.h"

Go to the source code of this file.

Functions

const char * dkim_code_to_name (struct nametable *tbl, const int code)
const int dkim_name_to_code (struct nametable *tbl, const char *name)

Variables

static char dkim_tables_c_id [] = "@(#)$Id: dkim-tables.c,v 1.7 2010/09/02 05:10:57 cm-msk Exp $"
static struct nametable []
struct nametablekeyparams = prv_keyparams
struct nametablekeyflags = prv_keyflags
struct nametablepolicyparams = prv_policyparams
struct nametablepolicies = prv_policies
struct nametablepolicyresults = prv_policyresults
struct nametablesigparams = prv_sigparams
struct nametablealgorithms = prv_algorithms
struct nametablecanonicalizations = prv_canonicalizations
struct nametablehashes = prv_hashes
struct nametablekeytypes = prv_keytypes
struct nametablequerytypes = prv_querytypes
struct nametableresults = prv_results
struct nametablesettypes = prv_settypes
struct nametablesigerrors = prv_sigerrors

Function Documentation

const char* dkim_code_to_name ( struct nametable tbl,
const int  code 
)

Definition at line 223 of file dkim-tables.c.

{
       int c;

       assert(tbl != NULL);

       for (c = 0; ; c++)
       {
              if (tbl[c].tbl_code == -1 && tbl[c].tbl_name == NULL)
                     return NULL;

              if (tbl[c].tbl_code == code)
                     return tbl[c].tbl_name;
       }
}

Here is the caller graph for this function:

const int dkim_name_to_code ( struct nametable tbl,
const char *  name 
)

Definition at line 251 of file dkim-tables.c.

{
       int c;

       assert(tbl != NULL);

       for (c = 0; ; c++)
       {
              if (tbl[c].tbl_code == -1 && tbl[c].tbl_name == NULL)
                     return -1;

              if (strcasecmp(tbl[c].tbl_name, name) == 0)
                     return tbl[c].tbl_code;
       }
}

Here is the caller graph for this function:


Variable Documentation

struct nametable* algorithms = prv_algorithms

Definition at line 95 of file dkim-tables.c.

struct nametable* canonicalizations = prv_canonicalizations

Definition at line 103 of file dkim-tables.c.

char dkim_tables_c_id[] = "@(#)$Id: dkim-tables.c,v 1.7 2010/09/02 05:10:57 cm-msk Exp $" [static]

Definition at line 9 of file dkim-tables.c.

struct nametable* hashes = prv_hashes

Definition at line 111 of file dkim-tables.c.

struct nametable* keyflags = prv_keyflags

Definition at line 40 of file dkim-tables.c.

struct nametable* keyparams = prv_keyparams

Definition at line 32 of file dkim-tables.c.

struct nametable* keytypes = prv_keytypes

Definition at line 118 of file dkim-tables.c.

static struct nametable [static]
Initial value:
       
{
       { "a",        DKIM_KEY_ALGORITHM },
       { "n",        DKIM_KEY_NOTES },
       { "p",        DKIM_KEY_DATA },
       { "s",        DKIM_KEY_SERVICE },
       { "t",        DKIM_KEY_FLAGS },
       { "v",        DKIM_KEY_VERSION },
       { NULL,              -1 }
}

Definition at line 22 of file dkim-tables.c.

struct nametable* policies = prv_policies

Definition at line 58 of file dkim-tables.c.

struct nametable* policyparams = prv_policyparams

Definition at line 49 of file dkim-tables.c.

struct nametable* policyresults = prv_policyresults

Definition at line 67 of file dkim-tables.c.

struct nametable* querytypes = prv_querytypes

Definition at line 125 of file dkim-tables.c.

struct nametable* results = prv_results

Definition at line 147 of file dkim-tables.c.

struct nametable* settypes = prv_settypes

Definition at line 157 of file dkim-tables.c.

struct nametable* sigerrors = prv_sigerrors

Definition at line 207 of file dkim-tables.c.

struct nametable* sigparams = prv_sigparams

Definition at line 87 of file dkim-tables.c.