From 588db023541fda0b61c162c0a5a2e624bc404bf3 Mon Sep 17 00:00:00 2001 From: Zhenhua Zhang Date: Fri, 25 Jun 2010 11:19:05 +0800 Subject: 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. --- gatchat/gatppp.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'gatchat/gatppp.c') 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; -- cgit v1.2.3