Commit Graph

26 Commits

Author SHA1 Message Date
Denis Kenzior 892ee0a364 ppp: Move pppcp_timer_data private 2010-04-07 16:41:49 -05:00
Denis Kenzior 340013c6ef ppp: Hide away the magic_number in ppp_lcp.c 2010-04-07 16:41:40 -05:00
Denis Kenzior 5e67ee2ff5 ppp: Remove OPTION_ERR, treat errors as reject 2010-04-06 22:49:47 -05:00
Denis Kenzior 8bff9b6541 Refactor: Make struct pppcp declaration private 2010-04-05 16:55:28 -05:00
Denis Kenzior 04cfa990e2 Refactor: add pppcp_set/get_magic_number 2010-04-05 16:55:07 -05:00
Denis Kenzior de83e99644 Refactor: add pppcp_set_prefix 2010-04-05 16:46:08 -05:00
Denis Kenzior 97b0aa590d Refactor: add pppcp_get_ppp 2010-04-05 16:44:00 -05:00
Denis Kenzior 7739af4a26 Refactor: add pppcp_set_option_strings 2010-04-05 16:42:17 -05:00
Denis Kenzior 7b447dd0e2 Refactor: Move valid code selection to ipcp/lcp
We already have a set_valid_codes function, let us use it
2010-04-05 16:16:14 -05:00
Denis Kenzior 4f5de3426e Refactor: Move packet_ops to a static look-up
No need to allocate space for this, as it is always the same for all
instances.
2010-04-05 16:14:39 -05:00
Denis Kenzior 48a012c810 Refactor: Make option_scan more type safe 2010-04-05 14:32:11 -05:00
Denis Kenzior 5e8a9c2941 Refactor: Make option_process more typesafe
option_process was declared with two gpointer arguments for the sole
reason of being used as a GFunc.  Casting to a GFunc or re-writing the
foreach as a loop is preferable.
2010-04-05 14:25:14 -05:00
Denis Kenzior 60d96505dc Refactor: Add pppcp_set_data & pppcp_get_data
Using these functions makes the code much cleaner than trying to pass
the priv pointer everywhere
2010-04-05 14:16:00 -05:00
Marcel Holtmann 331fcaea32 Make pppcp_code enum a private structure 2010-04-05 11:12:43 -07:00
Marcel Holtmann 12ffb2c772 Make pppcp_event_type enum a private structure 2010-04-05 11:05:08 -07:00
Denis Kenzior 64ffcf1cfa Refactor: Move to a transition state table
It is much more compact to re-implement the transition states as a table
as opposed to functions with switch/case statements.  The logic is made
much easier to follow and much of the code duplication is eliminated
2010-04-05 12:36:43 -05:00
Denis Kenzior d6517e63fe Refactor: Make the enum assignments explicit
They will be used for certain magic later on
2010-04-05 10:13:10 -05:00
Denis Kenzior e56710e1da Refactor: Move the state definition to ppp_cp.c 2010-04-05 10:12:39 -05:00
Kristen Carlson Accardi 9905245e79 ppp: implement Max-Failure counter
put a cap on the number of Configure-Nak packets we send.
2010-04-05 09:45:14 -05:00
Marcel Holtmann edba0296c5 Remove PPP CP event_queue handling and process events directly 2010-04-01 21:44:07 -07:00
Marcel Holtmann 4f99859d37 Remove useless pppcp_protocol_data structure 2010-04-01 09:13:44 -07:00
Marcel Holtmann eb9e7872a9 Add debugging for PPP LCP and IPCP options 2010-04-01 00:07:40 -07:00
Kristen Carlson Accardi 5260379d98 ppp: send Protocol-Reject
change ppp_decode to store the length of the decoded frame, so that
if we have a packet with a protocol we don't understand, we can send
Protocol-Reject packets.  Modify ppp_cp code to add support for sending
Protocol-Reject packet.
2010-03-26 19:19:46 -07:00
Kristen Carlson Accardi af63a2b8ee ppp: change debug output to include control protocol prefix 2010-03-25 12:38:57 -07:00
Kristen Carlson Accardi 060a195432 use separate timers for PPP config and terminate
Prevent conflicts between config timer information and terminate timer
information by providing a new data structure which keeps timer information
for config and terminate requests separate.
2010-03-24 23:04:45 -05:00
Kristen Carlson Accardi 31e99d9d78 Generic PPP control protocol support
Implement a generic protocol that can be shared by both the LCP and the
NCP implementation.
2010-03-22 17:28:23 -07:00