mirror of
https://github.com/thewesker/RASCSI.git
synced 2025-12-22 13:21:17 -05:00
Break up disk.h and disk.cpp to be smaller files (#22)
This commit is contained in:
53
src/raspberrypi/devices/ctapdriver.h
Normal file
53
src/raspberrypi/devices/ctapdriver.h
Normal file
@@ -0,0 +1,53 @@
|
||||
//---------------------------------------------------------------------------
|
||||
//
|
||||
// SCSI Target Emulator RaSCSI (*^..^*)
|
||||
// for Raspberry Pi
|
||||
//
|
||||
// Powered by XM6 TypeG Technology.
|
||||
// Copyright (C) 2016-2020 GIMONS
|
||||
//
|
||||
// Imported NetBSD support and some optimisation patch by Rin Okuyama.
|
||||
//
|
||||
// [ TAP Driver ]
|
||||
//
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
#if !defined(ctapdriver_h)
|
||||
#define ctapdriver_h
|
||||
|
||||
#ifndef ETH_FRAME_LEN
|
||||
#define ETH_FRAME_LEN 1514
|
||||
#endif
|
||||
|
||||
//===========================================================================
|
||||
//
|
||||
// Tapドライバ
|
||||
//
|
||||
//===========================================================================
|
||||
class CTapDriver
|
||||
{
|
||||
public:
|
||||
// 基本ファンクション
|
||||
CTapDriver();
|
||||
// コンストラクタ
|
||||
BOOL FASTCALL Init();
|
||||
// 初期化
|
||||
void FASTCALL Cleanup();
|
||||
// クリーンアップ
|
||||
void FASTCALL GetMacAddr(BYTE *mac);
|
||||
// MACアドレス取得
|
||||
int FASTCALL Rx(BYTE *buf);
|
||||
// 受信
|
||||
int FASTCALL Tx(BYTE *buf, int len);
|
||||
// 送信
|
||||
|
||||
private:
|
||||
BYTE m_MacAddr[6];
|
||||
// MACアドレス
|
||||
BOOL m_bTxValid;
|
||||
// 送信有効フラグ
|
||||
int m_hTAP;
|
||||
// ディスクプリタ
|
||||
};
|
||||
|
||||
#endif // ctapdriver_h
|
||||
Reference in New Issue
Block a user