$Revision: 1.10 $
Query command module (qc). This is what the whois query gets stored as in
memory.
Status: NOT REVUED, NOT TESTED
Included Files
Preprocessor definitions
#define MAX_OPT_ARG_C 20
String sizes
#define STR_S 63
#define STR_M 255
#define STR_L 1023
#define STR_XL 4095
#define STR_XXL 16383
Convert the bitmap of attributes used in this query_command to a string.
More:
Authors:
ottrey
- Online References:
char* QC_bitmap_to_string ( mask_t bitmap )
- mask_t bitmap
- The bitmap of attribute to be converted.
Update the query environment.
Return the new environment?
This will include things like setting recursion, and the sources, and other
options deemed to be of an environmental type.
XXX This hasn't been implemented yet. Haven't quite decided what to do here
yet.
(I personally don't like functions that change two things at once, so that
may also be looked into aswell.)
More:
Authors:
ottrey
- Online References:
Query_command* QC_environ_update ( Query_command* qc, Query_command* qe )
- Query_command* qc
- The query command to be updated.
- Query_command* qe
- The current environment.
Free the query_command.
XXX I'm not sure the bitmaps will get freed.
qc->inv_attrs_bitmap
qc->object_type_bitmap
qc->keytypes_bitmap
More:
Authors:
ottrey
- Online References:
void QC_free ( Query_command* qc )
- Query_command* qc
- query_command to be freed.
Create a new query_command.
Pre-condition: OB_init() must be called before this.
Ie the objects have to be created first.
XXX sock shouldn't be passed here. But it needs to in order to report errors to the client.
Doh!.... this needs some looking into.
More:
Authors:
ottrey
- Online References:
Query_command* QC_new ( char* query_str, int sock )
- char* query_str
- The garden variety whois query string.
- int sock
- The client socket.
Prototyped in:
| modules/qc/query_command.h
|
Calls:
| AT_get_attributes() | modules/at/attributes.c
|
| AT_get_source() | modules/at/attributes.c
|
| AT_get_sources() | modules/at/attributes.c
|
| AT_sources_to_string() | modules/at/attributes.c
|
| CO_get_comnd_logging() | modules/co/constants.c
|
| MA_free() | modules/ma/bitmask.c
|
| MA_isset() | modules/ma/bitmask.c
|
| MA_new() | modules/ma/bitmask.c
|
| MA_set() | modules/ma/bitmask.c
|
| MA_xor() | modules/ma/bitmask.c
|
| OB_get_inv_attr_mask() | modules/ob/objects.c
|
| OB_get_object_mask() | modules/ob/objects.c
|
| log_command() | modules/qc/query_command.c
|
| my_getopt() | modules/qc/query_command.c
|
| SK_puts(), WK_new(), calloc(), g_list_append(), g_list_remove(), getsubopt(), sprintf(), strcat(), strcpy(), strlen(), strncmp(), strncpy(), strtok(), toupper()
|
Called by:
| PW_interact() | modules/pw/protocol_whois.c
|
Convert the query_command to a string.
More:
Authors:
ottrey
- Online References:
char* QC_query_command_to_string ( Query_command* query_command )
- Query_command* query_command
- The query_command to be converted.
Log the command.
This is more to do with Tracing. And should/will get merged with a tracing
module (when it is finalized.)
More:
Authors:
ottrey
- Online References:
static void log_command ( char* query_str, Query_command* query_command )
A thread safe version of getopt, used to get the options from the whois
query.
More:
Authors:
ottrey
- Online References:
static int my_getopt ( int opt_argc, char** opt_argv, char* optstring, int* my_optind_ptr, char** my_optarg_ptr )
- int opt_argc
- The number of query arguments.
- char** opt_argv
- The query arguments.
- char* optstring
- The string containing valid options.
- int* my_optind_ptr
- A pointer to the index into the options of the option
returned.
- char** my_optarg_ptr
- A pointer to the arguments to be returned.