summaryrefslogtreecommitdiff
path: root/gatchat/ppp_ipcp.c
Commit message (Collapse)AuthorAgeFilesLines
* treewide: Introduce support for missing g_memdup2Marcel Holtmann2021-05-051-0/+1
|
* treewide: Replace g_memdup with g_memdup2Marcel Holtmann2021-04-281-1/+1
|
* gatchat: Reword the fall through cases to avoid compiler warningsMarcel Holtmann2017-07-111-2/+4
|
* gatchat: Minor style fixupDenis Kenzior2011-11-071-0/+1
|
* gatchat: Update copyright informationMarcel Holtmann2011-10-101-1/+1
|
* ppp: Remove some g_printsDenis Kenzior2011-02-281-8/+0
|
* gatchat: explicitly compare pointers to NULLLucas De Marchi2010-11-291-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>
* ppp: Add MAX_IPCP_FAILURE to avoid timeout quicklyZhenhua Zhang2010-07-091-1/+9
| | | | | | 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.
* ppp: Don't accept 0 ip-addr/dns1/dns2Denis Kenzior2010-06-291-3/+4
|
* ppp: Refactor server-side APIDenis Kenzior2010-06-291-4/+11
| | | | | | | | | | 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.
* ppp: Tweak set_server_info API some moreDenis Kenzior2010-06-291-7/+1
|
* ppp: Refactor server RCR actionDenis Kenzior2010-06-281-40/+40
| | | | | We need to generate the Conf-Rej / Conf-Nak in the same order as the client sent us.
* ppp: Refactor client RCR actionDenis Kenzior2010-06-281-29/+27
|
* ppp: Simplify the logic by re-using codeDenis Kenzior2010-06-281-6/+1
|
* ppp: Minor style tweaksDenis Kenzior2010-06-281-9/+9
|
* gatppp: Add PPP server extensionZhenhua Zhang2010-06-281-32/+207
| | | | | 1. Add interface to set PPP server info by g_at_ppp_set_server_info. 2. Pass local and peer address through IPCP handshaking.
* ppp: Fix incorrect packet length for little-endianZhenhua Zhang2010-06-231-1/+1
| | | | | packet->length is in TCP/IP network byte order. It needs to call ntohs() to convert to host byte order, which is little-endian.
* ppp: get rid of ppp_enter_phaseDenis Kenzior2010-04-301-2/+3
| | | | | | | This function simply didn't have the context of why the phase was being entered. Instead have each protocol notify GAtPPP as to what is happening. We already had this more or less for IPCP and AUTH events, this just now formalizes it for LCP as well.
* ppp: Introduce ppp_net_down_notifyDenis Kenzior2010-04-131-0/+1
|
* ppp: Introduce ppp_net_up_notify and use itDenis Kenzior2010-04-131-2/+1
| | | | This is slightly cleaner way than defining a weird callback function.
* ppp: Let the upper layer handle open / up eventsDenis Kenzior2010-04-131-9/+0
| | | | | | This removes the need for the layer_started functions in lcp and ipcp. For LCP the link is always up unless the socket has been closed, and for IPCP the link should be opened as soon as LCP is ready anyway.
* ppp: Reset the options whenever the layer is downDenis Kenzior2010-04-131-6/+19
| | | | So we can re-negotiate the options if the layer is opened again.
* ppp: Rename data to pppcpDenis Kenzior2010-04-131-6/+2
|
* ppp: Use flags not booleans for ipcp optionsDenis Kenzior2010-04-091-25/+30
|
* ppp: Rip out the now unused option string stuffDenis Kenzior2010-04-081-12/+0
| | | | Using wireshark is much easier
* ppp: port IPCP to the new option frameworkDenis Kenzior2010-04-081-62/+160
|
* ppp: Move some one-time setters to the protoDenis Kenzior2010-04-081-15/+15
|
* ppp: Add rca callbackDenis Kenzior2010-04-071-3/+21
| | | | | When the other side acks our options, then let us apply these options locally and start using them
* ppp: Cleanup ipcp.cDenis Kenzior2010-04-071-8/+6
|
* Refactor: Make struct pppcp declaration privateDenis Kenzior2010-04-051-4/+1
|
* Refactor: add pppcp_set_prefixDenis Kenzior2010-04-051-1/+1
|
* Refactor: add pppcp_get_pppDenis Kenzior2010-04-051-1/+1
|
* Refactor: add pppcp_set_option_stringsDenis Kenzior2010-04-051-1/+1
|
* Refactor: Move valid code selection to ipcp/lcpDenis Kenzior2010-04-051-0/+9
| | | | We already have a set_valid_codes function, let us use it
* Refactor: Make option_scan more type safeDenis Kenzior2010-04-051-1/+2
|
* Refactor: Make option_process more typesafeDenis Kenzior2010-04-051-3/+2
| | | | | | 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.
* Refactor: Add pppcp_set_data & pppcp_get_dataDenis Kenzior2010-04-051-7/+6
| | | | | Using these functions makes the code much cleaner than trying to pass the priv pointer everywhere
* Make pppcp_code enum a private structureMarcel Holtmann2010-04-051-9/+1
|
* Make pppcp_event_type enum a private structureMarcel Holtmann2010-04-051-1/+1
|
* Make GAtPPP fields really privateMarcel Holtmann2010-04-031-10/+4
|
* Fix coding style with callback structuresMarcel Holtmann2010-04-021-6/+6
|
* Refactor: Get rid of (now) pointless commentsDenis Kenzior2010-04-021-2/+0
|
* Refactor: Get rid of packet handler registrationsDenis Kenzior2010-04-021-8/+0
| | | | | | There are only about 4 protocols that the current ppp code handles and it is doubtful that it will grow much more. There's no point in having an extensive packet handler registration framework.
* Split out ipcp protocol into ppp_ipcp.cDenis Kenzior2010-04-021-0/+243