/* 
/******************************************************************************
*
*       XILINX IS PROVIDING THIS DESIGN, CODE, OR INFORMATION "AS IS"
*       AS A COURTESY TO YOU, SOLELY FOR USE IN DEVELOPING PROGRAMS AND
*       SOLUTIONS FOR XILINX DEVICES.  BY PROVIDING THIS DESIGN, CODE,
*       OR INFORMATION AS ONE POSSIBLE IMPLEMENTATION OF THIS FEATURE,
*       APPLICATION OR STANDARD, XILINX IS MAKING NO REPRESENTATION
*       THAT THIS IMPLEMENTATION IS FREE FROM ANY CLAIMS OF INFRINGEMENT,
*       AND YOU ARE RESPONSIBLE FOR OBTAINING ANY RIGHTS YOU MAY REQUIRE
*       FOR YOUR IMPLEMENTATION.  XILINX EXPRESSLY DISCLAIMS ANY
*       WARRANTY WHATSOEVER WITH RESPECT TO THE ADEQUACY OF THE
*       IMPLEMENTATION, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OR
*       REPRESENTATIONS THAT THIS IMPLEMENTATION IS FREE FROM CLAIMS OF
*       INFRINGEMENT, IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
*       FOR A PARTICULAR PURPOSE.
*
*       (c) Copyright 2002 Xilinx Inc.
*       All rights reserved.
*
******************************************************************************/
/*****************************************************************************/

/* $id: $ */

/*
 * Web server related #defines
 */
#ifndef __WEB_H
#define __WEB_H

struct web_conn_ent {
   int s;                      // socket descriptor
   int state  ;      // state of the connection
   char *file_name;            // name of file served
   int bytes_rem;              // no of bytes remaining to send 
};

#define SERVER_PORT 8080
#define MAX_WEB_CONNS 2

// Web Server States for connections
#define WEB_GET        1    // Got a Get request
#define WEB_GET_PROC   2    // processing a GET request
#define WEB_DONE       3    // done with a GET request processing
#define WEB_CONN_FREE  -1   // conn free to assign to client

struct web_conn_ent web_conns[MAX_WEB_CONNS];

extern struct web_conn_ent *web_curr_conn;

#endif // __WEB_H
