diff options
author | Denis Kenzior <denkenz@gmail.com> | 2010-04-07 16:40:49 -0500 |
---|---|---|
committer | Denis Kenzior <denkenz@gmail.com> | 2010-04-07 16:41:49 -0500 |
commit | 4e01f9921e527a4e360a43eff6f9b8bcda70a5c5 (patch) | |
tree | f4cba2b1ac09fb244bcefaddc06c223b50c96016 /gatchat/ppp_lcp.c | |
parent | 5f361d7de979aaac9212b5dd596eaf71fbf3b557 (diff) | |
download | ofono-4e01f9921e527a4e360a43eff6f9b8bcda70a5c5.tar.bz2 |
ppp: Add rca callback
When the other side acks our options, then let us apply these options
locally and start using them
Diffstat (limited to 'gatchat/ppp_lcp.c')
-rw-r--r-- | gatchat/ppp_lcp.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/gatchat/ppp_lcp.c b/gatchat/ppp_lcp.c index 05acdfa2..4aec88dc 100644 --- a/gatchat/ppp_lcp.c +++ b/gatchat/ppp_lcp.c @@ -96,6 +96,23 @@ static void lcp_finished(struct pppcp_data *pppcp) ppp_generate_event(pppcp_get_ppp(pppcp), PPP_DOWN); } +static void lcp_rca(struct pppcp_data *pppcp, const struct pppcp_packet *packet) +{ + struct ppp_option_iter iter; + + ppp_option_iter_init(&iter, packet); + + while (ppp_option_iter_next(&iter) == TRUE) { + switch (ppp_option_iter_get_type(&iter)) { + case ACCM: + ppp_set_xmit_accm(pppcp_get_ppp(pppcp), 0); + break; + default: + break; + } + } +} + /* * Scan the option to see if it is acceptable, unacceptable, or rejected * @@ -189,6 +206,7 @@ struct pppcp_action lcp_action = { .this_layer_down = lcp_down, .this_layer_started = lcp_started, .this_layer_finished = lcp_finished, + .rca = lcp_rca, .option_scan = lcp_option_scan, .option_process = lcp_option_process, }; |