/*
* config.h - include file for storing makerom configuration information
*
* Copyright (C) 1998-2003 Gero Kuhlmann <gero@gkminix.han.de>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
* $Id: doconfig.h,v 1.5 2003/01/25 23:29:42 gkminix Exp $
*/
#ifndef _DOCONFIG_H_
#define _DOCONFIG_H_
/*
**************************************************************************
*
* Definitions for storing network driver binary file information
*
**************************************************************************
*
* These structure definitions are used to store descriptive information
* about the network driver binary files (like packet drivers etc.).
*/
/*
* Network driver options. These options define which values to ask
* the user about for a specific network driver.
*/
#define HW_IRQ 0x0001 /* query for hardware interrupt */
#define IO_ADDR 0x0002 /* query for I/O address */
#define BASE_MEM 0x0004 /* query for base memory address */
#define AUI_TYPE 0x0008 /* query for AUI type */
#define DMA_NUM 0x0010 /* query for DMA channel number */
/* Structure holding packet driver descriptions */
struct pddesc {
int options; /* packet driver options */
char *cmdline; /* packet driver command line */
long minsize; /* minimum size in bytes */
long maxsize; /* maximum size in bytes */
};
/* Structure holding NDIS driver descriptions */
struct ndisdesc {
int options; /* NDIS driver options */
char *protini; /* default protocol.ini file contents */
long minsize; /* minimum size in bytes */
long maxsize; /* maximum size in bytes */
};
/* Structure holding UNDI driver descriptions */
struct undidesc {
int dummy; /* UNDI driver has no further options */
};
/* Structure holding list of driver descriptions */
struct drvdesc {
int type; /* type of network driver */
char *descript; /* description of network driver */
char *filename; /* name and path of binary file */
char *md5sum; /* MD5 checksum of driver binary */
union {
struct pddesc pd; /* description for packet driver */
struct ndisdesc ndis; /* description for NDIS driver */
struct undidesc undi; /* description for UNDI driver */
} drv;
struct drvdesc *next;
};
/* Structure holding list of network card description strings */
struct descstr {
char *descript; /* description string */
struct descstr *next; /* pointer to next structure */
};
/* List of network driver binary file descriptions */
struct filedesc {
char *name; /* name of file description */
int bustype; /* network card bus type */
int pci_vendid; /* PCI vendor ID */
int pci_devid; /* PCI device ID */
char *pnp_devid; /* PnP product ID string */
char *usedriver; /* driver cross reference */
struct drvdesc *drvlist; /* list of driver descriptions */
struct descstr *descript; /* list of card descriptions */
struct filedesc *next; /* pointer to next structure */
};
/*
**************************************************************************
*
* Definitions for storing information about file required by makerom
*
**************************************************************************
*
* These structure definitions are used to store certain information
* about the files required by makerom to generate bootroms.
*/
/* Structure holding information about network driver interface */
struct netdrvinfo {
char *filename32; /* name of 32-bit interface file */
char *filename16; /* name of 16-bit interface file */
char *descript; /* interface description */
char *searchdir; /* dirs to search through for binaries */
char *patlist; /* list of search patterns */
};
/* Number of info records required to hold all network driver interfaces */
#define NETDRV_NUM (DRVTYPE_MIN + DRVTYPE_MAX)
/* Structure holding information about other relevant files */
struct fileinfo {
char *filename32; /* name of 32-bit file */
char *filename16; /* name of 16-bit file */
};
/* Defines used to acces the file information */
#define FILE_KERNEL 0 /* standard bootrom kernel file */
#define FILE_KERNELM 1 /* bootrom kernel with menu support */
#define FILE_ROM 2 /* rom loader file */
#define FILE_FLOPPY 3 /* floppy loader file */
#define FILE_NUMBER 4 /* number of file definitions */
/*
**************************************************************************
*
* Configuration information
*
**************************************************************************
*
* Structure holding all the information read from a makerom configuration
* file.
*/
extern struct confstruct {
char *bindir; /* directory with binaries */
char *netdrvdir; /* directory with drivers */
char *utilsdir; /* utilities directory */
char *drvfname; /* network driver defs */
char *md5fname; /* network driver MD5 sums */
struct fileinfo files[FILE_NUMBER]; /* file information array */
struct netdrvinfo netdrv[NETDRV_NUM]; /* netdrv interface array */
struct filedesc *drvdesc; /* driver description list */
} config;
#endif
syntax highlighted by Code2HTML, v. 0.9.1