Main Page | Modules | Namespace List | Alphabetical List | Data Structures | Directories | File List | Data Fields | Globals | Related Pages | Examples

ap_listen.h File Reference

#include "apr_network_io.h"
#include "httpd.h"
#include "http_config.h"

Include dependency graph for ap_listen.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace  Apache

Defines

#define LISTEN_COMMANDS

Typedefs

typedef ap_listen_rec ap_listen_rec
typedef apr_status_t(* accept_function )(void **csd, ap_listen_rec *lr, apr_pool_t *ptrans)

Functions

void ap_listen_pre_config (void)
int ap_setup_listeners (server_rec *s)
const char * ap_set_listenbacklog (cmd_parms *cmd, void *dummy, const char *arg)
const char * ap_set_listener (cmd_parms *cmd, void *dummy, const char *ips)
const char * ap_set_send_buffer_size (cmd_parms *cmd, void *dummy, const char *arg)

Variables

AP_DECLARE_DATA ap_listen_recap_listeners


Define Documentation

#define LISTEN_COMMANDS
 

Value:

AP_INIT_TAKE1("ListenBacklog", ap_set_listenbacklog, NULL, RSRC_CONF, \
  "Maximum length of the queue of pending connections, as used by listen(2)"), \
AP_INIT_TAKE1("Listen", ap_set_listener, NULL, RSRC_CONF, \
  "A port number or a numeric IP address and a port number"), \
AP_INIT_TAKE1("SendBufferSize", ap_set_send_buffer_size, NULL, RSRC_CONF, \
  "Send buffer size in bytes")

Definition at line 106 of file ap_listen.h.


Typedef Documentation

typedef apr_status_t(* accept_function)(void **csd, ap_listen_rec *lr, apr_pool_t *ptrans)
 

Definition at line 29 of file ap_listen.h.

typedef struct ap_listen_rec ap_listen_rec
 

Definition at line 28 of file ap_listen.h.


Function Documentation

void ap_listen_pre_config void   ) 
 

Setup all of the defaults for the listener list

Definition at line 390 of file listen.c.

References ap_listenbacklog, DEFAULT_LISTENBACKLOG, and NULL.

Referenced by beos_pre_config(), leader_pre_config(), mpmt_os2_pre_config(), netware_pre_config(), perchild_pre_config(), prefork_pre_config(), and worker_pre_config().

const char* ap_set_listenbacklog cmd_parms cmd,
void *  dummy,
const char *  arg
 

Definition at line 430 of file listen.c.

References ap_listenbacklog, b, err, GLOBAL_ONLY, and NULL.

const char* ap_set_listener cmd_parms cmd,
void *  dummy,
const char *  ips
 

Definition at line 398 of file listen.c.

References alloc_listener(), APR_SUCCESS, err, GLOBAL_ONLY, host, NULL, cmd_parms_struct::pool, port, server_rec::process, scope_id, and cmd_parms_struct::server.

Here is the call graph for this function:

const char* ap_set_send_buffer_size cmd_parms cmd,
void *  dummy,
const char *  arg
 

Definition at line 448 of file listen.c.

References err, GLOBAL_ONLY, NULL, s, and send_buffer_size.

int ap_setup_listeners server_rec s  ) 
 

Loop through the global ap_listen_rec list and create all of the required sockets. This executes the listen and bind on the sockets.

Parameters:
s The global server_rec
Returns:
The number of open sockets.
Warning:
This function is not available to Windows platforms, or the Prefork or SPMT_OS2 MPMs.

Definition at line 374 of file listen.c.

References ap_listen_open(), lr, ap_listen_rec::next, process_rec::pool, server_rec::port, and server_rec::process.

Referenced by ap_mpm_run(), leader_open_logs(), master_main(), perchild_open_logs(), prefork_open_logs(), setup_listeners(), and worker_open_logs().

Here is the call graph for this function:


Variable Documentation

AP_DECLARE_DATA ap_listen_rec* ap_listeners
 

The global list of ap_listen_rec structures

Definition at line 32 of file listen.c.

Referenced by ap_mpm_child_main(), ap_mpm_run(), child_main(), listener_thread(), master_main(), nwssl_post_config(), nwssl_socket_cleanup(), os_fork(), setup_listeners(), show_server_data(), shutdown_listeners(), worker_main(), worker_open_logs(), and worker_thread().