Logo Search packages:      
Sourcecode: sofia-sip version File versions  Download package

nth_server.c File Reference


Detailed Description

HTTP server.

For internal use only.

Author:
Pekka Pessi <Pekka.Pessi@nokia.com>
Date:
Created: Sat Oct 19 01:37:36 2002 ppessi

Definition in file nth_server.c.

#include "config.h"
#include <sofia-sip/string0.h>
#include <sofia-sip/su.h>
#include <sofia-sip/http_header.h>
#include <sofia-sip/http_status.h>
#include <sofia-sip/http_tag.h>
#include "sofia-sip/nth.h"
#include <sofia-sip/msg_date.h>
#include <sofia-sip/msg_addr.h>
#include <sofia-sip/su_tagarg.h>
#include <sofia-sip/hostdomain.h>
#include <sofia-sip/tport.h>
#include <sofia-sip/htable.h>
#include <sofia-sip/auth_module.h>
#include <stddef.h>
#include <stdlib.h>
#include <stdio.h>
#include <stdarg.h>
#include <errno.h>
#include <assert.h>
#include <sofia-sip/su_debug.h>

Go to the source code of this file.

Classes

struct  auth_info
struct  nth_request_s
struct  nth_site_s
struct  server_s

Defines

#define SERVER_VERSION   "nth/" NTH_VERSION
#define SU_DEBUG   1
#define SU_LOG   nth_server_log
#define SU_TIMER_ARG_T   server_t
#define TP_MAGIC_T   void
#define TP_STACK_T   server_t
#define UINT32_MAX   (0xffffffffU)

Typedefs

typedef struct server_s server_t

Enumerations

enum  { SERVER_TICK = 1000 }

Functions

 HTABLE_DECLARE (hc_htable, hct, nth_client_t)
static void nth_authentication_result (void *ai0, auth_status_t *as)
auth_status_tnth_request_auth (nth_request_t const *req)
void nth_request_destroy (nth_request_t *req)
msg_tnth_request_message (nth_request_t *req)
http_method_t nth_request_method (nth_request_t const *req)
int nth_request_status (nth_request_t const *req)
int nth_request_treply (nth_request_t *req, int status, char const *phrase, tag_type_t tag, tag_value_t value,...)
su_time_t nth_site_access_time (nth_site_t const *site)
void nth_site_bind (nth_site_t *site, nth_request_f *callback, nth_site_magic_t *magic)
nth_site_tnth_site_create (nth_site_t *parent, nth_request_f *callback, nth_site_magic_t *magic, url_string_t const *address, tag_type_t tag, tag_value_t value,...)
void nth_site_destroy (nth_site_t *site)
int nth_site_get_params (nth_site_t const *site, tag_type_t tag, tag_value_t value,...)
int nth_site_get_stats (nth_site_t const *site, tag_type_t tag, tag_value_t value,...)
nth_site_magic_tnth_site_magic (nth_site_t const *site)
static void nth_site_request (server_t *srv, nth_site_t *site, tport_t *tport, msg_t *request, http_t *http, char const *path, msg_t *response)
char const * nth_site_server_version (void)
int nth_site_set_params (nth_site_t *site, tag_type_t tag, tag_value_t value,...)
url_t const * nth_site_url (nth_site_t const *site)
static server_t * server_create (url_t const *url, tag_type_t tag, tag_value_t value,...)
void server_destroy (server_t *srv)
static msg_tserver_msg_create (server_t *srv, int flags, char const data[], usize_t dlen, tport_t const *tp, tp_client_t *tpc)
su_inline uint32_t server_now (server_t const *srv)
static void server_reply (server_t *srv, tport_t *tport, msg_t *request, msg_t *response, int status, char const *phrase)
static void server_request (server_t *srv, tport_t *tport, msg_t *msg, void *arg, su_time_t now)
static void server_timer (su_root_magic_t *rm, su_timer_t *timer, server_t *srv)
su_inline int server_timer_init (server_t *srv)
static void server_tport_error (server_t *srv, tport_t *tport, int errcode, char const *remote)
static nth_site_t ** site_get_host (nth_site_t **, char const *host, char const *port)
static nth_site_t ** site_get_rslot (nth_site_t *parent, char *path, char **return_rest)
static nth_site_tsite_get_subdir (nth_site_t *parent, char const *path, char const **res)

Variables

static char const __func__ [] = "nth"
static char const *const http_no_tls_tports [] = { "tcp", NULL }
static char const *const http_tports []
char const NTH_DEBUG []
static tp_stack_class_t nth_server_class [1]
su_log_t nth_server_log [] = { SU_LOG_INIT("nth", "NTH_DEBUG", SU_DEBUG) }
static char const site_nodir_match [] = ""


Generated by  Doxygen 1.6.0   Back to index