Commit Graph

2144 Commits

Author SHA1 Message Date
Denis Kenzior c74e2ab189 ppp: TUN channel should not be opened NONBLOCKING
We don't handle it as a nonblocking channel and getting it right would
be a nightmare.
2010-04-13 15:35:55 -05:00
Denis Kenzior 7085818f23 ppp: Cleanup function definitions in ppp.h 2010-04-13 15:32:35 -05:00
Kristen Carlson Accardi b74a9342d2 ppp: remove pfc and acfc
We will not support pfc or acfc
2010-04-13 15:32:35 -05:00
Kristen Carlson Accardi 9c3631f24e ppp: remove references to magic number
We will not support loopback detection.
2010-04-13 15:32:35 -05:00
Denis Kenzior 0aaf98a354 ppp: Get rid of net_open and net_close
There really isn't a need for these now
2010-04-13 15:14:40 -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 6525826455 ppp: Hide ppp_net definition in ppp_net.c 2010-04-13 14:42:59 -05:00
Denis Kenzior 71ddfca269 ppp: Use chap functions directly, instead of auth 2010-04-13 14:21:16 -05:00
Denis Kenzior 18e5e26acb ppp: Remove auth_ functions from ppp_auth.c
These really serve no purpose right now as we use only CHAP.  So they
only take up space and make the code harder to read.  If we implement
1-3 auth protocols, then they're easier handled inside gatppp.c.  If we
have more, then a proper auth driver framework is required.
2010-04-13 14:21:16 -05:00
Denis Kenzior 42f6e8ec6e ppp: introduce ppp_auth_notify
This function will be notified whenever authentication has succeeded /
failed.  This can happen in the authentication phase or during the
network phase.  If auth fails, then we should proceed to the terminate
phase.
2010-04-13 14:21:16 -05:00
Denis Kenzior e21bb72df0 ppp: Add set / get password & username
Also refactor the set credentials function, we will be removing the auth
object shortly
2010-04-13 14:21:16 -05:00
Denis Kenzior fed99b9265 ppp: Transition the phase directly
Use of the generate event function, while more 'pure' with regard to how
the spec views transitions, actually makes code more difficult to read.

Instead use phase transitions directly inside gatppp.  This still bleeds
through a little into lcp code, and probably should be fixed in a better
way eventually.
2010-04-13 14:21:12 -05:00
Denis Kenzior 552db428ef ppp: Refactor how tls/tlu/tld/tlf are used
With the upper layer driving these, the special handling is no longer
required.
2010-04-13 14:00:01 -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 87939c2fcf Merge: make link 2010-04-13 13:57:03 -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 843db6f9a5 ppp: unref should mean a hard shutdown
This can happen when e.g. the modem is physically removed from the
system and it is not feasible to wait for the nice shutdown state to be
reached.
2010-04-13 12:03:32 -05:00
Denis Kenzior b916f189f5 ppp: Signal Down & Close when socket is closed 2010-04-13 12:03:32 -05:00
Denis Kenzior a661dd1583 ppp: Add pppcp_signal_down
For use when the link is abruptly terminated by the remote side
2010-04-13 12:03:32 -05:00
Denis Kenzior f5270cc9bd ppp: Use pppcp_signal functions directly
No real need to wrap them behind lcp_ functions
2010-04-13 12:03:32 -05:00
Denis Kenzior 36d15b4366 ppp: Keep track when read watcher dies 2010-04-13 12:03:32 -05:00
Denis Kenzior 79d81af431 ppp: Remove unused define 2010-04-13 12:03:32 -05:00
Denis Kenzior 6ac0025767 Fix: busy loop in atserver 2010-04-12 22:33:42 -05:00
Marcel Holtmann 7a27cc42fc Reindent the handler registration inside AT server 2010-04-12 18:13:02 -07:00
Marcel Holtmann f319e65b99 Use ppp_debug() for PPP CP event debug statements 2010-04-12 18:02:11 -07:00
Marcel Holtmann 143d6db7c3 Remove useless debug in PPP transmit destroy callback 2010-04-12 17:53:29 -07:00
Marcel Holtmann a977ecf260 Remove various GDestroyNotify function casting 2010-04-12 17:48:20 -07:00
Marcel Holtmann 5b229e60c9 The exit() function should always use positive exit values 2010-04-12 17:37:50 -07:00
Marcel Holtmann 0e178517ce Fix file descriptor leakage when closing PPP recording 2010-04-12 17:34:24 -07:00
Marcel Holtmann 313eb4f285 The AT+CGDATA command should return CONNECT on success 2010-04-12 16:36:06 -07:00
Marcel Holtmann 9fe2d4c88c Add fake support for AT+CGDATA and AT+CGDCONT inside AT server 2010-04-12 16:34:13 -07:00
Marcel Holtmann a21499ca01 Add basic support for emulating AT+CGATT inside AT server 2010-04-12 16:28:59 -07:00
Marcel Holtmann 4add05f4f0 Add basic support for emulating AT+CGREG inside AT server 2010-04-12 16:22:57 -07:00
Marcel Holtmann 5c1da8f6fc Add basic support for emulating AT+CREG inside AT server 2010-04-12 16:19:34 -07:00
Marcel Holtmann 156904535e Check for PIN after activating the modem 2010-04-11 18:23:24 +02:00
Marcel Holtmann 3187e46799 Reduce fake CFUN delay to 1 second to make testing simpler 2010-04-11 18:18:01 +02:00
Marcel Holtmann 4e16e48b24 Make CPIN handling of AT server a bit more compliant 2010-04-11 18:14:12 +02:00
Marcel Holtmann 0cafc1646c Add really simple COPS support to AT command server 2010-04-11 18:10:50 +02:00
Marcel Holtmann 2dab6bc3a6 The user data pointer variable should be called user_data 2010-04-11 17:42:40 +02:00
Marcel Holtmann 0b2014df05 Implement full CFUN handling for AT server 2010-04-11 17:36:34 +02:00
Marcel Holtmann 46e77907b3 Use a ring buffer for non-blocking HDLC output streams 2010-04-11 07:01:14 +02:00
Marcel Holtmann 6ddf874318 Add initial implementation for QCDM test utility 2010-04-10 15:13:23 +02:00
Marcel Holtmann 20b394e72b Add abstraction for HDLC stream handling 2010-04-10 15:11:46 +02:00
Marcel Holtmann a9c204effa Add utility helper for debugging binary blobs 2010-04-10 11:56:11 +02:00
Marcel Holtmann 4c76be6c0d Add generic receive function definition 2010-04-10 11:54:12 +02:00
Marcel Holtmann 017b4d3955 Check for PIN status to see details in debug output 2010-04-10 09:33:45 +02:00
Marcel Holtmann 8cd991b81f Add skeleton for QCDM test program 2010-04-10 01:33:47 +02:00
Marcel Holtmann 455884d86e Remove one empty line and add another one 2010-04-09 17:10:48 +02:00