/* This file is part of Lcrzo.
*/

int lcrzo_compilparam_fprint(LCRZOFILE *pf)
{ lcrzo_int16 language;

  /*parameters verification*/
  if (pf==NULL) return(LCRZO_ERR_PANULLPTR);

  /*affichage des entetes*/
  lcrzo_er(lcrzo_global_get_language(&language));
  if (language==LCRZO_GLOBAL_LANG_FR)
  { fprintf(pf, "Ce programme a ete linke avec la bibliotheque reseau ");
    fprintf(pf, "lcrzo version %s.\n", LCRZODEF_VERSION);
    fprintf(pf, "Lcrzo est un logiciel libre, couvert par GNU ");
    fprintf(pf, "Lesser General Public License.\n");
    fprintf(pf, "Lcrzo peut etre obtenu a :\n");
    fprintf(pf, "  http://www.laurentconstantin.com/     ");
    fprintf(pf, "(serveur principal)\n");
    fprintf(pf, "  http://go.to/laurentconstantin/       ");
    fprintf(pf, "(serveur de secours)\n");
    fprintf(pf, "  http://laurentconstantin.est-la.com/  ");
    fprintf(pf, "(serveur de secours)\n");
    fprintf(pf, "Lcrzo a ete compilee avec les parametres suivants :\n");
  }
  else
  { fprintf(pf, "This program was linked with the network library ");
    fprintf(pf, "lcrzo version %s.\n", LCRZODEF_VERSION);
    fprintf(pf, "Lcrzo is free software, covered by the GNU Lesser General Public License.\n");
    fprintf(pf, "Lcrzo can be obtained at :\n");
    fprintf(pf, "  http://www.laurentconstantin.com/     (main server)\n");
    fprintf(pf, "  http://go.to/laurentconstantin/       (backup server)\n");
    fprintf(pf, "  http://laurentconstantin.est-la.com/  (backup server)\n");
    fprintf(pf, "Lcrzo was compiled with the following parameters :\n");
  }
  
  fprintf(pf, "  LCRZODEF_VERSION = %s\n", LCRZODEF_VERSION);
  fprintf(pf, "  LCRZODEF_VERSIONMAJOR = %d\n", LCRZODEF_VERSIONMAJOR);
  fprintf(pf, "  LCRZODEF_VERSIONMINOR = %02d\n", LCRZODEF_VERSIONMINOR);
  fprintf(pf, "  LCRZODEF_LANG = %d\n", LCRZODEF_LANG);
  fprintf(pf, "  LCRZODEF_SYS = %s\n", LCRZODEF_SYS);
  fprintf(pf, "  LCRZODEF_SYSTEM = %s\n", LCRZODEF_SYSTEM);
  fprintf(pf, "  LCRZODEF_SYSVER = %s\n", LCRZODEF_SYSVER);
  fprintf(pf, "  LCRZODEF_SYSTEMVERS = %s\n", LCRZODEF_SYSTEMVERS);
  fprintf(pf, "  LCRZODEF_SYSTEMARCH = %s\n", LCRZODEF_SYSTEMARCH);
  fprintf(pf, "  LCRZODEF_ENDIANLITTLE = %d\n", LCRZODEF_ENDIANLITTLE);
  fprintf(pf, "  LCRZODEF_ENDIANBIG = %d\n", LCRZODEF_ENDIANBIG);
  fprintf(pf, "  LCRZODEF_LIBPCAPINSTALLED = %d\n", LCRZODEF_LIBPCAPINSTALLED);
  fprintf(pf, "  LCRZODEF_LIBPCAPFROMREDHAT = %d\n",
	  LCRZODEF_LIBPCAPFROMREDHAT);
  fprintf(pf, "  LCRZODEF_LIBNETINSTALLED = %d\n", LCRZODEF_LIBNETINSTALLED);
  fprintf(pf, "  LCRZODEF_PROGCC = %s\n", LCRZODEF_PROGCC);
  fprintf(pf, "  LCRZODEF_PROGAR = %s\n", LCRZODEF_PROGAR);
  fprintf(pf, "  LCRZODEF_PROGRANLIB = %s\n", LCRZODEF_PROGRANLIB);
  fprintf(pf, "  LCRZODEF_INSTINCLUDE = %s\n", LCRZODEF_INSTINCLUDE);
  fprintf(pf, "  LCRZODEF_INSTLIB = %s\n", LCRZODEF_INSTLIB);
  fprintf(pf, "  LCRZODEF_INSTBIN = %s\n", LCRZODEF_INSTBIN);
  fprintf(pf, "  LCRZODEF_INSTMAN1 = %s\n", LCRZODEF_INSTMAN1);
  fprintf(pf, "  LCRZODEF_INSTMAN3 = %s\n", LCRZODEF_INSTMAN3);
  fprintf(pf, "  LCRZODEF_INSTUSERGROUP = %s\n", LCRZODEF_INSTUSERGROUP);
  fprintf(pf, "  LCRZODEF_HAVEFONC_ETHER_NTOHOST = %d\n",
	  LCRZODEF_HAVEFONC_ETHER_NTOHOST);
  fprintf(pf, "  LCRZODEF_HAVEFONC_ETHER_HOSTTON = %d\n",
	  LCRZODEF_HAVEFONC_ETHER_HOSTTON);
  fprintf(pf, "  LCRZODEF_HAVEFONC_HSTRERROR = %d\n",
	  LCRZODEF_HAVEFONC_HSTRERROR);
  fprintf(pf, "  LCRZODEF_HAVEFONC_SNPRINTF = %d\n",
	  LCRZODEF_HAVEFONC_SNPRINTF);
  fprintf(pf, "  LCRZODEF_HAVEFONC_IOCTL_BIOCSHDRCMPLT = %d\n",
	  LCRZODEF_HAVEFONC_IOCTL_BIOCSHDRCMPLT);
  fprintf(pf, "  LCRZODEF_HAVEFONC_PCAP_FREECODE = %d\n",
	  LCRZODEF_HAVEFONC_PCAP_FREECODE);
  fprintf(pf, "  LCRZODEF_HAVEFONC_PCAP_OPENDEAD = %d\n",
	  LCRZODEF_HAVEFONC_PCAP_OPENDEAD);
  fprintf(pf, "  LCRZODEF_HAVEFONC_POLL = %d\n", 
	  LCRZODEF_HAVEFONC_POLL);
  fprintf(pf, "  LCRZODEF_HAVEINCL_NETPACKET_PACKET = %d\n",
	  LCRZODEF_HAVEINCL_NETPACKET_PACKET);
  fprintf(pf, "  LCRZODEF_HAVEINCL_SYS_BUFMOD = %d\n",
	  LCRZODEF_HAVEINCL_SYS_BUFMOD);

#if defined LCRZODEF_SYSTEM_Unix
#elif defined LCRZODEF_SYSTEM_Windows
  { int ret;
    lcrzo_uint32 systemversion, spmajor, spminor, build;
    ret=lcrzo_windows_getsystemversion(&systemversion, &spmajor, &spminor, &build);
	if (ret==LCRZO_ERR_OK)
	{ if (language==LCRZO_GLOBAL_LANG_FR)
	    fprintf(pf, "\nCe programme s'execute sur une machine de type :\n");
      else
	    fprintf(pf, "\nThis program is currently run on :\n");
 	  switch(systemversion)
	  { case LCRZO_WINDOWS_SYSTEMVERSION_31 :
	      fprintf(pf, "  Windows 3.1\n");
		  break;
  	    case LCRZO_WINDOWS_SYSTEMVERSION_95 :
	      fprintf(pf, "  Windows 95\n");
		  break;
	    case LCRZO_WINDOWS_SYSTEMVERSION_98 :
	      fprintf(pf, "  Windows 98\n");
		  break;
	    case LCRZO_WINDOWS_SYSTEMVERSION_me :
	      fprintf(pf, "  Windows Me\n");
		  break;
	    case LCRZO_WINDOWS_SYSTEMVERSION_nt350 :
	      fprintf(pf, "  Windows NT 3.5\n");
		  break;
	    case LCRZO_WINDOWS_SYSTEMVERSION_nt351 :
	      fprintf(pf, "  Windows NT 3.51\n");
		  break;
	    case LCRZO_WINDOWS_SYSTEMVERSION_nt4 :
	      fprintf(pf, "  Windows NT 4\n");
		  break;
	    case LCRZO_WINDOWS_SYSTEMVERSION_2k :
	      fprintf(pf, "  Windows 2000\n");
		  break;
	    case LCRZO_WINDOWS_SYSTEMVERSION_xp :
	      fprintf(pf, "  Windows XP\n");
		  break;
	    case LCRZO_WINDOWS_SYSTEMVERSION_net :
	      fprintf(pf, "  Windows .NET\n");
		  break;
		default :
	      fprintf(pf, "  Windows\n");
		  break;
	  }
      fprintf(pf, "  Service Pack %d.%d\n", spmajor, spminor);
      fprintf(pf, "  Build %d\n", build);
	}
  }
#else
 #error "Unknown value for LCRZODEF_SYSTEM"
#endif

  return(LCRZO_ERR_OK);
}

