Alexander Couzens
4f47b2af70
l2tpd_fsm: dispatch L2CONF_E_ESTABLISH_SESSION on L2IC_S_ESTABLISHED
2016-11-05 18:46:35 +01:00
Alexander Couzens
09a9db3782
l2tpd_fsm: rename L2CONF_E_RX_ICCN -> L2CONF_E_ESTABLISH_SESSION
...
will only triggered when a session change state to established
2016-11-05 18:46:35 +01:00
Alexander Couzens
e833cb7d4b
l2tpd_packet: implement rx_ic_cn() to dispatch L2IC_E_RX_ICCN
2016-11-05 18:46:35 +01:00
Alexander Couzens
6737e11b06
l2tpd_packet: correct sequence number in ACKs
2016-11-05 18:46:35 +01:00
Alexander Couzens
d886177eca
l2tpd_fsm/l2tp_conf: sent TC_RQ on L2CONF_E_TX_TCRQ event
2016-11-05 18:46:35 +01:00
Alexander Couzens
b3399a9679
l2tpd_fsm: correct naming of all old L2CC_ enums in L2CONF fsm
2016-11-05 18:46:35 +01:00
Alexander Couzens
ca07a4bb09
l2tpd_fsm: correct valuestring of L2CONF_E_TX_TCRQ
2016-11-05 18:46:35 +01:00
Alexander Couzens
701d6ab2e9
l2tpd: correct event name of L2CONF_E_RX_ALTCRP
2016-11-05 18:46:35 +01:00
Alexander Couzens
2cc7bf4b12
l2tpd: allow transistion from INIT -> INIT, when a StopSC received in init
2016-11-05 18:46:35 +01:00
Alexander Couzens
513780aab7
l2tpd: register l2tp_conf_fsm
...
every fsm must registered
2016-11-05 18:46:35 +01:00
Alexander Couzens
49348f8664
l2tpd_fsm: migrate state & event into conf_fsm
...
the l2tp_conf_fsm handle traffic channels and wait between allocation,
because the siu can not handle to many packets at once
2016-11-05 18:46:34 +01:00
Alexander Couzens
fee0a2bf15
l2tpd_fsm: include osmocom/core/fsm.h
2016-11-05 18:46:34 +01:00
Alexander Couzens
38ec8e5e5b
l2tpd_data: add conf_fsm as into 'struct l2tpd_connection'
2016-11-05 18:46:34 +01:00
Alexander Couzens
02af3b5089
l2tpd_fsm: move TC/ALTC logic into own fsm
2016-11-05 18:46:34 +01:00
Alexander Couzens
d54ccaf083
l2tpd_packet: improve log message for unknown sessions
2016-11-05 18:46:34 +01:00
Alexander Couzens
c41d629c78
l2tpd_fsm: remove l2tp_ic_allstate() call, directly called by fsm code
2016-11-05 18:46:34 +01:00
Alexander Couzens
47877011c7
l2tpd_packet: add backref for session
...
I'vnt't found a solution using container_of() to get the connection for a session.
add a direct pointer to have a direct reference. Saves a lot lookups using the connection id every time
2016-11-05 18:46:34 +01:00
Alexander Couzens
21ee9718d2
l2tpd_data: start with 1 as session id
...
session with 0 is special and used for discovery
2016-11-05 18:46:34 +01:00
Alexander Couzens
1369188484
l2tpd_packet: use correct fsm on rx_ic_rq
2016-11-05 18:46:34 +01:00
Alexander Couzens
821613e307
l2tpd: add debug logs on recieved packets
2016-11-05 18:46:34 +01:00
Alexander Couzens
f5a6bff7d0
l2tpd_fsm: sent stop ccn for unknown sessions
2016-11-05 18:46:34 +01:00
Alexander Couzens
85ff316bb0
l2tpd_fsm: go to state INIT after L2CC_E_RX_STOP_CCN
2016-11-05 18:46:34 +01:00
Alexander Couzens
fb23f34630
l2tpd_fsm: add RX-HELLO events
2016-11-05 18:46:34 +01:00
Alexander Couzens
f3a1f37dce
l2tpd: implement ALTCRP as states
2016-11-05 18:46:34 +01:00
Alexander Couzens
37b81ebc86
l2tpd: improve logmessage recvfrom()
2016-11-05 18:46:34 +01:00
Alexander Couzens
ba9ab6cecf
l2tpd_packet: implement rx_eri_altcrp() to push fsm
2016-11-05 18:46:34 +01:00
Alexander Couzens
420ed9c3b7
l2tpd_packet: implement router_id based on a ip
2016-11-05 18:46:34 +01:00
Alexander Couzens
fae4740395
l2tpd: correct length of AVP_ERIC_ABIS_LO_MODE
2016-11-05 18:46:34 +01:00
Alexander Couzens
ce855cae4d
l2tpd: correct sequence number for acks *FIXME*
2016-11-05 18:46:34 +01:00
Alexander Couzens
2421f45ca0
l2tpd_packet: fix correct hardcoded ip address for receiving SAPIs
...
the ip must exact match the from of the actually connection otherwise the SIU will
try to reach the IP via SCCRQ to create a secondary connection
2016-11-05 18:46:34 +01:00
Alexander Couzens
00ddccf947
l2tpd: log error message of recvfrom()
2016-11-05 18:46:34 +01:00
Alexander Couzens
7493c1db5d
l2tpd_fsm: add an allstate_action for HELLO LOCAL_CLOSE_REQ RX_STOP_CCN
2016-11-05 18:46:34 +01:00
Alexander Couzens
89787e5f0b
l2tpd_fsm: implement hello receiver
2016-11-05 18:46:34 +01:00
Alexander Couzens
d6c216c29f
l2tpd_packet/rx_eri_tcrp: remove old lookup of l2tp_connection by ccid
...
already given as function argument
2016-11-05 18:46:34 +01:00
Alexander Couzens
d36bde70a5
l2tpd_packet: implement rx_eri_tcrp()
...
dispatch an event to the fsm (L2CC_E_RX_TCRP) when result == 0
2016-11-05 18:46:34 +01:00
Alexander Couzens
354bfb7090
l2tpd_fsm/session: add basic logic into states and sent out packets
2016-11-05 18:46:34 +01:00
Alexander Couzens
d5b5907aac
l2tpd_fsm: jump over L2CC_S_ESTABLISHED
...
L2CC_S_ESTABLISHED will used later a final state. But for know
ignore this state and move over to WAIT_FOR_TXRP
2016-11-05 18:46:34 +01:00
Alexander Couzens
2d7ecdd825
l2tpd_fsm: only sent SCC RP when received a SCC RQ
2016-11-05 18:46:34 +01:00
Alexander Couzens
f771d77be0
l2tpd_packet: save remote_end_id into session
...
the remote end id is used as bundling group id. To connect session
with sockets later we need to know what data is tunneled into this session
2016-11-05 18:46:34 +01:00
Alexander Couzens
fc45183267
l2tpd_packet: add l2tpd_connection to ericsson receive functions
...
As already done to ietf receive function, we need the context of a l2tpd_connection
2016-11-05 18:46:34 +01:00
Alexander Couzens
ca5befb98a
l2tpd_packet: use decimal sapis
2016-11-05 18:46:34 +01:00
Alexander Couzens
4782c63e80
l2tpd_packet: fix assigned connection id avp in header
...
previous we sent the remote ccid in our assigned ccid avp
2016-11-05 18:46:34 +01:00
Alexander Couzens
500c6cd750
l2tpd_packet: add avpp_val_u8()
...
to complete api for avpp
2016-11-05 18:46:34 +01:00
Alexander Couzens
7471a6c65d
l2tpd_packet: improve log messages for rx_ic_rq
2016-11-05 18:46:34 +01:00
Alexander Couzens
37003356bb
l2tpd_data/l2tpd_sess_alloc: setup fsm for session
2016-11-05 18:46:34 +01:00
Alexander Couzens
876a1856bc
l2tpd_packet: fix forgotten ;
2016-11-05 18:46:34 +01:00
Alexander Couzens
7648ae9a51
l2tpd_packet: implement l2tp_tx_tc_rq l2tp_tx_altc_rq_superchannel l2tp_tx_altc_rq_timeslot
2016-11-05 18:46:34 +01:00
Alexander Couzens
5d6842b9db
l2tpd_packet.h: sort tx functions
2016-11-05 18:46:34 +01:00
Alexander Couzens
46bd1a4d69
l2tpd_packet: l2tp_tx_stop_ccn_msg(msg) to sent out STOP CCN to unknown control connections
2016-11-05 18:46:34 +01:00
Alexander Couzens
a1f43051a3
l2tpd_packet: add cid to wrong seq number received
2016-11-05 18:46:34 +01:00