diff options
author | Denis Kenzior <denkenz@gmail.com> | 2010-04-05 16:16:14 -0500 |
---|---|---|
committer | Denis Kenzior <denkenz@gmail.com> | 2010-04-05 16:16:14 -0500 |
commit | 7b447dd0e23e600aae4a97222a0dc21cad5934c8 (patch) | |
tree | a97e9a064da94fe0ce0d65b0c51073edf243b156 /gatchat/ppp_ipcp.c | |
parent | 4f5de3426e11f6f382a3063cc7d3ce0ec4d52a97 (diff) | |
download | ofono-7b447dd0e23e600aae4a97222a0dc21cad5934c8.tar.bz2 |
Refactor: Move valid code selection to ipcp/lcp
We already have a set_valid_codes function, let us use it
Diffstat (limited to 'gatchat/ppp_ipcp.c')
-rw-r--r-- | gatchat/ppp_ipcp.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/gatchat/ppp_ipcp.c b/gatchat/ppp_ipcp.c index f5f738ba..e81c6b72 100644 --- a/gatchat/ppp_ipcp.c +++ b/gatchat/ppp_ipcp.c @@ -35,6 +35,14 @@ #include "gatppp.h" #include "ppp.h" +#define IPCP_SUPPORTED_CODES ((1 << PPPCP_CODE_TYPE_CONFIGURE_REQUEST) | \ + (1 << PPPCP_CODE_TYPE_CONFIGURE_ACK) | \ + (1 << PPPCP_CODE_TYPE_CONFIGURE_NAK) | \ + (1 << PPPCP_CODE_TYPE_CONFIGURE_REJECT) | \ + (1 << PPPCP_CODE_TYPE_TERMINATE_REQUEST) | \ + (1 << PPPCP_CODE_TYPE_TERMINATE_ACK) | \ + (1 << PPPCP_CODE_TYPE_CODE_REJECT)) + struct ipcp_data { guint8 ip_address[4]; guint8 primary_dns[4]; @@ -190,6 +198,7 @@ struct pppcp_data *ipcp_new(GAtPPP *ppp) pppcp->option_strings = ipcp_option_strings; pppcp->prefix = "ipcp"; + pppcp_set_valid_codes(pppcp, IPCP_SUPPORTED_CODES); pppcp_set_data(pppcp, data); /* set the actions */ |