summaryrefslogtreecommitdiffstats
path: root/gatchat/ppp.h
diff options
context:
space:
mode:
authorDenis Kenzior <denkenz@gmail.com>2010-06-29 11:53:11 -0500
committerDenis Kenzior <denkenz@gmail.com>2010-06-29 11:53:11 -0500
commit820b1f55c8f9e615ef860327ef58a54006ec8822 (patch)
treef760579f42c3d87d9dc415848414cfa4b8a6e4a2 /gatchat/ppp.h
parent969862337a77d10081cc72ca9ec0aaafaa3e977e (diff)
downloadofono-820b1f55c8f9e615ef860327ef58a54006ec8822.tar.bz2
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.
Diffstat (limited to 'gatchat/ppp.h')
-rw-r--r--gatchat/ppp.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/gatchat/ppp.h b/gatchat/ppp.h
index d815b9fa..01ab8e03 100644
--- a/gatchat/ppp.h
+++ b/gatchat/ppp.h
@@ -79,12 +79,12 @@ static inline void __put_unaligned_short(void *p, guint16 val)
(get_host_short(packet + 2))
/* LCP related functions */
-struct pppcp_data *lcp_new(GAtPPP *ppp);
+struct pppcp_data *lcp_new(GAtPPP *ppp, gboolean dormant);
void lcp_free(struct pppcp_data *lcp);
void lcp_protocol_reject(struct pppcp_data *lcp, guint8 *packet, gsize len);
/* IPCP related functions */
-struct pppcp_data *ipcp_new(GAtPPP *ppp);
+struct pppcp_data *ipcp_new(GAtPPP *ppp, gboolean is_server, guint32 ip);
void ipcp_free(struct pppcp_data *data);
void ipcp_set_server_info(struct pppcp_data *ipcp, guint32 peer_addr,
guint32 dns1, guint32 dns2);