summaryrefslogtreecommitdiffstats
path: root/gatchat/gatppp.c
diff options
context:
space:
mode:
authorZhenhua Zhang <zhenhua.zhang@intel.com>2010-06-25 11:19:05 +0800
committerDenis Kenzior <denkenz@gmail.com>2010-06-28 10:17:58 -0500
commit588db023541fda0b61c162c0a5a2e624bc404bf3 (patch)
treeea883d8e00e77c14d73f7b27c18a7bc908e6cbed /gatchat/gatppp.c
parentca41d63a305c0761c25b52fe0af45387db478680 (diff)
downloadofono-588db023541fda0b61c162c0a5a2e624bc404bf3.tar.bz2
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.
Diffstat (limited to 'gatchat/gatppp.c')
-rw-r--r--gatchat/gatppp.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/gatchat/gatppp.c b/gatchat/gatppp.c
index e92fe5d2..b65733ee 100644
--- a/gatchat/gatppp.c
+++ b/gatchat/gatppp.c
@@ -246,7 +246,7 @@ void ppp_auth_notify(GAtPPP *ppp, gboolean success)
pppcp_signal_up(ppp->ipcp);
}
-void ppp_ipcp_up_notify(GAtPPP *ppp, const char *ip,
+void ppp_ipcp_up_notify(GAtPPP *ppp, const char *local, const char *peer,
const char *dns1, const char *dns2)
{
ppp->net = ppp_net_new(ppp);
@@ -264,7 +264,8 @@ void ppp_ipcp_up_notify(GAtPPP *ppp, const char *ip,
if (ppp->connect_cb)
ppp->connect_cb(ppp_net_get_interface(ppp->net),
- ip, dns1, dns2, ppp->connect_data);
+ local, peer, dns1, dns2,
+ ppp->connect_data);
}
void ppp_ipcp_down_notify(GAtPPP *ppp)
@@ -464,6 +465,12 @@ void g_at_ppp_unref(GAtPPP *ppp)
g_free(ppp);
}
+void g_at_ppp_set_server_info(GAtPPP *ppp, guint32 local, guint32 peer,
+ guint32 dns1, guint32 dns2)
+{
+ ipcp_set_server_info(ppp->ipcp, local, peer, dns1, dns2);
+}
+
static GAtPPP *ppp_init_common(GAtHDLC *hdlc)
{
GAtPPP *ppp;