Zhenhua Zhang
588db02354
gatppp: Add PPP server extension
...
1. Add interface to set PPP server info by g_at_ppp_set_server_info.
2. Pass local and peer address through IPCP handshaking.
2010-06-28 10:17:58 -05:00
Zhenhua Zhang
28b2c32dc7
ppp: Fix incorrect packet length for little-endian
...
packet->length is in TCP/IP network byte order. It needs to call ntohs()
to convert to host byte order, which is little-endian.
2010-06-23 16:45:28 -05:00
Denis Kenzior
9ae0dcb47d
ppp: get rid of ppp_enter_phase
...
This function simply didn't have the context of why the phase was being
entered. Instead have each protocol notify GAtPPP as to what is
happening. We already had this more or less for IPCP and AUTH events,
this just now formalizes it for LCP as well.
2010-04-30 14:37:17 -05:00
Denis Kenzior
1d939052fc
ppp: Introduce ppp_net_down_notify
2010-04-13 14:59:13 -05:00
Denis Kenzior
d1d73a75fc
ppp: Introduce ppp_net_up_notify and use it
...
This is slightly cleaner way than defining a weird callback function.
2010-04-13 14:55:10 -05:00
Denis Kenzior
9116b7e8f8
ppp: Let the upper layer handle open / up events
...
This removes the need for the layer_started functions in lcp and ipcp.
For LCP the link is always up unless the socket has been closed, and for
IPCP the link should be opened as soon as LCP is ready anyway.
2010-04-13 13:58:12 -05:00
Denis Kenzior
dbbaa3c416
ppp: Reset the options whenever the layer is down
...
So we can re-negotiate the options if the layer is opened again.
2010-04-13 13:34:12 -05:00
Denis Kenzior
8c1677713f
ppp: Rename data to pppcp
2010-04-13 13:27:23 -05:00
Denis Kenzior
5a25fd6f11
ppp: Use flags not booleans for ipcp options
2010-04-09 08:55:16 -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
7c3e43be03
ppp: port IPCP to the new option framework
2010-04-08 16:47:05 -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
fc26e6e409
ppp: Cleanup ipcp.c
2010-04-07 16:41:49 -05:00
Denis Kenzior
8bff9b6541
Refactor: Make struct pppcp declaration private
2010-04-05 16:55:28 -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
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
Marcel Holtmann
5772ad5d8b
Make GAtPPP fields really private
2010-04-03 22:25:09 -07:00
Marcel Holtmann
9d8e55d489
Fix coding style with callback structures
2010-04-02 19:01:38 -07:00
Denis Kenzior
ebc6e3b9dc
Refactor: Get rid of (now) pointless comments
2010-04-02 19:03:56 -05:00
Denis Kenzior
2c466c8baf
Refactor: Get rid of packet handler registrations
...
There are only about 4 protocols that the current ppp code handles and
it is doubtful that it will grow much more. There's no point in having
an extensive packet handler registration framework.
2010-04-02 15:11:48 -05:00
Denis Kenzior
1ed6966cb4
Split out ipcp protocol into ppp_ipcp.c
2010-04-02 12:53:45 -05:00