1
0
mirror of https://github.com/livingcomputermuseum/Darkstar.git synced 2026-04-10 07:25:45 +00:00

Tweaks for ncap (replacement for winpcap), small fix for ethernet controller.

This commit is contained in:
Josh Dersch
2019-02-21 18:31:14 -08:00
parent 45b84b5a61
commit 7ccd1f9e4c
3 changed files with 9 additions and 4 deletions

View File

@@ -320,6 +320,7 @@ namespace D.Ethernet
// Throw out input data and stop the receiver
_fifo.Clear();
_inputPacket.Clear();
_inAttn = false;
_rxMode_ = true;
StopReceiver();
@@ -546,7 +547,7 @@ namespace D.Ethernet
if (!_enableRcv || !_turnOff_)
{
//
// Receiver is offjust drop the packet on the floor.
// Receiver is off, just drop the packet on the floor.
//
if (Log.Enabled) Log.Write(LogComponent.EthernetControl, "Ethernet receiver is off; dropping this packet.");

View File

@@ -81,7 +81,8 @@ namespace D.Ethernet
//
// We use the friendly name to make it easier to specify in config files.
//
if (((WinPcapDevice)device).Interface.FriendlyName.ToLowerInvariant() == name.ToLowerInvariant())
if (!string.IsNullOrWhiteSpace(((WinPcapDevice)device).Interface.FriendlyName) &&
((WinPcapDevice)device).Interface.FriendlyName.ToLowerInvariant() == name.ToLowerInvariant())
{
AttachInterface(device);
break;

View File

@@ -137,8 +137,11 @@ namespace D.UI
{
foreach (WinPcapDevice device in CaptureDeviceList.Instance)
{
EthernetInterfaceListBox.Items.Add(
new EthernetInterface(device.Interface.FriendlyName, device.Interface.Description));
if (!string.IsNullOrWhiteSpace(device.Interface.FriendlyName))
{
EthernetInterfaceListBox.Items.Add(
new EthernetInterface(device.Interface.FriendlyName, device.Interface.Description));
}
}
}
else