Denis Kenzior
a4921aef11
ppp: Trivial style fix
...
Be more explicit
2010-04-09 08:57:12 -05:00
Denis Kenzior
5a25fd6f11
ppp: Use flags not booleans for ipcp options
2010-04-09 08:55:16 -05:00
Denis Kenzior
c26447d922
ppp: Use flags instead of booleans for lcp options
2010-04-09 08:44:29 -05:00
Denis Kenzior
8f5459ffbc
ppp: Stop the timer when re-starting
...
In case we receive NAK/REJ we should stop and re-start the timer,
otherwise we end up generating multiple Conf-Reqs
2010-04-08 19:47:58 -05:00
Denis Kenzior
cad3223a94
ppp: Rip out the now unused option string stuff
...
Using wireshark is much easier
2010-04-08 16:47:05 -05:00
Denis Kenzior
4f31b6c3b2
ppp: Port LCP to the new option framework
2010-04-08 16:47:05 -05:00
Denis Kenzior
7c3e43be03
ppp: port IPCP to the new option framework
2010-04-08 16:47:05 -05:00
Denis Kenzior
06298becc1
ppp: Rip out the old option processing
...
Put in the new option processing
2010-04-08 16:47:05 -05:00
Denis Kenzior
b803ea8616
ppp: Fix make some functions const correct
2010-04-08 16:47:04 -05:00
Denis Kenzior
9d118c4666
ppp: Make iterators work all the time
2010-04-08 16:46:45 -05:00
Denis Kenzior
c5590d114e
ppp: Move some one-time setters to the proto
2010-04-08 10:40:12 -05:00
Denis Kenzior
4e01f9921e
ppp: Add rca callback
...
When the other side acks our options, then let us apply these options
locally and start using them
2010-04-07 16:41:49 -05:00
Denis Kenzior
5f361d7de9
ppp: Add pppcp option iterators
2010-04-07 16:41:49 -05:00
Denis Kenzior
4a6a381a1d
ppp: Remove lcp_protocol_reject
...
Use pppcp_send_reject_protocol
2010-04-07 16:41:49 -05:00
Denis Kenzior
892ee0a364
ppp: Move pppcp_timer_data private
2010-04-07 16:41:49 -05:00
Denis Kenzior
fc26e6e409
ppp: Cleanup ipcp.c
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
1149210e16
ppp: Use auth->proto, not ppp->proto
...
Otherwise we move on to NCP stage prematurely
2010-04-06 23:11:26 -05:00
Denis Kenzior
97ff3d56f4
Fix: Allow setting of tx ACCM
...
Specification is explicit that ACCM defaults to ~0
2010-04-06 22:49:47 -05:00
Denis Kenzior
5e67ee2ff5
ppp: Remove OPTION_ERR, treat errors as reject
2010-04-06 22:49:47 -05:00
Denis Kenzior
e0c8704705
ppp: Verify magic number is not zero
2010-04-06 22:49:47 -05:00
Denis Kenzior
130ac43255
ppp: Move up the look up table definition
2010-04-06 22:49:47 -05:00
Denis Kenzior
f6d23e153e
ppp: Implement receive ACCM
2010-04-06 22:49:44 -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
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
Marcel Holtmann
352ea97f8f
Hide internals of ring buffer structure
2010-04-02 21:51:19 -07:00
Marcel Holtmann
09f7be82a9
Remove circular inclusion protection from ring buffer header
2010-04-02 20:34:25 -07:00
Marcel Holtmann
764501482e
Fix some cases where g_try_new should be used
2010-04-02 19:20:53 -07:00
Marcel Holtmann
4733ddaffa
Move frame NULL checks into the unstuffing function
2010-04-02 19:06:31 -07:00
Marcel Holtmann
9d8e55d489
Fix coding style with callback structures
2010-04-02 19:01:38 -07:00
Kristen Carlson Accardi
3c3077f847
ppp: implement net close
2010-04-02 19:03:56 -05:00
Denis Kenzior
ebc6e3b9dc
Refactor: Get rid of (now) pointless comments
2010-04-02 19:03:56 -05:00
Marcel Holtmann
ffa99a1ebb
Also the default case should have a break statement
2010-04-02 13:48:44 -07:00
Denis Kenzior
349d4d8c5d
Remove the PPP option from gsmdial
...
Pointless since we should always connect using PPP
2010-04-02 15:13:25 -05:00