Commit Graph

30 Commits

Author SHA1 Message Date
Sergei Golubtsov c8ed7162d5 ppp: using RX ACCM = 0 by default
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.
2021-01-07 23:17:45 -06:00
Giacinto Cifelli 6fc119d9ea gatchat: support for auth NONE
Added authentication method G_AT_PPP_AUTH_METHOD_NONE and its handling.
2018-10-03 11:44:03 -05:00
Philip Paeps a88662d23c gatchat: implement PAP authentication
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.
2014-06-21 11:50:34 -05:00
Marcel Holtmann 21f9da9916 gatchat: Update copyright information 2011-10-10 13:39:25 -07:00
Guillaume Zajac fed838f79f GAtPPP: Add PFC option support 2011-06-29 00:33:42 -05:00
Guillaume Zajac 84ccc874da GAtPPP: Add ACFC option support 2011-06-29 00:22:25 -05:00
Denis Kenzior eeb3ccc321 gatppp: Refactor PPP API
Remove the series of constructors which take a GIOChannel directly.
These weren't used.

This change also allows the construction of the PPP object and filling
in various pertinent information without starting the HDLC processing.
The client must now use g_at_ppp_open() for the client side or
g_at_ppp_listen() for the server side to start the true PPP session.
The previous owner of the GAtIO object must be suspended beforehand.
2011-05-24 12:25:07 -05:00
Guillaume Zajac ab027e9e9c gatppp: Add GAtPPP suspend API 2011-05-24 12:25:07 -05:00
Guillaume Zajac 7617c492b8 gatppp: Add GAtPPP resume functionality 2011-05-24 12:25:07 -05:00
Guillaume Zajac 7e5ccc18d7 gatppp: Add new contructor to use external fd 2011-05-24 12:10:22 -05:00
Guillaume Zajac f1cbb783fc gatppp: Add API for setting suspend callback
In situations where the PPP stream can be suspended by the peer, e.g. in
the server role using '+++'
2011-05-08 23:03:22 -05:00
Denis Kenzior 820b1f55c8 ppp: Refactor server-side API
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-29 11:53:11 -05:00
Denis Kenzior d7c0640412 ppp: Tweak set_server_info API some more 2010-06-29 11:49:40 -05:00
Denis Kenzior 90d240820b ppp: Tweak the set_server_info API 2010-06-28 17:38:54 -05:00
Zhenhua Zhang 588db02354 gatppp: Add PPP server extension
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-28 10:17:58 -05:00
Denis Kenzior 6d20194e75 ppp: Refactor connect / disconnect callbacks
Right now it is very hard to figure out whether we should be calling the
connect callback or the disconnect callback.  So refactor as follows:
	- Connect callback is only called once the net is actually up
	- Disconnect callback is called once ppp is down, with a reason
	  for why it is so.
2010-04-30 15:31:26 -05:00
Denis Kenzior c7ef06f91e ppp: Add _from_io constructor 2010-04-30 10:52:16 -05:00
Denis Kenzior c9edf56fc6 ppp: Hang set_recording off the GAtPPP object
Marcel: recording right now only works for PPP, so we'd need some sort
of multi-protocol support.

So for now expose set_recording to be used through the main PPP object.
HDLC object recording support needs to be extended.
2010-04-28 20:25:10 -05:00
Denis Kenzior ed15727b98 ppp: Add getter for HDLC object 2010-04-28 17:27:36 -05:00
Denis Kenzior 4cdf49f0de ppp: Initial port of PPP to use GAtHDLC 2010-04-28 17:27:35 -05:00
Denis Kenzior e21bb72df0 ppp: Add set / get password & username
Also refactor the set credentials function, we will be removing the auth
object shortly
2010-04-13 14:21:16 -05:00
Marcel Holtmann 455884d86e Remove one empty line and add another one 2010-04-09 17:10:48 +02:00
Marcel Holtmann 6607b5985e Move functions from ppp.c into gatppp.c 2010-04-01 20:33:03 -07:00
Marcel Holtmann 544c02da49 Add support for recording PPP sessions in pppdump format 2010-04-01 13:47:25 -07:00
Marcel Holtmann ef82241deb Implement g_at_ppp_set_debug support 2010-04-01 13:11:11 -07:00
Denis Kenzior cc1bb46ffa Refactor: Use GAtDisconnectFunc for ppp disconnect
The ppp argument to the current disconnect callback is useless as the
ppp structure is most likely stored in user data anyway.
2010-03-31 18:47:30 -05:00
Denis Kenzior d6093b819f Refactor: GAtPPP connect callback
The connect callback was not giving enough information and the
information it was providing was not in a convenient form.

- Provide the ppp interface name (e.g. tun0)
- Provide ip, dns1 & dns2 as strings
- Do not send the ppp structure in the callback, it is most likely
  present in the user data anyway
2010-03-31 18:45:17 -05:00
Denis Kenzior 0a98e1aef3 Style: Whitespace damage due to spaces, not tabs
Also use proper indentation style
2010-03-31 14:11:41 -05:00
Kristen Carlson Accardi 6cb22fe096 CHAP with MD5 authentication support
Authentication support with CHAP and MD5
2010-03-22 17:28:23 -07:00
Kristen Carlson Accardi d38443482f Basic PPP protocol support
This patch implements the basic PPP protocol.  LCP, NCP etc. are handled in
a different patch.
2010-03-22 17:28:23 -07:00