1999-10-03 14:16:26 +00:00
|
|
|
/*
|
|
|
|
* ether_dummy.cpp - Ethernet device driver, dummy implementation
|
|
|
|
*
|
2001-02-02 20:53:00 +00:00
|
|
|
* Basilisk II (C) 1997-2001 Christian Bauer
|
1999-10-03 14:16:26 +00:00
|
|
|
*
|
|
|
|
* 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
|
|
|
|
* (at your option) 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include "sysdeps.h"
|
|
|
|
#include "cpu_emulation.h"
|
|
|
|
#include "main.h"
|
|
|
|
#include "macos_util.h"
|
|
|
|
#include "prefs.h"
|
|
|
|
#include "user_strings.h"
|
|
|
|
#include "ether.h"
|
|
|
|
#include "ether_defs.h"
|
|
|
|
|
|
|
|
#define DEBUG 0
|
|
|
|
#include "debug.h"
|
|
|
|
|
|
|
|
#define MONITOR 0
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Initialization
|
|
|
|
*/
|
|
|
|
|
2001-07-13 15:39:25 +00:00
|
|
|
bool ether_init(void)
|
1999-10-03 14:16:26 +00:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Deinitialization
|
|
|
|
*/
|
|
|
|
|
2001-07-13 15:39:25 +00:00
|
|
|
void ether_exit(void)
|
1999-10-03 14:16:26 +00:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Reset
|
|
|
|
*/
|
|
|
|
|
2001-07-13 15:39:25 +00:00
|
|
|
void ether_reset(void)
|
1999-10-03 14:16:26 +00:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Add multicast address
|
|
|
|
*/
|
|
|
|
|
|
|
|
int16 ether_add_multicast(uint32 pb)
|
|
|
|
{
|
|
|
|
return noErr;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Delete multicast address
|
|
|
|
*/
|
|
|
|
|
|
|
|
int16 ether_del_multicast(uint32 pb)
|
|
|
|
{
|
|
|
|
return noErr;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Attach protocol handler
|
|
|
|
*/
|
|
|
|
|
|
|
|
int16 ether_attach_ph(uint16 type, uint32 handler)
|
|
|
|
{
|
|
|
|
return noErr;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Detach protocol handler
|
|
|
|
*/
|
|
|
|
|
|
|
|
int16 ether_detach_ph(uint16 type)
|
|
|
|
{
|
|
|
|
return noErr;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Transmit raw ethernet packet
|
|
|
|
*/
|
|
|
|
|
|
|
|
int16 ether_write(uint32 wds)
|
|
|
|
{
|
|
|
|
// Set source address
|
|
|
|
uint32 hdr = ReadMacInt32(wds + 2);
|
|
|
|
memcpy(Mac2HostAddr(hdr + 6), ether_addr, 6);
|
|
|
|
return noErr;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Ethernet interrupt - activate deferred tasks to call IODone or protocol handlers
|
|
|
|
*/
|
|
|
|
|
|
|
|
void EtherInterrupt(void)
|
|
|
|
{
|
|
|
|
}
|