Commit graph

1317 commits

Author SHA1 Message Date
Guus Sliepen
fbf305c09d Use libevent for meta socket input/output buffering. 2007-05-19 22:23:02 +00:00
Guus Sliepen
59108e4e4f Use bufferevents to handle control socket buffering. 2007-05-19 16:21:52 +00:00
Guus Sliepen
8c6131deda Implement "stop" command, and allow tincctl to retrieve a running tincd's PID. 2007-05-19 15:21:26 +00:00
Guus Sliepen
e9043e17c7 Move key generation to tincctl. 2007-05-19 14:55:35 +00:00
Guus Sliepen
bf8e3ce13d Remove pidfile in favour of control socket. 2007-05-19 14:13:21 +00:00
Guus Sliepen
bc0a24ec81 Fix retrying outgoing connections. 2007-05-19 13:34:32 +00:00
Guus Sliepen
ce976717ea We can safely delete a connection_t in terminate_connection() now. 2007-05-19 12:07:30 +00:00
Guus Sliepen
01f47c46af Start of control socket implementation. 2007-05-18 16:52:34 +00:00
Guus Sliepen
6ded8a3f08 Update documentation. 2007-05-18 11:54:16 +00:00
Guus Sliepen
8658659433 Show branch version number. 2007-05-18 11:35:21 +00:00
Guus Sliepen
e37ef57a95 More consistent variable naming. 2007-05-18 11:19:31 +00:00
Guus Sliepen
29fbce4497 Detect duplicate outgoing connections. 2007-05-18 10:29:10 +00:00
Guus Sliepen
fb0cfccf7d Use splay trees instead of AVL trees. 2007-05-18 10:05:26 +00:00
Guus Sliepen
f02d3ed3e1 K&R style braces 2007-05-18 10:00:00 +00:00
Guus Sliepen
760dd966ef Remove last references to the global variable "running". 2007-05-18 09:51:54 +00:00
Guus Sliepen
3909b8e51b Remove the last bits of the legacy main_loop(). 2007-05-18 09:43:52 +00:00
Guus Sliepen
ddc6a81a85 Remove global variable "now". 2007-05-18 09:34:06 +00:00
Guus Sliepen
7e1117197c Move key regeneration handling to net_setup.c. 2007-05-17 23:57:48 +00:00
Guus Sliepen
563577a147 Use libevent to handle key expiration. 2007-05-17 23:33:07 +00:00
Guus Sliepen
8852d4407d Use libevent to age learned MAC addresses. 2007-05-17 23:24:40 +00:00
Guus Sliepen
a530f94e7c Use libevent to age past requests. 2007-05-17 23:14:42 +00:00
Guus Sliepen
aaf1851315 Redo SIGALRM handling. 2007-05-17 23:04:02 +00:00
Guus Sliepen
6d19ebd612 Use libevent to handle all non-fatal signals. 2007-05-17 22:41:34 +00:00
Guus Sliepen
531d5a904a Properly use the timeout_initialized() macro. 2007-05-17 22:17:24 +00:00
Guus Sliepen
bf6490825e Remove legacy event system. 2007-05-17 22:13:12 +00:00
Guus Sliepen
a67ab277c9 Use libevent for retrying outgoing connections. 2007-05-17 22:09:55 +00:00
Guus Sliepen
3321591d93 Use libevent to send MTU probes. 2007-05-17 22:01:07 +00:00
Guus Sliepen
ee7844905f Configure events after obtaining a socket. 2007-05-17 21:47:27 +00:00
Guus Sliepen
294ce72441 Use libevent to handle HUP signal. 2007-05-17 21:34:58 +00:00
Guus Sliepen
4d0621b1f3 Use libevent to dump graphs when necessary.
event_add() can be called repeatedly, the second and later calls are ignored if
the event hasn't been removed yet.
2007-05-17 21:14:30 +00:00
Guus Sliepen
0f6f54ff8a Use a separate event structure to handle meta data writes.
Make meta socket events persistent.
2007-05-17 20:20:10 +00:00
Guus Sliepen
17c8033029 128 listener sockets is way too much. 2007-05-17 19:52:12 +00:00
Guus Sliepen
d8dea8091f Properly delete listener socket events on shutdown. 2007-05-17 19:51:26 +00:00
Guus Sliepen
6ea1dfc995 Port fixes from release 1.0.8. 2007-05-17 19:15:48 +00:00
Guus Sliepen
3730156165 Only free members of connection_t that have been allocated. 2007-03-12 17:55:43 +00:00
Scott Lamb
39f6d59b4b Lots of svn:ignore entries 2007-02-27 08:13:41 +00:00
Scott Lamb
38c25d62c2 Convert to libevent.
This is a quick initial conversion that doesn't yet show much advantage:
- We roll our own timeouts.
- We roll our own signal handling.
- We build up the meta connection fd events on each loop rather than
  on state changes.
2007-02-27 01:57:01 +00:00
Scott Lamb
834290b00f A couple missed tevent things.
(Sorry; had a couple changes queued.)
2007-02-27 01:30:57 +00:00
Scott Lamb
6362b12df7 Rename "event_t" to "tevent_t", along with associated functions.
This relieves some confusion and problems during the libevent transition.
In particular, "event_add" was defined by both.
(The 't' stands for 'timeout', 'tinc', 'temporary', or some such.)
2007-02-27 01:26:11 +00:00
Guus Sliepen
54431094d9 Created the 1.1 branch where large code changes can take place,
at the same time keeping compatibility with 1.0.
2007-02-24 22:50:42 +00:00
Guus Sliepen
ab6f76f6a9 Close the proper filedescriptor (if it exists). 2007-02-14 09:32:16 +00:00
Guus Sliepen
45fca3c723 Apply patch from Scott Lamb fixing some memory and resource leaks. 2007-02-14 09:21:34 +00:00
Guus Sliepen
6c6535a416 Apply patch from Scott Lamb preventing an infinite loop when sending SIGALRM. 2007-02-14 09:20:20 +00:00
Guus Sliepen
16c8b0e5bb Releasing 1.0.7. 2007-01-05 15:03:07 +00:00
Guus Sliepen
a1e72f84d0 Update copyright notices. 2007-01-05 13:18:36 +00:00
Guus Sliepen
a22ef25f9b No things to do for the 1.0 branch except bugfixing. 2007-01-05 13:17:33 +00:00
Guus Sliepen
d80cc7a5cc rename() cannot replace existing files on Windows. 2007-01-05 05:44:01 +00:00
Guus Sliepen
5214ece030 Fix generic BSD tun device to write only the actual packet length.
Due to a copy&paste bug, it tried to write a packet with the maximum size.
This was not a problem until the maximum size was increased to support VLANs.
2007-01-05 04:49:02 +00:00
Guus Sliepen
40f02ff8ee Tapreader socket should be bound to localhost only. 2007-01-04 15:28:36 +00:00
Guus Sliepen
03f3fc01e8 Use a ringbuffer in shared memory to transfer packets from the tapreader thread to the main thread.
It's a wonder it ever worked before. The socket that is created is not of a
datagram type, therefore packet boundaries were not preserved, which becomes
a problem as soon as the TAP-Win32 device receives packets in fast succession.
2007-01-03 18:18:54 +00:00