summaryrefslogtreecommitdiffstats
path: root/gatchat/ppp.h
diff options
context:
space:
mode:
authorDenis Kenzior <denkenz@gmail.com>2010-04-30 14:37:17 -0500
committerDenis Kenzior <denkenz@gmail.com>2010-04-30 14:37:17 -0500
commit9ae0dcb47d71803681a205c4708be82d27111443 (patch)
tree4ff9a2e97411c39d0c36e134c537579cc86cce9d /gatchat/ppp.h
parentc7ef06f91e32c1fa07a5cf8cf6f6b487eee021a9 (diff)
downloadofono-9ae0dcb47d71803681a205c4708be82d27111443.tar.bz2
ppp: get rid of ppp_enter_phase
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.
Diffstat (limited to 'gatchat/ppp.h')
-rw-r--r--gatchat/ppp.h17
1 files changed, 6 insertions, 11 deletions
diff --git a/gatchat/ppp.h b/gatchat/ppp.h
index 01092965..41cf50ae 100644
--- a/gatchat/ppp.h
+++ b/gatchat/ppp.h
@@ -27,14 +27,6 @@
#define PPP_IP_PROTO 0x0021
#define MD5 5
-enum ppp_phase {
- PPP_PHASE_DEAD = 0, /* Link dead */
- PPP_PHASE_ESTABLISHMENT, /* LCP started */
- PPP_PHASE_AUTHENTICATION, /* Auth started */
- PPP_PHASE_NETWORK, /* IPCP started */
- PPP_PHASE_TERMINATION, /* LCP Terminate phase */
-};
-
struct ppp_chap;
struct ppp_net;
@@ -107,13 +99,16 @@ gboolean ppp_net_set_mtu(struct ppp_net *net, guint16 mtu);
/* PPP functions related to main GAtPPP object */
void ppp_debug(GAtPPP *ppp, const char *str);
-void ppp_enter_phase(GAtPPP *ppp, enum ppp_phase phase);
void ppp_transmit(GAtPPP *ppp, guint8 *packet, guint infolen);
void ppp_set_auth(GAtPPP *ppp, const guint8 *auth_data);
void ppp_auth_notify(GAtPPP *ppp, gboolean success);
-void ppp_net_up_notify(GAtPPP *ppp, const char *ip,
+void ppp_ipcp_up_notify(GAtPPP *ppp, const char *ip,
const char *dns1, const char *dns2);
-void ppp_net_down_notify(GAtPPP *ppp);
+void ppp_ipcp_down_notify(GAtPPP *ppp);
+void ppp_ipcp_finished_notify(GAtPPP *ppp);
+void ppp_lcp_up_notify(GAtPPP *ppp);
+void ppp_lcp_down_notify(GAtPPP *ppp);
+void ppp_lcp_finished_notify(GAtPPP *ppp);
void ppp_set_recv_accm(GAtPPP *ppp, guint32 accm);
void ppp_set_xmit_accm(GAtPPP *ppp, guint32 accm);
void ppp_set_mtu(GAtPPP *ppp, const guint8 *data);