Cosmos/source/FrodeTest/Test/RTL8139Test.cs
sschocke_cp 7af62315ec RTL8139 Driver Changes
Update Global to call driver initialization routines for different drivers. Devices are enumerated during startup regardless of what hardware you are using.
Update FrodeTest workspace to run via new NetworkDevice interface
Update Builder.cs so that QEMU gets called with only either "-net tap" or "-net user", as these two options conflict
Internalized most of the TCP/IP stack leaving only the User needed classes available to use.
Commented most of TCP/IP stack public methods, and cleaned out code a little bit.
2009-03-31 20:33:22 +00:00

32 lines
853 B
C#

using System;
using System.Collections.Generic;
using System.Text;
using Cosmos.Hardware.Network.Devices.RTL8139;
using Cosmos.Sys.Network;
namespace FrodeTest.Test
{
public class RTL8139Test
{
public static void RunTest()
{
// Testing RTL8139 PCI networkcard
//Load card
var xNics = Cosmos.Hardware.Network.NetworkDevice.NetworkDevices;
if (xNics.Count == 0)
{
Console.WriteLine("No network cards found");
return;
}
var xNic = xNics[0];
xNic.Enable();
byte[] xNetworkData = { (byte)'a' };
//var xPingOut = new ICMPPacket(1, 2, ICMPPacket.ICMPType.EchoRequest, xPingData, 0);
xNic.QueueBytes(xNetworkData);
}
}
}