summaryrefslogtreecommitdiff
path: root/lib/tcp.c
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'libradsec' into libradsec-server-supportLinus Nordberg2013-05-151-11/+23
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: lib/HACKING lib/Makefile.am lib/README lib/compat.h lib/conf.c lib/configure.ac lib/conn.c lib/conn.h lib/err.c lib/err.h lib/event.c lib/event.h lib/examples/Makefile.am lib/examples/client-blocking.c lib/examples/client.conf lib/include/radsec/radsec-impl.h lib/include/radsec/radsec.h lib/include/radsec/request-impl.h lib/include/radsec/request.h lib/packet.c lib/packet.h lib/peer.c lib/peer.h lib/request.c lib/send.c lib/tcp.c lib/tests/Makefile.am lib/tls.c lib/udp.c lib/util.c
| * Don't crash on reading invalid messages.Linus Nordberg2013-05-151-4/+8
| | | | | | | | | | Also, invoke disconnected callback and close connection in error cases.
| * Update copyright years.Linus Nordberg2013-05-091-2/+2
| |
| * Rename rs_packet_flags members.Linus Nordberg2013-01-241-3/+3
| | | | | | | | | | | | | | | | | | Uppercase to make them appear as the constants they are, as opposed to variables. Remove 'flag' suffix, typically used for variables. Spell out HEADER.
* | WIP commit moving towards working server support.Linus Nordberg2013-05-151-35/+36
| |
* | Revamping for listeners.Linus Nordberg2013-03-011-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Split rs_connection into rs_baseconn plus rs_connection and rs_listener. Connections now has a state variable. Connect buffer event and fd of _source_ connection, not that of conn->active_peer. The connection object referred to by a peer is not meant for using as a connection, only for reporting errors on. Make sure things are sane even when not using a config file. Bump library interface version to 1.0.0 since it's changed.
* | WIP commit for listener support.Linus Nordberg2013-02-191-12/+13
| |
* | Rename most 'package' to 'message'.Linus Nordberg2013-01-241-65/+65
| | | | | | | | | | | | | | | | | | | | | | | | | | RADIUS (RFC2865) is defined to be transported over UDP so the term "radius packet" makes a lot of sense. RADIUS/TCP (RFC6613) and RADIUS/TLS (RFC6614), a.k.a. RadSec, use stream transport protocols though. The term "message" doesn't imply any kind of transport -- a message can be sent using datagrams as well as in a stream. This (large) commit changes 'package' to 'message' where it makes sense. It does not touch the 'radius' subdirectory. It includes preprocessor directives (#define) to make the public interface compatible with previous releases of the library.
* | Rename rs_packet_flags members.Linus Nordberg2013-01-241-3/+3
|/ | | | | | | | | Uppercase to make them appear as the constants they are, as opposed to variables. Remove 'flag' suffix, typically used for variables. Spell out HEADER.
* Add docstrings and a comment.Linus Nordberg2013-01-221-3/+15
|
* Rename COPYING -> LICENSE.Linus Nordberg2012-12-191-1/+1
| | | | And distribute LICENSE and HACKING.
* Merge libradsec-new-client.Linus Nordberg2012-04-271-19/+15
|\
| * port to new RADIUS client libraryLuke Howard2011-11-141-19/+15
| |
* | Verify certificate CN against configured hostname.Linus Nordberg2012-04-261-1/+5
| | | | | | | | NOTE: The subjectAltName check is not well tested.
* | Use existing temporary variable conn.Linus Nordberg2012-04-261-4/+4
| |
* | Avoid unused variable warning when building without DEBUG.Linus Nordberg2012-01-041-2/+6
|/ | | | Spotted by Sam Hartman.
* Add retransmission timer support (UDP).Linus Nordberg2011-03-091-22/+9
|
* Add RSE_DISCO.Linus Nordberg2011-03-091-0/+1
|
* Timeout implemented in request objects, supported by TCP.Linus Nordberg2011-03-081-7/+2
| | | | TODO: UDP.
* Move verification of response packets up to a level where it makes sense.Linus Nordberg2011-03-071-54/+15
| | | | | | | | | | | | | | | | | | | | | 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().
* Move event_set_timeout --> tcp_set_connect_timeout.Linus Nordberg2011-03-061-0/+34
|
* Restructure code, moving most code out of packet.cLinus Nordberg2011-03-061-0/+276
Also, move copyright notice out of COPYING and into every file.