Merge network device headers to network.h

This commit is contained in:
cartifanwlr
2024-02-18 20:02:01 +03:00
parent 0b5bf60aaf
commit fc63c26e04
17 changed files with 58 additions and 161 deletions

View File

@@ -1,45 +0,0 @@
/*
* 86Box A hypervisor and IBM PC system emulator that specializes in
* running old operating systems and software designed for IBM
* PC systems and compatibles from 1981 through fairly recent
* system designs based on the PCI bus.
*
* This file is part of the 86Box Project.
*
* Implementation of the following network controller:
* - 3Com Etherlink 3c500/3c501 (ISA 8-bit).
*
*
*
* Based on @(#)Dev3C501.cpp Oracle (VirtualBox)
*
* Authors: TheCollector1995, <mariogplayer@gmail.com>
* Oracle
*
* Copyright 2022 TheCollector1995.
* Portions Copyright (C) 2022 Oracle and/or its affilitates.
*
* 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.
*/
#ifndef NET_3C501_H
#define NET_3C501_H
extern const device_t threec501_device;
#endif /*NET_3C501_H*/

View File

@@ -1,49 +0,0 @@
/*
* 86Box A hypervisor and IBM PC system emulator that specializes in
* running old operating systems and software designed for IBM
* PC systems and compatibles from 1981 through fairly recent
* system designs based on the PCI bus.
*
* This file is part of the 86Box distribution.
*
* Implementation of the following network controllers:
* - 3Com Etherlink II 3c503 (ISA 8-bit).
*
*
*
* Based on @(#)3c503.cpp Carl (MAME)
*
* Authors: TheCollector1995, <mariogplayer@gmail.com>
* Miran Grca, <mgrca8@gmail.com>
* Fred N. van Kempen, <decwiz@yahoo.com>
* Carl, <unknown e-mail address>
*
* Copyright 2018 TheCollector1995.
* Copyright 2018 Miran Grca.
* Copyright 2017-2018 Fred N. van Kempen.
* Portions Copyright (C) 2018 MAME Project
*
* 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.
*/
#ifndef NET_3C503_H
#define NET_3C503_H
extern const device_t threec503_device;
#endif /*NET_3C503_H*/

View File

@@ -48,13 +48,4 @@ enum {
NE2K_RTL8029AS = 8 /* 32-bit PCI Realtek 8029AS */
};
extern const device_t ne1000_device;
extern const device_t ne1000_compat_device;
extern const device_t ne2000_device;
extern const device_t ne2000_compat_device;
extern const device_t ethernext_mc_device;
extern const device_t rtl8019as_device;
extern const device_t de220p_device;
extern const device_t rtl8029as_device;
#endif /*NET_NE2000_H*/

View File

@@ -30,12 +30,4 @@ enum {
DEV_AM79C973 = 6 /* PCnet-FAST III (PCI, 10/100 Mbps) */
};
extern const device_t pcnet_am79c960_device;
extern const device_t pcnet_am79c960_eb_device;
extern const device_t pcnet_am79c960_vlb_device;
extern const device_t pcnet_am79c961_device;
extern const device_t pcnet_am79c970a_device;
extern const device_t pcnet_am79c973_device;
extern const device_t pcnet_am79c973_onboard_device;
#endif /*NET_PCNET_H*/

View File

@@ -1,26 +0,0 @@
/*
* 86Box A hypervisor and IBM PC system emulator that specializes in
* running old operating systems and software designed for IBM
* PC systems and compatibles from 1981 through fairly recent
* system designs based on the PCI bus.
*
* This file is part of the 86Box distribution.
*
* Definitions for the PLIP parallel port network device.
*
*
*
* Authors: RichardG, <richardg867@gmail.com>
*
* Copyright 2020 RichardG.
*/
#ifndef NET_PLIP_H
#define NET_PLIP_H
#include <86box/device.h>
#include <86box/lpt.h>
extern const lpt_device_t lpt_plip_device;
extern const device_t plip_device;
#endif /*NET_PLIP_H*/

View File

@@ -1 +0,0 @@
extern const device_t rtl8139c_plus_device;

View File

@@ -1,4 +0,0 @@
extern const device_t dec_tulip_device;
extern const device_t dec_tulip_21140_device;
extern const device_t dec_tulip_21140_vpc_device;
extern const device_t dec_tulip_21040_device;

View File

@@ -54,11 +54,4 @@ enum {
WD8013EPA = 6
};
extern const device_t wd8003e_device;
extern const device_t wd8003eb_device;
extern const device_t wd8013ebt_device;
extern const device_t wd8003eta_device;
extern const device_t wd8003ea_device;
extern const device_t wd8013epa_device;
#endif /*NET_WD8003_H*/

View File

