$Revision: 1.11 $
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 </space/dbdev/marek/include/glib.h>
- #include </space/dbdev/marek/lib/glib/include/glibconfig.h>
- #include <limits.h>
- #include <float.h>
- #include <stdarg.h>
- #include "include/memwrap.h"
- #include <include/erroutines.h>
- #include <stdio.h>
- #include <unistd.h>
- #include <stdlib.h>
- #include <assert.h>
- #include <time.h>
- #include <stdarg.h>
- #include <strings.h>
- #include <bitmask.h>
- #include <include/er_aspects.h>
- #include <include/stubs.h>
- #include <stdlib.h>
- #include <stdio.h>
- #include "include/er_facilities.h"
Preprocessor definitions
#define DOMAINNAME "^[ ]*[a-zA-Z0-9--]*(\\.[a-zA-Z0-9--]+)*[ ]*$"
#define LEN_MIN 0
#define LEN_MAX 32
#define NETLEN 16
#define NETQUADS 4
#define NETQUAD_MIN 0
#define NETQUAD_MAX 255
#define ASNUM_MIN 1
#define ASNUM_MAX 65535
#define ASNUM_NUMOFFSET 2
#define VALIDIP6 "^[0-9A-F]{1,4}(:[0-9A-F]{1,4}){7}$"
#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]*$"
#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 ASMACRO "^AS-[A-Z]+$"
#define ROUTESETNAME "^RS-[A-Z0-9-]*$"
#define ASSETNAME "^AS-[A-Z0-9-]*$"
#define AUTONICPREFIXREGULAR "^AUTO-"
#define NAME_B "^[a-zA-Z][a-zA-Z_0-9.'|`;:,?/}{()+*#&-]*$"
#define PHONE_A "^[ ]*[+][0-9 ]*[(]{0,1}[0-9 -]+[)]{0,1}[0-9 -]*(ext\\.){0,1}[0-9 ]*$"
#define VALIDIP4PREFIX
#define EMAIL "^[.a-zA-Z0-9--]*@[a-zA-Z0-9--]*(\\.[a-zA-Z0-9--]+)*$"
#define IPRANGE "^[0-9./ -]*$"
char* nicpostfix[]
char* special[]
char* countries[]
Keytype strings
char* const Keytypes[]
Peerword strings
const char* Peerword[]
Create a new which keytypes bitmap.
More:
Authors:
ottrey
- Online References:
mask_t WK_new ( char* key )
- char* key
- The key to be examined.
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.
static int isaskeyword ( char* string )
static int isasmacro ( char* string )
static int isasnum ( char* string )
static int isaspref ( char* string )
static int isbrace ( char* string )
static int isclnskeyword ( char* string )
static int isclnsprefix ( char* string )
static int iscommunity ( char* string )
static int isdomname ( char* string )
static int isemail ( char* string )
static int isipaddr ( char* string )
static int isipv6prefix ( char* string )
static int isipv6prefix_a ( char* string )
static int islen ( char* string )
static int islimerick ( char* string )
static int ismaintainer ( char* string )
static int ismask ( char* string )
static int isname ( char* string )
static int isname_a ( char* string )
static int isname_ab ( char* string )
static int isname_b ( char* string )
static int isnet ( char* string )
static int isnetlist ( char* string )
static int isnetname ( char* string )
static int isnetnum ( char* string )
static int isnichandle ( char* string )
Return if there are any lower case characters
static int isnichandle_joao ( char* nichdl )
static int isparen ( char* string )
static int ispeerkeyword ( char* string )
static int isphone ( char* string )
static int isphone_a ( char* string )
static int isphone_ab ( char* string )
static int isphone_b ( char* string )
static int issubdomname ( char* string )
static int matching ( char* string, char left_c, char right_c )
static int perform_regex_test ( const char* pattern, char* string )
static int wk_is_assetname ( char* key )
static int wk_is_autnum ( char* key )
static int wk_is_domain ( char* key )
static int wk_is_email ( char* key )
static int wk_is_hostname ( char* key )
static int wk_is_ip6prefix ( char* key )
static int wk_is_ipprefix ( char* key )
static int wk_is_iprange ( char* key )
static int wk_is_key_cert ( char* key )
static int wk_is_limerick ( char* key )
static int wk_is_mntner ( char* key )
static int wk_is_name ( char* key )
static int wk_is_net6name ( char* key )
static int wk_is_netname ( char* key )
static int wk_is_nic_hdl ( char* key )
static int wk_is_routesetname ( char* key )