Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] TAP Win32 rewrite #2869

Closed
wants to merge 6 commits into from
Closed

[WIP] TAP Win32 rewrite #2869

wants to merge 6 commits into from

Conversation

zeroZshadow
Copy link
Contributor

Now closely resembles the unix implementation
Code can be merged into a shared base later

Now closely resembles the unix implementation
Code can be merged into a shared base later
@Tilka Tilka added the WIP / do not merge Work in progress (do not merge) label Aug 17, 2015
@@ -242,19 +263,19 @@ bool CEXIETHERNET::IsActivated()

bool CEXIETHERNET::SendFrame(u8 *frame, u32 size)

This comment was marked as off-topic.

}

// Always report the packet as being sent successfully, even though it might be a lie
SendComplete();

INFO_LOG(SP1, "SendFrame complete");

This comment was marked as off-topic.

This comment was marked as off-topic.

@shuffle2
Copy link
Contributor

Uh, you replaced Windows overlapped events with a busy waiting thread? Overall this is a -1 from me...

@zeroZshadow
Copy link
Contributor Author

Yes, because this is exactly how the unix version does it. Also the read will have it block, so its not consuming all cpu.

DWORD mMtu;
OVERLAPPED mReadOverlapped;
static VOID CALLBACK ReadWaitCallback(PVOID lpParameter, BOOLEAN TimerFired);
HANDLE mHAdapter, mHReadEvent, mHWriteEvent;

This comment was marked as off-topic.

ZeroMemory(&mWriteOverlapped, sizeof(mWriteOverlapped));
mWriteOverlapped.hEvent = mHWriteEvent;

// Start early so we can get all those pestky

This comment was marked as off-topic.

@zeroZshadow
Copy link
Contributor Author

No longer going to bother with window's horrible wait of reading and writing devices. If anyone wants to give this a try, give me a poke and ill share my gained knowledge thus far.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
WIP / do not merge Work in progress (do not merge)
5 participants