diff options
Diffstat (limited to 'gatchat/ppp_lcp.c')
-rw-r--r-- | gatchat/ppp_lcp.c | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/gatchat/ppp_lcp.c b/gatchat/ppp_lcp.c index 9bfa4752..1fcb40ea 100644 --- a/gatchat/ppp_lcp.c +++ b/gatchat/ppp_lcp.c @@ -153,8 +153,6 @@ static void lcp_option_process(gpointer data, gpointer user) } } -static const char lcp_prefix[] = "lcp"; - static const char *lcp_option_strings[256] = { [0] = "Vendor Specific", [1] = "Maximum-Receive-Unit", @@ -172,12 +170,6 @@ static const char *lcp_option_strings[256] = { [13] = "Callback", }; -static struct pppcp_protocol_data lcp_protocol_data = { - .proto = LCP_PROTOCOL, - .prefix = lcp_prefix, - .options = lcp_option_strings, -}; - struct ppp_packet_handler lcp_packet_handler = { .proto = LCP_PROTOCOL, .handler = pppcp_process_packet, @@ -249,13 +241,14 @@ struct pppcp_data *lcp_new(GAtPPP *ppp) struct ppp_option *option; guint16 codes = LCP_SUPPORTED_CODES; - lcp_protocol_data.ppp = ppp; - pppcp = pppcp_new(&lcp_protocol_data); + pppcp = pppcp_new(ppp, LCP_PROTOCOL); if (!pppcp) { g_print("Failed to allocate PPPCP struct\n"); return NULL; } pppcp_set_valid_codes(pppcp, codes); + pppcp->option_strings = lcp_option_strings; + pppcp->prefix = "lcp"; pppcp->priv = pppcp; /* set the actions */ |