Cross reference for modules/wk/which_keytypes.c of index.

# File modules/wk/which_keytypes.c

      $Revision: 1.16 $

      Example code: Determine which keys to look for.

      This is based on the C code that was reversed engineered from existing Perl
      code.  (~ottrey/which_table/which_table.c)

## Included Files

- `#include <stdio.h>`

- `#include <stdlib.h>`

- `#include <strings.h>`

- `#include <libgen.h>`

- `#include <glib.h>`

- `#include "modules/wk/isnic.h"`

- `#include "include/bitmask.h"`

- `#include "include/memwrap.h"`
  - `#include <include/erroutines.h>`
  - `#include <glib.h>`

- `#include "modules/wk/which_keytypes.h"`
  - `#include "include/bitmask.h"`

## Preprocessor definitions

`#define WK_IMPL`

`#define DOMAINNAME "^[ ]*[a-zA-Z0-9--]*(\\.[a-zA-Z0-9--]+)*[ ]*$"`

`#define DOMAINALPHA "[a-zA-Z]"`

`#define VALIDIP6PREFIX "^[0-9A-F:]*:[0-9A-F:/]*$"`

`#define NET "^[0-9]{1,3}.[0-9]{1,3}.[0-9]{1,3}.[0-9]{1,3}$"`

`#define ASNUM "^AS[1-9]+[0-9]{0,4}$"`

`#define ASRANGE "^AS[0-9]{1,5}[ ]*([-][ ]*AS[0-9]{1,5}){0,1}$"`

`#define NETNAME "^[A-Z][A-Z0-9-]*$"`

`#define MAINTAINER "^[A-Z][A-Z0-9-]*$"`

`#define LIMERICK "^LIM-[A-Z0-9-]+$"`

`#define KEYCERT "^PGPKEY-[0-9A-F]{8}$"`

`#define ROUTESETNAME "^RS-[A-Z0-9-_]*$"`

`#define ASSETNAME "^AS-[A-Z0-9-_]*$"`

`#define AUTONICPREFIXREGULAR "^AUTO-"`

`#define IPRANGE "^[0-9]{1,3}(\\.[0-9]{1,3}){0,3}[ ]*-[ ]*[0-9]{1,3}(\\.[0-9]{1,3}){0,3}$"`

`#define IPADDRESS "^[0-9.]+$"`

`#define IPPREFIX "^[0-9.]+/[0-9]+$"`

`#define PEERINGSET "^PRNG-"`

`#define FILTERSET "^FLTR-"`

`#define RTRSET "^RTRS-"`

`#define NICHANDLE "^[A-Z0-9-]+$"`

`#define NAME_B "^[a-zA-Z][a-zA-Z_0-9.'|`;:,?/}{()+*#&-]*$"`

`#define VALIDIP4PREFIX`

`#define EMAIL "^[.a-zA-Z0-9--]*@[a-zA-Z0-9--]*(\\.[a-zA-Z0-9--]+)*$"`

## Global Variable nicpostfix

`char* nicpostfix[]`

Included from | modules/wk/isnic.h
Visible in: |  | modules/wk/which_keytypes.c

## Global Variable special

`char* special[]`

Included from | modules/wk/isnic.h
Visible in: |  | modules/wk/which_keytypes.c

## Global Variable countries

`char* countries[]`

Included from | modules/wk/isnic.h
Visible in: |  | modules/wk/which_keytypes.c

## Global Variable Keytypes

`char* const Keytypes[]`

Included from | modules/wk/which_keytypes.h
Visible in: |  | modules/wk/which_keytypes.c
Used in: | WK_to_string() | modules/wk/which_keytypes.c

## Global Function WK_new()

      Create a new which keytypes bitmap.

      More:

      Authors:
            ottrey

    Online References:

`mask_t WK_new ( char* key )`

`char* key`
  The key to be examined.

Prototyped in: | modules/wk/which_keytypes.h
Calls: | MA_new() | modules/ma/bitmask.c
| MA_set() | modules/ma/bitmask.c
| perform_regex_test() | modules/wk/which_keytypes.c
| wk_is_domain() | modules/wk/which_keytypes.c
| wk_is_hostname() | modules/wk/which_keytypes.c
| wk_is_iprange() | modules/wk/which_keytypes.c
| wk_is_name() | modules/wk/which_keytypes.c
Called by: | QC_fill() | modules/qc/query_command.c

## Global Function WK_to_string()

      Convert the which keytypes bitmap into a string.

      More:

      Authors:
            ottrey

    Online References:

`char* WK_to_string ( mask_t wk )`

`mask_t wk`
  The which keytypes mask to be converted.

Prototyped in: | modules/wk/which_keytypes.h
Calls: | MA_to_string() | modules/ma/bitmask.c
Called by: | QC_query_command_to_string() | modules/qc/query_command.c
References Variables: | Keytypes | modules/wk/which_keytypes.c

## Local Function isdomname()

`static int isdomname ( char* string )`

Calls: | perform_regex_test() | modules/wk/which_keytypes.c
Called by: | wk_is_domain() | modules/wk/which_keytypes.c
| wk_is_hostname() | modules/wk/which_keytypes.c

## Local Function isname_a()

`static int isname_a ( char* string )`

Calls: | perform_regex_test() | modules/wk/which_keytypes.c
Called by: | isname_ab() | modules/wk/which_keytypes.c

## Local Function isname_ab()

`static int isname_ab ( char* string )`

Calls: | isname_a() | modules/wk/which_keytypes.c
| isname_b() | modules/wk/which_keytypes.c

## Local Function isname_b()

`static int isname_b ( char* string )`

Calls: | perform_regex_test() | modules/wk/which_keytypes.c
Called by: | isname_ab() | modules/wk/which_keytypes.c

## Local Function perform_regex_test()

`static int perform_regex_test ( const char* pattern, char* string )`

Calls: | free(), regcmp(), regex()
Called by: | WK_new() | modules/wk/which_keytypes.c
| isdomname() | modules/wk/which_keytypes.c
| isname_a() | modules/wk/which_keytypes.c
| isname_b() | modules/wk/which_keytypes.c
| wk_is_iprange() | modules/wk/which_keytypes.c

## Local Function wk_is_domain()

`static int wk_is_domain ( char* key )`

Calls: | isdomname() | modules/wk/which_keytypes.c
Called by: | WK_new() | modules/wk/which_keytypes.c

## Local Function wk_is_hostname()

`static int wk_is_hostname ( char* key )`

Calls: | isdomname() | modules/wk/which_keytypes.c
| wk_is_iprange() | modules/wk/which_keytypes.c
Called by: | WK_new() | modules/wk/which_keytypes.c

## Local Function wk_is_iprange()

`static int wk_is_iprange ( char* key )`

Calls: | perform_regex_test() | modules/wk/which_keytypes.c
Called by: | WK_new() | modules/wk/which_keytypes.c
| wk_is_hostname() | modules/wk/which_keytypes.c

## Local Function wk_is_name()

`static int wk_is_name ( char* key )`

Called by: | WK_new() | modules/wk/which_keytypes.c