***************
*** 286,291 ****
  typedef struct conn_rec conn_rec;
  typedef struct server_rec server_rec;
  typedef struct request_rec request_rec;
  
  struct request_rec {
  
--- 286,292 ----
  typedef struct conn_rec conn_rec;
  typedef struct server_rec server_rec;
  typedef struct request_rec request_rec;
+ typedef struct listen_rec listen_rec;
  
  struct request_rec {
  
***************
*** 416,421 ****
    
    char *server_admin;
    char *server_hostname;
    
    /* Log files --- note that transfer log is now in the modules... */
    
--- 417,423 ----
    
    char *server_admin;
    char *server_hostname;
+   short port;                    /* for redirects, etc. */
    
    /* Log files --- note that transfer log is now in the modules... */
    
***************
*** 424,429 ****
    
    /* Module-specific configuration for server, and defaults... */
  
    void *module_config;		/* Config vector containing pointers to
  				 * modules' per-server config structures.
  				 */
--- 426,432 ----
    
    /* Module-specific configuration for server, and defaults... */
  
+   int is_virtual;               /* true if this is the virtual server */
    void *module_config;		/* Config vector containing pointers to
  				 * modules' per-server config structures.
  				 */
***************
*** 434,437 ****
  
!   short port;
!   struct in_addr host_addr;	/* Specific address, if "virtual" server */
    int timeout;			/* Timeout, in seconds, before we give up */
--- 437,440 ----
  
!   struct in_addr host_addr;	/* The bound address, for this server */
!   short host_port;              /* The bound port, for this server */
    int timeout;			/* Timeout, in seconds, before we give up */
***************
*** 444,446 ****
  /* Prototypes for utilities... util.c.
   */
  
--- 444,453 ----
+ /* These are more like real hosts than virtual hosts */
+ struct listen_rec {
+     listen_rec *next;
+     struct sockaddr_in local_addr; /* local IP address and port */
+ /* more stuff here, like which protocol is bound to the port */
+ };
+ 
  /* Prototypes for utilities... util.c.
   */
  
***************
*** 488,494 ****
       
  char *get_local_host(pool *);
  struct in_addr get_local_addr (int sd);
! unsigned long get_virthost_addr (char *hostname, int wild_allowed);
  void get_remote_host(conn_rec *conn);
  int get_portnum(int sd);
       
--- 498,504 ----
       
  char *get_local_host(pool *);
  struct in_addr get_local_addr (int sd);
! unsigned long get_virthost_addr (char *hostname, short int *port);
  void get_remote_host(conn_rec *conn);
  int get_portnum(int sd);
       
