#include "config.h"
#include <stddef.h>
#include <stdlib.h>
#include <stdio.h>
#include <stdarg.h>
#include <errno.h>
#include <assert.h>
#include <sofia-sip/string0.h>
#include <sofia-sip/hostdomain.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/tport.h>
#include <sofia-sip/htable.h>
#include <sofia-sip/auth_module.h>
#include <sofia-sip/su_debug.h>
Include dependency graph for nth_server.c:
Functions | |
int | server_timer_init (server_t *srv) |
Initialize server timer. | |
uint32_t | server_now (server_t const *srv) |
Get current timestamp in milliseconds. | |
nth_site_t * | nth_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,...) |
Create a http site object. | |
url_t const * | nth_site_url (nth_site_t const *site) |
Get the site URL. | |
char const * | nth_site_server_version (void) |
Return server name and version. | |
su_time_t | nth_site_access_time (nth_site_t const *site) |
Get the time last time served. | |
int | nth_request_status (nth_request_t const *req) |
Return request authentication status. | |
auth_status_t * | nth_request_auth (nth_request_t const *req) |
Return request authentication status. | |
Variables | |
char const | NTH_DEBUG [] |
Environment variable determining the debug log level for nth module. | |
su_log_t | nth_server_log [] |
Debug log for nth module. |
auth_status_t* nth_request_auth | ( | nth_request_t const * | req | ) | [read] |
Return request authentication status.
req | pointer to HTTP request object |
Pointer | to authentication status struct |
int nth_request_status | ( | nth_request_t const * | req | ) |
Return request authentication status.
req | pointer to HTTP request object |
Status | code |
su_time_t nth_site_access_time | ( | nth_site_t const * | site | ) |
nth_site_t* nth_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, | |||
... | ||||
) |
Create a http site object.
The function nth_site_create() allocates and initializes a web site object. A web site object can be either
parent | pointer to parent site (NULL when creating a primary server object) | |
callback | pointer to callback function called when a request is received | |
magic | application context included in callback parameters | |
address | absolute or relative URI specifying the address of site | |
tag,value,... | list of tagged parameters |
url_t const* nth_site_url | ( | nth_site_t const * | site | ) |
int server_timer_init | ( | server_t * | srv | ) | [inline] |
Initialize server timer.
char const NTH_DEBUG[] |
Environment variable determining the debug log level for nth module.
The NTH_DEBUG environment variable is used to determine the debug logging level for nth module. The default level is 1.
Debug log for nth module.
The nth_server_log is the log object used by nth module. The level of nth_server_log is set using NTH_DEBUG environment variable.