@@ -192,12 +192,63 @@ extern int network_card_available(int);
extern int network_card_has_config(int);
extern const char *network_card_get_internal_name(int);
extern int network_card_get_from_internal_name(char *);
#ifdef EMU_DEVICE_H
extern const device_t *network_card_getdevice(int);
#endif
extern int network_tx_pop(netcard_t *card, netpkt_t *out_pkt);
extern int network_tx_popv(netcard_t *card, netpkt_t *pkt_vec, int vec_size);
extern int network_rx_put(netcard_t *card, uint8_t *bufp, int len);
extern int network_rx_put_pkt(netcard_t *card, netpkt_t *pkt);
#ifdef EMU_DEVICE_H
/* 3Com Etherlink */
extern const device_t threec501_device;
extern const device_t threec503_device;
/* Novell NE2000 and compatibles */
extern const device_t ne1000_device;
extern const device_t ne1000_compat_device;
extern const device_t ne2000_device;
extern const device_t ne2000_compat_device;
extern const device_t ethernext_mc_device;
extern const device_t rtl8019as_device;
extern const device_t de220p_device;
extern const device_t rtl8029as_device;
/* AMD PCnet*/
extern const device_t pcnet_am79c960_device;
extern const device_t pcnet_am79c960_eb_device;
extern const device_t pcnet_am79c960_vlb_device;
extern const device_t pcnet_am79c961_device;
extern const device_t pcnet_am79c970a_device;
extern const device_t pcnet_am79c973_device;
extern const device_t pcnet_am79c973_onboard_device;
/* PLIP */
#ifdef EMU_LPT_H
extern const lpt_device_t lpt_plip_device;
#endif
extern const device_t plip_device;
/* Realtek RTL8139C+ */
extern const device_t rtl8139c_plus_device;
/* DEC Tulip */
extern const device_t dec_tulip_device;
extern const device_t dec_tulip_21140_device;
extern const device_t dec_tulip_21140_vpc_device;
extern const device_t dec_tulip_21040_device;
/* WD 80x3 */
extern const device_t wd8003e_device;
extern const device_t wd8003eb_device;
extern const device_t wd8013ebt_device;
extern const device_t wd8003eta_device;
extern const device_t wd8003ea_device;
extern const device_t wd8013epa_device;
#endif
#ifdef __cplusplus
}
#endif

View File

@@ -11,7 +11,10 @@
#include <86box/pic.h>
#include <86box/sound.h>
#include <86box/prt_devs.h>
#include <86box/net_plip.h>
#include <86box/thread.h>
#include <86box/timer.h>
#include <86box/device.h>
#include <86box/network.h>
lpt_port_t lpt_ports[PARALLEL_MAX];

View File

@@ -33,7 +33,9 @@
#include <86box/sound.h>
#include <86box/video.h>
#include <86box/plat_unused.h>
#include <86box/net_pcnet.h>
#include <86box/thread.h>
#include <86box/timer.h>
#include <86box/network.h>
// Temporarily here till we move everything out into the right files
extern const device_t pcjr_device;

View File

@@ -56,7 +56,6 @@
#include <86box/thread.h>
#include <86box/timer.h>
#include <86box/network.h>
#include <86box/net_3c501.h>
#include <86box/bswap.h>
#include <86box/plat_unused.h>

View File

@@ -60,7 +60,6 @@
#include <86box/timer.h>
#include <86box/network.h>
#include <86box/net_dp8390.h>
#include <86box/net_3c503.h>
#include <86box/bswap.h>
#include <86box/plat_unused.h>

View File

@@ -34,7 +34,6 @@
#include <86box/thread.h>
#include <86box/timer.h>
#include <86box/network.h>
#include <86box/net_plip.h>
#include <86box/plat_unused.h>
enum {

View File

@@ -43,7 +43,6 @@
#include <86box/bswap.h>
#include <86box/nvr.h>
#include "cpu.h"
#include <86box/net_rtl8139.h>
#include <86box/plat_unused.h>
#define PCI_PERIOD 30 /* 30 ns period = 33.333333 Mhz frequency */

View File

@@ -32,7 +32,6 @@
#include <86box/thread.h>
#include <86box/network.h>
#include <86box/net_eeprom_nmc93cxx.h>
#include <86box/net_tulip.h>
#include <86box/bswap.h>
#include <86box/plat_fallthrough.h>
#include <86box/plat_unused.h>

View File

@@ -67,14 +67,9 @@
#include <86box/ui.h>
#include <86box/timer.h>
#include <86box/network.h>
#include <86box/net_3c501.h>
#include <86box/net_3c503.h>
#include <86box/net_ne2000.h>
#include <86box/net_pcnet.h>
#include <86box/net_plip.h>
#include <86box/net_wd8003.h>
#include <86box/net_tulip.h>
#include <86box/net_rtl8139.h>
#ifdef _WIN32
# define WIN32_LEAN_AND_MEAN