summaryrefslogtreecommitdiff
path: root/accel-pppd/ctrl/l2tp/l2tp.h
AgeCommit message (Collapse)Author
2014-04-11l2tp: drop tunnel/session messages from send queue upon disconnectionGuillaume Nault
Add a per session send queue. Messages sent by a session are added to both tunnel and session queues. This allows sessions to remove their unsent messages from tunnel's send queue before they disconnect. The same approach is used for tunnels. Before disconnecting, they clear their send queue to avoid sending useless messages. Signed-off-by: Guillaume Nault <g.nault@alphalink.fr>
2014-04-11l2tp: separate send and retransmission queuesGuillaume Nault
Don't send messages immediately, store them in conn->send_queue instead, so we have control over how many and when messages are sent on the network. Once a message is sent, it's removed from the send queue and added to the retransmission queue. Retransmission queue is automatically updated based on acknowledgements received from peer. For now, packets in the send queue are pushed on the network after each incoming packet processing. So functions called by l2tp_conn_read() don't have to call l2tp_tunnel_push_sendqueue(). Other functions (e.g. triton callbacks) have to manually push packets out of the send queue. The same applies for disconnection. The l2tp_tunnel_disconnect_push() and l2tp_session_disconnect_push() functions have been defined for use in functions that don't call l2tp_tunnel_push_sendqueue() automatically. Signed-off-by: Guillaume Nault <g.nault@alphalink.fr>
2014-04-01l2tp: use random Tunnel IDsGuillaume Nault
Re-use the Session ID selection algorithm for generating Tunnel IDs. When a peer always uses the same source port for establishing tunnels, and if ephemeral ports aren't activated (default), then Tunnel IDs are the only way to identify tunnels. Using ramdom Tunnel IDs then minimises the risk of re-using IDs of half-closed tunnels (i.e. tunnels closed locally, but still existing on the peer side). As a minor side effect, the maximum value of a Tunnel ID is now 2^16 - 1. Signed-off-by: Guillaume Nault <g.nault@alphalink.fr>
2013-10-02l2tp: introduce data packet sequencing and reorder timeout supportVladislav Grishenko
Signed-off-by: Vladislav Grishenko <themiron@mail.ru>
2013-04-17l2tp: Handle 64 bits attributesGuillaume Nault
Define l2tp_packet_add_int64() to create attributes of 64 bits long integers. Signed-off-by: Guillaume Nault <g.nault@alphalink.fr>
2013-04-17l2tp: Full hidden AVPs supportGuillaume Nault
Add option "hide-avps" in the "l2tp" section for hiding attributes sent to peer. This same option is also made available on accel-ppp's command line interface: accel-ppp# tunnel create tunnel peer-addr 192.0.2.1 hide-avps 1 Attribute hiding is performed upon attribute creation (in the l2tp_packet_add_*() functions family) rather than upon packet sending. This avoid running the cipher for every retransmission; the counterpart is that l2tp_packet_print() can't dump original attributes of hidden AVPs. Currently, only one random vector is used for all hidden AVPs in a packet. This is easily extensible though, as the 'last_RV' field in struct l2tp_packet_t may be overridden to use new vectors for next AVPs. Signed-off-by: Guillaume Nault <g.nault@alphalink.fr>
2013-04-17l2tp: Handle incoming hidden AVPsGuillaume Nault
Decode hidden AVPs on reception. This is transparent for functions in l2tp.c (except for the presence of the Random Vector AVP). Signed-off-by: Guillaume Nault <g.nault@alphalink.fr>
2013-02-13l2tp: Add const qualifier to packet allocation functionGuillaume Nault
Define the address parameter of l2tp_packet_alloc() as constant. Signed-off-by: Guillaume Nault <g.nault@alphalink.fr>
2013-02-13l2tp: Add const qualifier for l2tp_packet_print()Guillaume Nault
Declare parameters and variables of l2tp_packet_print() as constant. Also update l2tp_dict_find_value() prototype to accept options passed by l2tp_packet_print(). Signed-off-by: Guillaume Nault <g.nault@alphalink.fr>
2012-05-22Some AVP we are not handling yet, and it is better to provide optionKozlov Dmitry
to ignore them, instead of refusing connection. Signed-off-by: Denys Fedoryshchenko <denys@visp.net.lb>
2011-01-05rename accel-pptp to accel-pppDmitry Kozlov