summaryrefslogtreecommitdiff
path: root/lib/conn.c
Commit message (Collapse)AuthorAgeFilesLines
* Rename and move around a few helper functions.Linus Nordberg2011-03-091-40/+1
|
* Timeout implemented in request objects, supported by TCP.Linus Nordberg2011-03-081-0/+8
| | | | TODO: UDP.
* Don't return -1 to user but rather an error code.Linus Nordberg2011-03-081-1/+1
| | | | NOTE: Changes rs_conn_receive_packet() and rs_packet_send() only.
* Move verification of response packets up to a level where it makes sense.Linus Nordberg2011-03-071-22/+51
| | | | | | | | | | | | | | | | | | | | | Replace the user_dispatch_flag on connections with conn_user_dispatch_p(). Remove the 'original' member from packet and instead have an upper layer verify. Rename packet valid_flag --> received_flag to reflect that we don't verify. Move _close_conn() --> conn_close(). Move packet flags into a single unsigned int, for portability. (_read_packet): Don't verify packet. (rs_conn_receive_packet): Don't touch PKT_OUT if there isn't a packet. (rs_conn_receive_packet): Verify packet using packet_verify_response().
* Restructure code, moving most code out of packet.cLinus Nordberg2011-03-061-1/+92
| | | | Also, move copyright notice out of COPYING and into every file.
* UDP w/o bufferevents, part 1.Linus Nordberg2011-03-061-8/+6
| | | | Sending, no retransmitting and no receiving.
* Error handling cleanup 2.Linus Nordberg2011-03-011-8/+7
| | | | RSE_NOSYS doesn't need a string.
* Don't have the connection freeing peers -- it's the contexts responsibility.Linus Nordberg2011-03-011-9/+1
| | | | Also, let _rs_peer_destroy() free secret.
* Remove last trace of server and client in API.Linus Nordberg2011-02-281-3/+3
|
* Config file changes and small API changes.Linus Nordberg2011-02-241-21/+40
| | | | | | | | 'timeout' and 'tries' move from 'server' stanza to top. 'tries' is now 'retries'. Moving around in internal data structs, making struct peer strictly config. Bug fixes in configuration code. Adding some more cleanup code, freeing allocated memory (still not done!).
* Improve protocol robustness and invoke user callbacks.Linus Nordberg2011-02-191-5/+46
| | | | | | | | | | | | All aborts are removed, as well as all asserts which aren't programming errors. When an invalid packet is received, the connection is closed, as per draft-ietf-radext-tcp-transport-08 (2.6.4). Use new rs_debug() macro rather than fprintf() for debug printouts. Coding style overhaul.
* Bringing up TLS connections working.Linus Nordberg2010-11-111-1/+6
| | | | | | | NOTE: Clean up of resources not yet sane. Expect resource leakages. NOTE: Most failure cases are not handled properly. With the wind at your back and the sun shining, it might work.
* Move connection related functions to conn.c.Linus Nordberg2010-10-191-0/+141