#include "gwlib/gwlib.h"
#include "gw/msg.h"
#include "gw/shared.h"
 
Go to the source code of this file.
◆ help()
  
  
      
        
          | static void help  | 
          ( | 
          void  | 
           | ) | 
           | 
         
       
   | 
  
static   | 
  
 
Definition at line 67 of file test_boxc.c.
References info().
Referenced by main().
   69     info(0, 
"Usage: test_boxc [options] ...");
    70     info(0, 
"where options are:");
    72     info(0, 
"    set log level for stderr logging");
    73     info(0, 
"-h hostname");
    74     info(0, 
"    hostname where bearerbox is running (default: localhost)");
    76     info(0, 
"    port for smsbox connections on bearerbox host (default: 13001)");
    78     info(0, 
"    numer of sequential connections that are made and closed (default: 1)");
 void info(int err, const char *fmt,...)
 
 
 
 
◆ main()
      
        
          | int main  | 
          ( | 
          int  | 
          argc,  | 
        
        
           | 
           | 
          char **  | 
          argv  | 
        
        
           | 
          ) | 
           |  | 
        
      
 
Definition at line 109 of file test_boxc.c.
References error(), getopt(), gwlib_init(), gwlib_shutdown(), help(), host, log_set_output_level(), no_conn, octstr_create, octstr_destroy(), optarg, optind, panic, and run_connects().
  117     while ((opt = 
getopt(argc, argv, 
"v:h:p:c:")) != EOF) {
   138                 error(0, 
"Invalid option %c", opt);
   140                 panic(0, 
"Stopping.");
 static unsigned int no_conn
 
void error(int err, const char *fmt,...)
 
int getopt(int argc, char **argv, char *opts)
 
void log_set_output_level(enum output_level level)
 
void octstr_destroy(Octstr *ostr)
 
#define octstr_create(cstr)
 
void gwlib_shutdown(void)
 
static void run_connects(void)
 
 
 
 
◆ run_connects()
  
  
      
        
          | static void run_connects  | 
          ( | 
          void  | 
           | ) | 
           | 
         
       
   | 
  
static   | 
  
 
Definition at line 86 of file test_boxc.c.
References close_connection_to_bearerbox(), cmd_identify, connect_to_bearerbox(), host, msg, msg_create, no_conn, octstr_create, and write_to_bearerbox().
Referenced by main().
   91     for (i = 1; i <= 
no_conn; i++) {
 static unsigned int no_conn
 
void connect_to_bearerbox(Octstr *host, int port, int ssl, Octstr *our_host)
 
#define octstr_create(cstr)
 
void close_connection_to_bearerbox(void)
 
void write_to_bearerbox(Msg *pmsg)
 
static XMLRPCDocument * msg
 
 
 
 
◆ host
◆ no_conn
◆ port
  
  
      
        
          | unsigned long port = 13001 | 
         
       
   | 
  
static   |