server.c File Reference

#include "server.h"
#include "auth.h"
#include "cqi.h"
#include <sys/types.h>
#include <sys/socket.h>
#include <sys/time.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <netdb.h>
#include <signal.h>
#include <strings.h>
#include <string.h>
#include <unistd.h>
#include <stdio.h>
#include "../cl/cl.h"
#include "../cl/macros.h"
#include "../cqp/options.h"
#include "../cqp/corpmanag.h"
#include "../cqp/parse_actions.h"
#include "../cqp/hash.h"

Data Structures

Defines

Typedefs

Functions

Variables


Define Documentation

#define ATTHASHSIZE   16384

Referenced by accept_connection().

#define GENERAL_ERROR_SIZE   1024

Referenced by cqi_general_error().

#define MSG_WAITALL   0

Referenced by cqi_recv_byte(), and cqi_recv_bytes().

#define NETBUFSIZE   512

Typedef Documentation

typedef struct att_bucket AttBucket
typedef struct att_hashtable* AttHashTable

Function Documentation

int accept_connection ( int  port  ) 
AttBucket* att_hash_lookup ( char *  str  ) 
int check_attribute_name ( char *  name  ) 
int check_corpus_name ( char *  name  ) 
int check_subcorpus_name ( char *  name  ) 
char* combine_subcorpus_spec ( char *  corpus,
char *  subcorpus 
)

References cl_malloc(), and cl_strdup().

Referenced by do_cqi_cqp_query().

int cqi_activate_corpus ( char *  name  ) 
void cqi_command ( int  command  ) 
void cqi_data_bool ( int  n  ) 
void cqi_data_bool_list ( cqi_byte list,
int  l 
)
void cqi_data_byte ( int  n  ) 
void cqi_data_byte_list ( cqi_byte list,
int  l 
)
void cqi_data_int ( int  n  ) 
void cqi_data_int_int ( int  n1,
int  n2 
)
void cqi_data_int_int_int_int ( int  n1,
int  n2,
int  n3,
int  n4 
)
void cqi_data_int_list ( int *  list,
int  l 
)
void cqi_data_string ( char *  str  ) 
void cqi_data_string_list ( char **  list,
int  l 
)
int cqi_drop_attribute ( char *  name  ) 
CorpusList* cqi_find_corpus ( char *  name  ) 
int cqi_flush ( void   ) 
void cqi_general_error ( char *  errstring  ) 
void cqi_internal_error ( char *  function,
char *  cause 
)
Attribute* cqi_lookup_attribute ( char *  name,
int  type 
)
int cqi_read_bool ( void   ) 
int cqi_read_bool_list ( cqi_byte **  list  ) 
int cqi_read_byte ( void   ) 
int cqi_read_byte_list ( cqi_byte **  list  ) 
int cqi_read_command ( void   ) 

References CQI_PAD, cqi_read_byte(), and server_debug.

Referenced by interpreter(), and main().

int cqi_read_int ( void   ) 
int cqi_read_int_list ( int **  list  ) 
char* cqi_read_string ( void   ) 
int cqi_read_string_list ( char ***  list  ) 
int cqi_read_word ( void   ) 

References cqi_read_byte(), and snoop.

Referenced by cqi_read_string().

int cqi_recv_byte ( void   ) 

References connfd, MSG_WAITALL, and snoop.

Referenced by cqi_read_bool(), and cqi_read_byte().

int cqi_recv_bytes ( cqi_byte buf,
int  bytes 
)

References connfd, MSG_WAITALL, and snoop.

Referenced by cqi_read_string().

void cqi_recv_error ( char *  function  ) 
int cqi_send_byte ( int  n  ) 

References conn_out, and snoop.

Referenced by cqi_data_bool(), cqi_data_byte(), and cqi_send_byte_list().

int cqi_send_byte_list ( cqi_byte list,
int  l 
)
void cqi_send_error ( char *  function  ) 
int cqi_send_int ( int  n  ) 
int cqi_send_int_list ( int *  list,
int  l 
)

References cqi_send_int().

Referenced by cqi_data_int_list().

int cqi_send_string ( char *  str  ) 
int cqi_send_string_list ( char **  list,
int  l 
)

References cqi_send_int(), and cqi_send_string().

Referenced by cqi_data_string_list().

int cqi_send_word ( int  n  ) 
void free_attribute_hash ( void   ) 

References att_hashtable::space.

void make_attribute_hash ( int  size  ) 
int split_attribute_spec ( char *  spec,
char **  corpus,
char **  attribute 
)
int split_subcorpus_spec ( char *  spec,
char **  corpus,
char **  subcorpus 
)
char* strdupto ( char *  str,
char *  end 
)

Variable Documentation

int bytes
struct sockaddr_in my_addr client_addr

Referenced by accept_connection().

FILE* conn_out
int connfd
int cqi_errno = CQI_STATUS_OK
char cqi_error_string[GENERAL_ERROR_SIZE] = "No error."

Referenced by cqi_general_error(), and interpreter().

char cqi_id_all[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz_-0123456789"

Referenced by check_subcorpus_name().

char cqi_id_lc[] = "abcdefghijklmnopqrstuvwxyz_-0123456789"

Referenced by check_attribute_name().

char cqi_id_lc_first[] = "abcdefghijklmnopqrstuvwxyz_"

Referenced by check_attribute_name().

char cqi_id_uc[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZ_-0123456789"

Referenced by check_corpus_name().

char cqi_id_uc_first[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZ_"
cqi_byte netbuf[NETBUFSIZE]

Referenced by accept_connection().

struct hostent* remote_host

Referenced by accept_connection().

int sockfd

Referenced by accept_connection().


Generated on Sun Feb 28 18:08:04 2010 for CWB by  doxygen 1.6.1