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:
@@ -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.");
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user