Bindings API Structures
The Bindings API uses and manipulates two similar structures, called
pr_ipbind_t and pr_namebind_t, respectively.
The code definining the structures of these objects is in include/bindings.h, but is included here for your reading pleasure:
/* Structure associating an IP address to a server_rec */
typedef struct ipbind_rec {
struct ipbind_rec *ib_next;
/* IP address to which this binding is "bound" */
p_in_addr_t ib_addr;
unsigned int ib_port;
/* Default server to handle requests to this binding. If namebinds are
* present, they will be checked before using this server
*/
server_rec *ib_server;
/* List of name-based servers bound to the above IP address. Note that
* if this functionality becomes widely adopted and used, a more efficient
* search-and-lookup mechanism will be needed, for performance reasons.
*/
array_header *ib_namebinds;
/* Listen connection, if separate from the main socket */
conn_t *ib_listen;
/* If this binding is the DefaultServer binding */
unsigned char ib_isdefault;
/* If this binding handles localhost requests */
unsigned char ib_islocalhost;
/* If this binding is active */
unsigned char ib_isactive;
} pr_ipbind_t;
/* Structure associating a name to a server_rec */
typedef struct namebind_rec {
server_rec *nb_server;
const char *nb_name;
unsigned char nb_isactive;
} pr_namebind_t;