Commit Graph

32 Commits

Author SHA1 Message Date
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 c2fb0a1630 Move PPP constants where they are used 2010-04-03 22:32:27 -07:00
Marcel Holtmann 5772ad5d8b Make GAtPPP fields really private 2010-04-03 22:25:09 -07:00
Kristen Carlson Accardi 0766a67832 ppp: fix missing breaks in switch statements 2010-04-02 13:19:14 -07:00
Marcel Holtmann 8097a1ed52 Add missing break or fall through comments to switch statements 2010-04-02 12:40:45 -07:00
Marcel Holtmann 0e8b2815a8 Always reset option_rval for every option 2010-04-02 11:43:20 -07:00
Kristen Carlson Accardi 74e1abd353 ppp: use queue to transmit
Since we are using non buffered I/O, use a queue to transmit when buffer
space is available.
2010-04-02 13:05:47 -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 ef82241deb Implement g_at_ppp_set_debug support 2010-04-01 13:11:11 -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
Marcel Holtmann f87537644b Fix whitespace damage in PPP implementation 2010-03-31 10:30:54 -07:00
Kristen Carlson Accardi c31bee9fff ppp: handle Config-Reject
if our peer sends us a Config-Reject packet, we must delete that
config item and not request that it be negotiated when we send our
next Config-Request.
2010-03-26 19:19:46 -07:00
Kristen Carlson Accardi 8777e778f3 ppp: use common code to get options from pppcp packet data 2010-03-26 19:19:46 -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 3772a6401c ppp: comment fix
Put some additional clarification in comment for receiving Code-Reject
and Protocol-Reject packets.
2010-03-26 19:19:46 -07:00
Kristen Carlson Accardi 909ab154a4 ppp: fix segfault in pppcp_send_code_reject()
fix memory corruption caused by misplaced paren when memcpying
rejected packet data into Code-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
Marcel Holtmann 1e33e5339d Fix some small copy-and-paste typos 2010-03-25 08:20:19 -07:00
Kristen Carlson Accardi 06ae2b2c98 add tracing for PPP terminate path
Insert some calls to pppcp_trace() for future debugging needs.
2010-03-25 06:50:10 -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 fb40115bf2 switch to g_timeout_add_seconds()
we don't care that much about the exactness of our timer, so use
the more power efficient call.
2010-03-24 23:04:42 -05:00
Denis Kenzior c1c3b5502e Style: No point to write a function to wrap g_free
Using casting magic works well enough, and more consistent with the rest
of the library.
2010-03-24 15:24:06 -05:00
Kristen Carlson Accardi 7dbd19e441 fix memory leaks after ppp_transmit
Free packets in ppp_cp after calling ppp_transmit()
2010-03-24 13:21:31 -07:00
Kristen Carlson Accardi 954e114507 fix memory leaks in option handling
free the data as well as the link when deleting options lists.
2010-03-24 13:21:31 -07:00
Marcel Holtmann b4267dc624 Remove pointless optimization attempt with g_list_length() 2010-03-22 21:43:46 -07:00
Marcel Holtmann e396b7d5af Unnest some more functions in PPP CP implementation 2010-03-22 20:07:13 -07:00
Marcel Holtmann 91b742730a Some additional whitespace cleanup for PPP code 2010-03-22 20:01:28 -07:00
Marcel Holtmann 8667c8694d Fix the broken PPP CP debug trace function 2010-03-22 19:56:53 -07:00
Marcel Holtmann a09d38643b Remove some heavy nesting that is not needed at all 2010-03-22 19:32:47 -07:00
Marcel Holtmann c59a93e6fb Fix another pointer casting issue on 32-bit systems 2010-03-22 19:29:34 -07: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