summaryrefslogtreecommitdiffstats
path: root/gatchat/ppp_cp.c
AgeCommit message (Collapse)AuthorFilesLines
2011-05-11gatppp: fix ppp protocol-reject constructing errorCaiwen Zhang1-3/+3
In PPP Protocol-Reject package the 'rejected data field' should be a copy of the rejected package, the copy starts from the data field. besides, Protocol-Reject package include a 'rejected protocol field', it is the same as the protocol field of the rejected package. Protocol-Reject package structure is: | PPP_header | rejected protocol | rejected data The rejected package structure is: | Addr | Control | protocol | data So the Protocol-Reject package data field is copied from the 3rd byte of the rejected package.
2011-04-26gatppp: Fix crash related to not stopping timersMartin Xu1-0/+2
In case of offline modem when GPRS data connection is connected, if gprs atom is removed before PPP termination process is complete, the terminate_timer will not be stop. It will cause ofonod crash when the timer times out.
2011-02-28ppp_cp: Replace some left over g_prints with DBGDenis Kenzior1-3/+3
2010-11-29gatchat: explicitly compare pointers to NULLLucas De Marchi1-2/+2
This patch was generated by the following semantic patch (http://coccinelle.lip6.fr/) // <smpl> @fix disable is_null,isnt_null1@ expression *E; @@ - !E + E == NULL // </smpl>
2010-07-09ppp: Add MAX_IPCP_FAILURE to avoid timeout quicklyZhenhua Zhang1-2/+6
We use IPCP NAK response to stall the progress of acquiring the client IP address from DHCP server. So we need to increase the max failure of NAKs in IPCP handshaking.
2010-06-29ppp: Refactor server-side APIDenis Kenzior1-2/+7
The biggest update here is that the server needs to be in dormant mode by default, so as not to send a Configure-Req to the peer until the peer is ready. This requires adding special constructor for LCP to initialize it to Stopped state instead of initial state. Along with this, we pass the server local IP directly to the ppp server constructor.
2010-06-21ppp: Fix leak in pppcp_send_protocol_rejectZhenhua Zhang1-0/+2
Free the reject pppcp packet after ppp_transmit.
2010-05-19ppp: implement ppp_packet_newKristen Carlson Accardi1-4/+1
2010-05-10ppp: set address and control fieldKristen Carlson Accardi1-4/+2
Before sending to hdlc, set the address and control field. Fix hardcode of ppp header size.
2010-04-29ppp: transition to dead when read io destroyedKristen Carlson Accardi1-0/+2
remove call to signal_close for lcp object, it is redundent. If our io is destroyed we are dead, so transition the ppp phase to DEAD so our disconnect callback can be called.
2010-04-28ppp: Make pppcp functions const correctDenis Kenzior1-33/+27
2010-04-26ppp: use default ACCM when sending LCP codes 1-7Kristen Carlson Accardi1-0/+8
According to the spec, you must transmit all Link Configuration, Termination, and Code-Reject packets as if no options had been negotiated. This requires that when encoding we use the default ACCM of 0xffffffff when sending these types of packets.
2010-04-13ppp: remove references to magic numberKristen Carlson Accardi1-1/+7
We will not support loopback detection.
2010-04-13ppp: Refactor how tls/tlu/tld/tlf are usedDenis Kenzior1-13/+6
With the upper layer driving these, the special handling is no longer required.
2010-04-13ppp: Add pppcp_signal_downDenis Kenzior1-0/+5
For use when the link is abruptly terminated by the remote side
2010-04-12Use ppp_debug() for PPP CP event debug statementsMarcel Holtmann1-13/+20
2010-04-09ppp: Trivial style fixDenis Kenzior1-2/+2
Be more explicit
2010-04-08ppp: Stop the timer when re-startingDenis Kenzior1-10/+9
In case we receive NAK/REJ we should stop and re-start the timer, otherwise we end up generating multiple Conf-Reqs
2010-04-08ppp: Rip out the old option processingDenis Kenzior1-453/+102
Put in the new option processing
2010-04-08ppp: Make iterators work all the timeDenis Kenzior1-1/+1
2010-04-08ppp: Move some one-time setters to the protoDenis Kenzior1-59/+25
2010-04-07ppp: Add rca callbackDenis Kenzior1-30/+23
When the other side acks our options, then let us apply these options locally and start using them
2010-04-07ppp: Add pppcp option iteratorsDenis Kenzior1-0/+46
2010-04-07ppp: Move pppcp_timer_data privateDenis Kenzior1-0/+8
2010-04-07ppp: Hide away the magic_number in ppp_lcp.cDenis Kenzior1-11/+0
2010-04-06ppp: Remove OPTION_ERR, treat errors as rejectDenis Kenzior1-5/+2
2010-04-06ppp: Move up the look up table definitionDenis Kenzior1-15/+15
2010-04-05Refactor: Make struct pppcp declaration privateDenis Kenzior1-8/+35
2010-04-05Refactor: add pppcp_set/get_magic_numberDenis Kenzior1-0/+10
2010-04-05Refactor: add pppcp_set_prefixDenis Kenzior1-0/+5
2010-04-05Refactor: add pppcp_get_pppDenis Kenzior1-0/+5
2010-04-05Refactor: add pppcp_set_option_stringsDenis Kenzior1-0/+5
2010-04-05Refactor: Move valid code selection to ipcp/lcpDenis Kenzior1-58/+13
We already have a set_valid_codes function, let us use it
2010-04-05Refactor: Move packet_ops to a static look-upDenis Kenzior1-16/+16
No need to allocate space for this, as it is always the same for all instances.
2010-04-05Refactor: Make option_scan more type safeDenis Kenzior1-2/+2
2010-04-05Refactor: Make option_process more typesafeDenis Kenzior1-3/+6
option_process was declared with two gpointer arguments for the sole reason of being used as a GFunc. Casting to a GFunc or re-writing the foreach as a loop is preferable.
2010-04-05Refactor: Add pppcp_set_data & pppcp_get_dataDenis Kenzior1-3/+12
Using these functions makes the code much cleaner than trying to pass the priv pointer everywhere
2010-04-05Make pppcp_code enum a private structureMarcel Holtmann1-0/+49
2010-04-05Make pppcp_event_type enum a private structureMarcel Holtmann1-1/+39
2010-04-05Refactor: Move to a transition state tableDenis Kenzior1-541/+120
It is much more compact to re-implement the transition states as a table as opposed to functions with switch/case statements. The logic is made much easier to follow and much of the code duplication is eliminated
2010-04-05Refactor: Move the state definition to ppp_cp.cDenis Kenzior1-4/+17
2010-04-05ppp: implement Max-Failure counterKristen Carlson Accardi1-0/+22
put a cap on the number of Configure-Nak packets we send.
2010-04-03Move PPP constants where they are usedMarcel Holtmann1-0/+2
2010-04-03Make GAtPPP fields really privateMarcel Holtmann1-15/+7
2010-04-02ppp: fix missing breaks in switch statementsKristen Carlson Accardi1-5/+4
2010-04-02Add missing break or fall through comments to switch statementsMarcel Holtmann1-1/+22
2010-04-02Always reset option_rval for every optionMarcel Holtmann1-2/+8
2010-04-02ppp: use queue to transmitKristen Carlson Accardi1-0/+1
Since we are using non buffered I/O, use a queue to transmit when buffer space is available.
2010-04-01Remove PPP CP event_queue handling and process events directlyMarcel Holtmann1-54/+4
2010-04-01Implement g_at_ppp_set_debug supportMarcel Holtmann1-9/+15