Commit Graph

75 Commits (bd1ad03bc7e226c93ac1d7bb0bf1020eded7fde3)

Author SHA1 Message Date
Jeff 4b2a1ea9f3 make format and attempt to fix #158 6 years ago
Rick c6a3fc255a
ok fix ip header struct
which was broken for a while apparently
6 years ago
Rick 6040ab8c63
ok let's do this 6 years ago
despair 74dcbf8772
socket errors 6 years ago
despair 321251c944
implemented SIGINT handler for NT 6 years ago
despair e9c8cb9977
finally got around to writing a proper event loop for windows
just to be able to read user packets from TAP

split the UDP and TUN listeners into separate event queues

added some notes in tuntap-windows (mostly gutting it since we do a lot of the stuff ourselves)
6 years ago
despair b3e8099838
bug fixes 6 years ago
despair afa83f0646
aaaa 6 years ago
despair d1cbd58a3f
back to square one
need to be able to queue up a TUN read/write at each tick
then finish dealing with it in the main event loop
which is damn near impossible to do along with unix-style asio
that waits for data to appear/disappear before signalling
6 years ago
Michael 85dde7b6b0
Move remaining include/llarp headers to llarp/ 6 years ago
despair d26141d433 Merge branch 'dev' into reeeee-divergence
ok hope this works -rick

# Conflicts:
#	.gitignore
#	.vscode/settings.json
#	include/llarp/service/context.hpp
#	llarp/dns.cpp
#	llarp/dnsc.cpp
#	llarp/ev.cpp
#	llarp/ev.hpp
#	llarp/ev_win32.hpp
#	llarp/net.cpp
#	llarp/router.cpp
#	llarp/router.hpp
#	llarp/service/context.cpp
6 years ago
Jeff Becker baa94ec345
make windows build happy 6 years ago
despair 309ba48f95 !!! 6 years ago
despair 551bf0d2bf fix TUN read pkt 6 years ago
despair 65ff1ba991 reading from TUN using native async io:
writing: 
6 years ago
Jeff Becker c1e494c2c4
have llarp_ev_* use llarp_buffer_t 6 years ago
despair 964e834fea finally get the right error on windows
fix

fix up errno on win32

test
6 years ago
despair b9ab1f19a9 wooooo path builds work
update readme

fix gcc 8.x error
fix apple cross-clang someday
6 years ago
despair c7d3e39c53 todo: check if we're adding a tun to the event loop
if so, add it to the listeners, but _not_ the epollfd
abstraction - epollfd takes _only_ sockets, and will reeeee
if you give it a file handle. fuck 16-bit Windows with a rusty
knife. In this case, we assume (like unix) that a file/device file
is _always_ ready to write
6 years ago
despair ae616d0fa5 minor fixes
eh

why apple why

why apple why
6 years ago
despair be7ac352ca switch to a simulation of epoll
the native async event system on windows
is _not_ very good at getting external events
(i.e. we receive data, but we don't get any indication
that this ever happened)
6 years ago
despair c325246beb need to start winsock to use any networking
try fixing this
6 years ago
despair e18f786ab2 refactor event loop stuff
find some place in the C code to place the worker thread procedure
until such time that michael presents the new thread pool class

fix unix

get a new event port each time and delet in the event loop after use
6 years ago
despair 715e59808e bad merge! 6 years ago
despair f6fb063684 this is driving me at least mildly insane
we _never_ get to llarp::udp_listener::read
6 years ago
despair d311b2e9a9 remove dead code
(rip golden shield users D:)

remove more dead code

debug udp stuff

remove debug kqueue
6 years ago
Jeff Becker a59343cfec
we NEED NT >= 6 for event loop 6 years ago
Jeff Becker d408b08889
make windows cross compile pass, make format parts of libutp 6 years ago
despair 2a5a0f1577 fix warnings on windows
up next: fix netbsd
6 years ago
despair 04e620ebf2 add iocp tcp connect
msys2 grabs its reactos sdk headers straight out of git
most cross-compilers use the versioned releases (v6 as of last week)

huh. for once setting the windows version macros doesn't break anything.
6 years ago
despair 57ea36f947 i knew i was forgetting something earlier 6 years ago
despair 6e862f1acf apple compiler reeeeee 6 years ago
despair 561c5228d3 fixed race condition in event loop....dns seems to work now :DDD 6 years ago
despair 45f46fbece this...looks promising :DDDDD 6 years ago
despair 186e2ea989 refactored event loop base classes
use the base class impl for llarp::tcp_conn::sendto

can't seem to escape quotes ;-;

yeah this need to stay out of the unix build

turn on gnu extensions

apple stuff

remove duplicate code

clean up

fix vtable

clang-format

parameter checks
6 years ago
despair 5a32ccf220 scan-build fixes on win32 code paths 6 years ago
despair 38f2a6b2c9 be slightly less annoying
check build rules
6 years ago
despair c5d1b32286 remove microsoft c++ crud
🤔🤔🤔🤔
6 years ago
despair 5aba9776d0 fix unit test 6 years ago
despair d425b5d308 implement tcp evloop on win32
(with its now-obsolete distinction between socketfd and fd)

sockets and file descriptors used to be distinct objects....back in the
16-bit Winsock 1.1 era, which needlessly complicated the 32-bit port
back then. these days one can use [Read|Write]File(2) to operate on
sockfds...which also have some of the semantics of [read|write]v(2)
i.e. the scatter-gather thing it's known for is done in async handler

-rick

variants are nice

added note to self

clang-format

link abyss properly

oops

shut up

*shrugs*

oops forgot to start winsock

moved our async io status flags to the base class

let derived classes override them as needed

this is probably a synchronous op _anyway_

fix typo

wtf
6 years ago
despair86 d8cfac47a8
ok updated to match recent changes 6 years ago
Jeff 1cb2bb6136 Merge branch 'dev' 6 years ago
despair86 1a46631454 remove unused code 6 years ago
despair86 9d546cbac4 separate read and write event ports to avoid overwriting queue events 6 years ago
despair86 d4a7dfd08d remove extra code, pass the buffer size to read() directly, check for overflow 6 years ago
Jeff Becker 9a962540fb
update eventloop on win32 6 years ago
Jeff Becker d7c188d817
Revert "add a check for overlow in event loop"
This reverts commit 1042c73829.
6 years ago
Jeff Becker 1042c73829
add a check for overlow in event loop 6 years ago
despair86 7f226d7734 revert merge
(i can put these in the dev branch for now)
6 years ago
despair86 5576254c2e make it compile on nt 6 years ago