summaryrefslogtreecommitdiffstats
path: root/gatchat/ppp_ipcp.c
AgeCommit message (Collapse)AuthorFilesLines
2011-11-07gatchat: Minor style fixupDenis Kenzior1-0/+1
2011-10-10gatchat: Update copyright informationMarcel Holtmann1-1/+1
2011-02-28ppp: Remove some g_printsDenis Kenzior1-8/+0
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-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.
2010-06-29ppp: Don't accept 0 ip-addr/dns1/dns2Denis Kenzior1-3/+4
2010-06-29ppp: Refactor server-side APIDenis Kenzior1-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.
2010-06-29ppp: Tweak set_server_info API some moreDenis Kenzior1-7/+1
2010-06-28ppp: Refactor server RCR actionDenis Kenzior1-40/+40
We need to generate the Conf-Rej / Conf-Nak in the same order as the client sent us.
2010-06-28ppp: Refactor client RCR actionDenis Kenzior1-29/+27
2010-06-28ppp: Simplify the logic by re-using codeDenis Kenzior1-6/+1
2010-06-28ppp: Minor style tweaksDenis Kenzior1-9/+9
2010-06-28gatppp: Add PPP server extensionZhenhua Zhang1-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.
2010-06-23ppp: Fix incorrect packet length for little-endianZhenhua Zhang1-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.
2010-04-30ppp: get rid of ppp_enter_phaseDenis Kenzior1-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.
2010-04-13ppp: Introduce ppp_net_down_notifyDenis Kenzior1-0/+1
2010-04-13ppp: Introduce ppp_net_up_notify and use itDenis Kenzior1-2/+1
This is slightly cleaner way than defining a weird callback function.
2010-04-13ppp: Let the upper layer handle open / up eventsDenis Kenzior1-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.
2010-04-13ppp: Reset the options whenever the layer is downDenis Kenzior1-6/+19
So we can re-negotiate the options if the layer is opened again.
2010-04-13ppp: Rename data to pppcpDenis Kenzior1-6/+2
2010-04-09ppp: Use flags not booleans for ipcp optionsDenis Kenzior1-25/+30
2010-04-08ppp: Rip out the now unused option string stuffDenis Kenzior1-12/+0
Using wireshark is much easier
2010-04-08ppp: port IPCP to the new option frameworkDenis Kenzior1-62/+160
2010-04-08ppp: Move some one-time setters to the protoDenis Kenzior1-15/+15
2010-04-07ppp: Add rca callbackDenis Kenzior1-3/+21
When the other side acks our options, then let us apply these options locally and start using them
2010-04-07ppp: Cleanup ipcp.cDenis Kenzior1-8/+6
2010-04-05Refactor: Make struct pppcp declaration privateDenis Kenzior1-4/+1
2010-04-05Refactor: add pppcp_set_prefixDenis Kenzior1-1/+1
2010-04-05Refactor: add pppcp_get_pppDenis Kenzior1-1/+1
2010-04-05Refactor: add pppcp_set_option_stringsDenis Kenzior1-1/+1
2010-04-05Refactor: Move valid code selection to ipcp/lcpDenis Kenzior1-0/+9
We already have a set_valid_codes function, let us use it
2010-04-05Refactor: Make option_scan more type safeDenis Kenzior1-1/+2
2010-04-05Refactor: Make option_process more typesafeDenis Kenzior1-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.
2010-04-05Refactor: Add pppcp_set_data & pppcp_get_dataDenis Kenzior1-7/+6
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-9/+1
2010-04-05Make pppcp_event_type enum a private structureMarcel Holtmann1-1/+1
2010-04-03Make GAtPPP fields really privateMarcel Holtmann1-10/+4
2010-04-02Fix coding style with callback structuresMarcel Holtmann1-6/+6
2010-04-02Refactor: Get rid of (now) pointless commentsDenis Kenzior1-2/+0
2010-04-02Refactor: Get rid of packet handler registrationsDenis Kenzior1-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.
2010-04-02Split out ipcp protocol into ppp_ipcp.cDenis Kenzior1-0/+243