## tests/sv/test_sv.c

/* [<][>][^][v][top][bottom][index][help] */

## FUNCTIONS

This source file includes following functions.

1. SK_close_listening_socket
2. TH_run
3. TH_do_whois
4. TH_do_config
5. SK_get_connection
6. CO_get_whois_port
7. OB_init
8. do_whois
9. SK_atoport
10. SK_getsock
11. do_config
12. CO_get_config_port
13. CO_get_query_logging
14. CO_get_query_logfile
15. CO_get_password
16. CO_get_database_port
17. CO_get_rt_query
18. CO_get_in_query
19. CO_get_user
20. CO_get_host
21. error_init
22. main

    /***************************************
      $Revision: 1.3 $

      Example code: Unit test driver for server.c

      ******************/ /******************
      Modification History:
            ottrey (21/04/1999) Created.
      ******************/ /******************
      Copyright (c) 1999                              RIPE NCC

      All Rights Reserved

      Permission to use, copy, modify, and distribute this software and its
      documentation for any purpose and without fee is hereby granted,
      provided that the above copyright notice appear in all copies and that
      both that copyright notice and this permission notice appear in
      supporting documentation, and that the name of the author not be
      used in advertising or publicity pertaining to distribution of the
      software without specific, written prior permission.

      THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
      ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS; IN NO EVENT SHALL
      AUTHOR BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY
      DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
      AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
      OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
      ***************************************/
    #include "../test_.c"   /* test driver template */
    #include "erroutines.h"

    #define TEST1 "1 SV_start()"

    SK_close_listening_socket() {
    /* [<][>][^][v][top][bottom][index][help] */
      printf("Call to SK_close_listening_socket()\n");
    } /* SK_close_listening_socket() */

    TH_run() {
    /* [<][>][^][v][top][bottom][index][help] */
      printf("Call to TH_run()\n");
    } /* TH_run() */

    TH_do_whois() {
    /* [<][>][^][v][top][bottom][index][help] */
      printf("Call to TH_do_whois()\n");
    } /* TH_do_whois() */

    TH_do_config() {
    /* [<][>][^][v][top][bottom][index][help] */
      printf("Call to TH_do_config()\n");
    } /* TH_do_config() */

    SK_get_connection() {
    /* [<][>][^][v][top][bottom][index][help] */
      char str[STR_S];
      printf("Call to SK_get_connection()\n");
      printf("... waiting for new client [Hit return]");

      gets(str);

    } /* SK_get_connection() */

    char *CO_get_whois_port() {
    /* [<][>][^][v][top][bottom][index][help] */
      return "3333";
    } /* CO_get_whois_port() */

    OB_init() {
    /* [<][>][^][v][top][bottom][index][help] */
      printf("Call to OB_init()\n");
    } /* OB_init() */

    do_whois() {
    /* [<][>][^][v][top][bottom][index][help] */
      printf("Call to do_whois()\n");
    } /* do_whois() */

    SK_atoport() {
    /* [<][>][^][v][top][bottom][index][help] */
      printf("Call to SK_atoport()\n");
    } /* SK_atoport() */

    SK_getsock() {
    /* [<][>][^][v][top][bottom][index][help] */
      printf("Call to SK_getsock()\n");
    } /* SK_getsock() */

    do_config() {
    /* [<][>][^][v][top][bottom][index][help] */
      printf("Call to do_config()\n");
    } /* do_config() */

    char *CO_get_config_port() {
    /* [<][>][^][v][top][bottom][index][help] */
      return "3334";
    } /* CO_get_config_port() */

    int CO_get_query_logging() {
    /* [<][>][^][v][top][bottom][index][help] */
      return 1;
    } /* CO_get_query_logging() */

    char *CO_get_query_logfile() {
    /* [<][>][^][v][top][bottom][index][help] */
      return "stdout";
    } /* CO_get_query_logfile() */

    const char *CO_get_password() {
    /* [<][>][^][v][top][bottom][index][help] */
      printf("Call to CO_get_password()\n");
    } /* CO_get_password() */

    const char *CO_get_database_port() {
    /* [<][>][^][v][top][bottom][index][help] */
      printf("Call to CO_get_database_port()\n");
    } /* CO_get_database_port() */

    const char *CO_get_rt_query() {
    /* [<][>][^][v][top][bottom][index][help] */
      printf("Call to CO_get_rt_query()\n");
    } /* CO_get_rt_query() */

    const char *CO_get_in_query() {
    /* [<][>][^][v][top][bottom][index][help] */
      printf("Call to CO_get_in_query()\n");
    } /* CO_get_in_query() */

    const char *CO_get_user() {
    /* [<][>][^][v][top][bottom][index][help] */
      printf("Call to CO_get_user()\n");
    } /* CO_get_user() */

    const char *CO_get_host() {
    /* [<][>][^][v][top][bottom][index][help] */
      printf("Call to CO_get_host()\n");
    } /* CO_get_host() */

    void error_init(int argc, char ** argv) {
    /* [<][>][^][v][top][bottom][index][help] */
      er_path_t erlogstr;

      ER_init(argc, argv);

      erlogstr.fdes = stderr;
      erlogstr.asp  = MA_new(MA_END);
      erlogstr.sev  = ER_SEV_W;
      erlogstr.mode = ER_M_SEVCHAR | ER_M_TEXTLONG;

      ER_setpath(& erlogstr);

    } /* error_init() */

    int main(int argc, char** argv) {
    /* [<][>][^][v][top][bottom][index][help] */

      char *str;

      /* Get options */
      get_options(argc, argv);

      Infile_name = "";

      /* TEST1 */
      if(Test[1] == 1) {
        print_title(TEST1);

        error_init(argc, argv);
        SV_start();
      } /* TEST1 */

      return(0);

    } /* main() */

/* [<][>][^][v][top][bottom][index][help] */