summaryrefslogtreecommitdiff
path: root/gatchat/ppp_lcp.c
Commit message (Collapse)AuthorAgeFilesLines
* ppp: using RX ACCM = 0 by defaultSergei Golubtsov2021-01-071-1/+14
| | | | | | | | Some modems such as Quectel EC200T do not honor the default value for the Async-Control-Character-Map (ACCM) configuration option defined in RFC 1548 6.2 as 0xffffffff. This patch suggests to use RX ACCM = 0 for Ofono by default as pppd does for instance. This will reduce PPP data overhead as well.
* gatchat: support for auth NONEGiacinto Cifelli2018-10-031-0/+3
| | | | Added authentication method G_AT_PPP_AUTH_METHOD_NONE and its handling.
* gatchat: implement PAP authenticationPhilip Paeps2014-06-211-19/+43
| | | | | | | | | | | | | | | | | | | | Make the authentication method configurable, CHAP or PAP, defaulting to CHAP (i.e.: previous behaviour). Implementation details: o If PAP is configured, we NAK the CHAP authentication protocol option in LCP configuration requests and suggest PAP instead. This works around the amusing requirement of 3GPP TS 29.061 that modems must send a forced positive acknowledgement of the authentication method tried (i.e.: the modem will successfully accept any CHAP handshake, but if the network only supports PAP, the modem will hang up when it tries and fails to activate the PDP context) o The PAP Authenticate-Request is resent a hard-coded three times at ten-second intervals. This may be a bit too persistent. Chances are if it doesn't work the first time, it'll never work, but the RFC insists that we MUST retry.
* gatchat: Update copyright informationMarcel Holtmann2011-10-101-1/+1
|
* ppp: Don't regenerate options when unchangedDenis Kenzior2011-06-291-0/+8
|
* GAtPPP: Add PFC option supportGuillaume Zajac2011-06-291-3/+32
|
* GAtPPP: Add ACFC option supportGuillaume Zajac2011-06-291-3/+32
|
* ppp: Remove some g_printsDenis Kenzior2011-02-281-2/+0
|
* PPP: Use default ACCM (0xffffffff) to trasmitMartin Xu2011-02-161-3/+5
| | | | | | | Using my Huawei EM770W modem, if set ACCM as 0x00000000, RXJ- event breaks PPP link, after IP package transmit for a while. Using default ACCM, the issue can be fixed. I tested it at China Unicom networks.
* PPP: Fix transmit ACCM and receive ACCM mixupMartin Xu2011-02-141-2/+14
| | | | | | According to RFC1662 Section 7.1, ACCM Configuration Option is used to inform the peer which control characters MUST remain mapped when the peer sends them.
* gatchat: explicitly compare pointers to NULLLucas De Marchi2010-11-291-3/+3
| | | | | | | | | | | | | | 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/+1
| | | | | | 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: Refactor server-side APIDenis Kenzior2010-06-291-2/+2
| | | | | | | | | | 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: get rid of ppp_enter_phaseDenis Kenzior2010-04-301-3/+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: Request MRU if we ever get NAKed with itDenis Kenzior2010-04-221-3/+45
| | | | | | | | Huawei E160G hardware seems to NAK our configure request and suggest that it will never send packets bigger than 1440 bytes. Since we don't particularly care (our receive ring buffer is 4K, so it can handle 2048 byte packets), we just re-send the Configure Request with the preferred value.
* ppp: Fix trivial copy paste errorDenis Kenzior2010-04-221-1/+1
|
* ppp: implement MRU optionKristen Carlson Accardi2010-04-221-0/+4
| | | | | | | | | If the peer requests a MRU option, set the mtu for the network phase. When we are in link establishment phase, we should continue to behave as if no option has been set and the peer should use the default MRU. This option is required for the Huawei E160G modem.
* ppp: nak unknown auth protocolKristen Carlson Accardi2010-04-141-2/+28
| | | | | If we are sent a Config-Request for an auth proto other than CHAP with MD5, send a NAK.
* ppp: remove pfc and acfcKristen Carlson Accardi2010-04-131-5/+1
| | | | We will not support pfc or acfc
* ppp: remove references to magic numberKristen Carlson Accardi2010-04-131-5/+1
| | | | We will not support loopback detection.
* ppp: Transition the phase directlyDenis Kenzior2010-04-131-2/+3
| | | | | | | | | Use of the generate event function, while more 'pure' with regard to how the spec views transitions, actually makes code more difficult to read. Instead use phase transitions directly inside gatppp. This still bleeds through a little into lcp code, and probably should be fixed in a better way eventually.
* ppp: Let the upper layer handle open / up eventsDenis Kenzior2010-04-131-10/+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.
* Merge: make linkDenis Kenzior2010-04-131-2/+2
|
* ppp: Reset the options whenever the layer is downDenis Kenzior2010-04-131-5/+13
| | | | So we can re-negotiate the options if the layer is opened again.
* ppp: Use pppcp_signal functions directlyDenis Kenzior2010-04-131-27/+0
| | | | No real need to wrap them behind lcp_ functions
* ppp: Use flags instead of booleans for lcp optionsDenis Kenzior2010-04-091-3/+5
|
* ppp: Rip out the now unused option string stuffDenis Kenzior2010-04-081-18/+0
| | | | Using wireshark is much easier
* ppp: Port LCP to the new option frameworkDenis Kenzior2010-04-081-73/+99
|
* ppp: Move some one-time setters to the protoDenis Kenzior2010-04-081-6/+6
|
* ppp: Add rca callbackDenis Kenzior2010-04-071-0/+18
| | | | | When the other side acks our options, then let us apply these options locally and start using them
* ppp: Remove lcp_protocol_rejectDenis Kenzior2010-04-071-5/+0
| | | | Use pppcp_send_reject_protocol
* ppp: Hide away the magic_number in ppp_lcp.cDenis Kenzior2010-04-071-8/+19
|
* ppp: Verify magic number is not zeroDenis Kenzior2010-04-061-1/+10
|
* Refactor: Make struct pppcp declaration privateDenis Kenzior2010-04-051-4/+1
|
* Refactor: add pppcp_set/get_magic_numberDenis Kenzior2010-04-051-2/+2
|
* Refactor: add pppcp_set_prefixDenis Kenzior2010-04-051-1/+1
|
* Refactor: add pppcp_get_pppDenis Kenzior2010-04-051-4/+4
|
* Refactor: add pppcp_set_option_stringsDenis Kenzior2010-04-051-1/+1
|
* Refactor: Move valid code selection to ipcp/lcpDenis Kenzior2010-04-051-0/+14
| | | | 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-1/+0
| | | | | 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-14/+1
|
* Make pppcp_event_type enum a private structureMarcel Holtmann2010-04-051-3/+3
|
* 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.
* Add more missing break statementsMarcel Holtmann2010-04-021-3/+3
|
* ppp: fix event generation on closeKristen Carlson Accardi2010-04-021-13/+4
| | | | Prevents too early transition to PPP_DEAD
* Remove useless pppcp_protocol_data structureMarcel Holtmann2010-04-011-10/+3
|