RASCSI/src/x68k/RASETHER/main.h
Daniel Markstedt af4e3dfe80
Translate source code in x68k (#289)
* Translate code comments

* Remove documentation that is contained in wiki

* Translate code comments

* Remove documentation that is contained in wiki

* Translate configuration file

* Remove documentation that is covered by wiki

* Translate code comments

* Translate strings and code comments

* Cleanup
2021-10-01 15:23:53 -05:00

82 lines
1.8 KiB
C

//---------------------------------------------------------------------------
//
// SCSI Target Emulator RaSCSI (*^..^*)
// for Raspberry Pi
//
// Powered by XM6 TypeG Technology.
// Copyright (C) 2016-2017 GIMONS
// [ RaSCSI Ethernet Main ]
//
// Based on
// Neptune-X board driver for Human-68k(ESP-X) version 0.03
// Programed 1996-7 by Shi-MAD.
// Special thanks to Niggle, FIRST, yamapu ...
//
//---------------------------------------------------------------------------
#ifndef main_h
#define main_h
#define ID_EN0 (('e'<<24)+('n'<<16)+('0'<<8))
#undef MULTICAST
// number of protocol type we can handle **EDIT this**
#define NPRT (16)
// number of multicast address we can handle **EDIT this**
#define NMULTICAST (64)
/* However, multicast is not yet supported */
struct eaddr {
unsigned char eaddr [6];
};
typedef void (*int_handler) (int, void*, int);
typedef void (*malloc_func) (unsigned int*);
struct prt {
int type;
int_handler func;
malloc_func malloc;
};
// Global variables
extern unsigned int scsiid;
extern int trap_no;
extern int num_of_prt;
extern struct prt PRT_LIST [NPRT];
#ifdef MULTICAST
extern int num_of_multicast;
extern struct eaddr multicast_array [NMULTICAST];
#endif
// Prototype declarations
extern int Initialize (void);
extern int InitList (int);
extern int AddList (int, int_handler);
extern int DeleteList (int);
extern int_handler SearchList (int);
extern int_handler SearchList2 (int, int);
extern malloc_func GetMallocFunc (int, int);
#ifdef MULTICAST
extern int AddMulticastArray (struct eaddr*);
extern void DelMulticastArray (struct eaddr*);
extern void MakeMulticastTable (unsigned char*);
#endif
// Function within ne.s
extern void trap_entry (void);
#include <sys/iocs.h>
#define Print _iocs_b_print
#define TRAP_VECNO(n) (0x20 + n)
#endif // main_h