/*
 * Copyright (C) 2008 The Trustees of Columbia University in the City of New York. 
 * All rights reserved.
 *
 * See the file LICENSE included in this distribution for details.
 */

#ifndef _P2PCONFIG_H
#define _P2PCONFIG_H

#ifndef _WENGO
#include "nodetypes.h"
#include "node.h"
#include "msgheader.h"
#endif

#ifdef _WENGO
#include "p2pp/node/nodetypes.h"
#include "p2pp/node/node.h"
#include "p2pp/msg/msgheader.h"
#endif

class P2PConfig {

 public:
  char8  m_ID[ID_MAX];
  uint16 m_TCP_PORT; //TCP listening port
  uint16 m_UDP_PORT; //UDP listening port
  enum p2palg m_P2P; //P2P algorithm
  enum halg m_HASH_ALG;
  int32 m_HASH_SIZE; //size in bits
  int32 m_BASE;
  int32 m_REC;       //recursive / iterative flag recursive=1, iterative=0
  int32 m_PARALLEL;
  int32 m_CMDLINE;
  
  int32 m_NODE_TYPE;

  char8 m_BOOT_IP[IPADDRLEN];
  uint16 m_BOOT_PORT;
  uchar m_USERID[ID_MAX];

  char8 m_Diagnosticsfile[ID_MAX];
 public:
  P2PConfig();
  ~P2PConfig();
  int parseFile(char* pchFileName);
};


#endif
