text: 
  /*
   * Copyright (C) 1997 Massachusetts Institute of Technology 
   *
   * This software is being provided by the copyright holders under the
   * following license. By obtaining, using and/or copying this software,
   * you agree that you have read, understood, and will comply with the
   * following terms and conditions:
   *
   * Permission to use, copy, modify, distribute, and sell this software
   * and its documentation for any purpose and without fee or royalty is
   * hereby granted, provided that the full text of this NOTICE appears on
   * ALL copies of the software and documentation or portions thereof,
   * including modifications, that you make.
   *
   * THIS SOFTWARE IS PROVIDED "AS IS," AND COPYRIGHT HOLDERS MAKE NO
   * REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED. BY WAY OF EXAMPLE,
   * BUT NOT LIMITATION, COPYRIGHT HOLDERS MAKE NO REPRESENTATIONS OR
   * WARRANTIES OF MERCHANTABILITY OR FITNESS FOR ANY PARTICULAR PURPOSE OR
   * THAT THE USE OF THE SOFTWARE OR DOCUMENTATION WILL NOT INFRINGE ANY
   * THIRD PARTY PATENTS, COPYRIGHTS, TRADEMARKS OR OTHER RIGHTS. COPYRIGHT
   * HOLDERS WILL BEAR NO LIABILITY FOR ANY USE OF THIS SOFTWARE OR
   * DOCUMENTATION.
   *
   * The name and trademarks of copyright holders may NOT be used in
   * advertising or publicity pertaining to the software without specific,
   * written prior permission. Title to copyright in this software and any
   * associated documentation will at all times remain with copyright
   * holders. See the file AUTHORS which should have accompanied this software
   * for a list of all copyright holders.
   *
   * This file may be derived from previously copyrighted software. This
   * copyright applies only to those changes made by the copyright
   * holders listed in the AUTHORS file. The rest of this file is covered by
   * the copyright notices, if any, listed below.
   */
  
  #ifndef __GLOBAL_H__
  
  #define __GLOBAL_H__
  
  #ifndef MIN
  #define MIN(a,b)		((a < b) ? a : b)
  #endif
  #ifndef MAX
  #define MAX(a,b)		((a < b) ? b : a)
  #endif
  
  #define MAX_CONNECTION		7
  #define IP_PSEUDO_HDR_SIZE 	12
  #define INITIAL_PORT		3333
  
  #define N_PER_CONNECTION        8
  #define BUFSIZE			(DEFAULT_MSS)
  #define NBUF			N_PER_CONNECTION * (MAX_CONNECTION)
  #define RCVWND_DEFAULT          ((N_PER_CONNECTION-2) * BUFSIZE)
  
  typedef struct buffer {
      char 		b_data[BUFSIZE];
      int  		b_n;
      struct buffer 	*b_next;
      char 		*b_current;
  } buffer_t, *buffer_p;
  
  void tcp_buf_init(void);
  buffer_p tcp_buf_get(void);
  void tcp_buf_free(buffer_p p);
  
  void tcp_process(struct tcb *tcb, struct ae_recv *r, int len);
  void tcp_timeout(struct tcb *tcb);
  
  #ifdef EXOPC
  #include "exos/net/pkt.h"
  #endif
  #include "timer.h"
  #include "comm.h"
  #include "tcb.h"
  #include "log.h"
  #include "exos/netinet/cksum.h"
  
  #endif
  