summaryrefslogtreecommitdiffstats
path: root/gatchat/gatppp.c
AgeCommit message (Collapse)AuthorFilesLines
2010-11-29gatchat: explicitly compare pointers to NULLLucas De Marchi1-2/+2
This patch was generated by the following semantic patch (http://coccinelle.lip6.fr/) // <smpl> @fix disable is_null,isnt_null1@ expression *E; @@ - !E + E == NULL // </smpl>
2010-09-14Fix common misspellings in gatchatLucas De Marchi1-1/+1
Fix common misspellings by using the list available at http://en.wikipedia.org/wiki/Wikipedia:Lists_of_common_misspellings/For_machines From the list cited above, the substitution script found the following misspellings: priviledge->privilege succeded->succeeded
2010-07-07gatppp: Unset disconnect function when unref PPPZhenhua Zhang1-0/+3
Unset IO disconnect function when we try to destroy GAtPPP instance. After freeing the instance, the IO disconnect function should not be invoked.
2010-07-06gatppp: Check ppp instance before unref itZhenhua Zhang1-0/+3
2010-06-29ppp: Refactor server-side APIDenis Kenzior1-5/+50
The biggest update here is that the server needs to be in dormant mode by default, so as not to send a Configure-Req to the peer until the peer is ready. This requires adding special constructor for LCP to initialize it to Stopped state instead of initial state. Along with this, we pass the server local IP directly to the ppp server constructor.
2010-06-29ppp: Tweak set_server_info API some moreDenis Kenzior1-5/+2
2010-06-28ppp: Tweak the set_server_info APIDenis Kenzior1-3/+14
2010-06-28gatppp: Add PPP server extensionZhenhua Zhang1-2/+9
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-11gatppp: whitespace issuesDenis Kenzior1-2/+2
2010-06-11gatppp: Unref HDLC when unrefing PPPDenis Kenzior1-0/+2
2010-05-19ppp: implement ppp_packet_newKristen Carlson Accardi1-0/+15
2010-05-10ppp: Keep these defines privateDenis Kenzior1-0/+3
2010-05-10ppp: set address and control fieldKristen Carlson Accardi1-2/+7
Before sending to hdlc, set the address and control field. Fix hardcode of ppp header size.
2010-05-10ppp: transition to dead when lcp finishedKristen Carlson Accardi1-1/+4
Transition to DEAD when lcp is finished and ignore any io disconnects if we are already dead.
2010-04-30ppp: Refactor connect / disconnect callbacksDenis Kenzior1-12/+20
Right now it is very hard to figure out whether we should be calling the connect callback or the disconnect callback. So refactor as follows: - Connect callback is only called once the net is actually up - Disconnect callback is called once ppp is down, with a reason for why it is so.
2010-04-30ppp: get rid of ppp_enter_phaseDenis Kenzior1-41/+73
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-30ppp: Add _from_io constructorDenis Kenzior1-7/+32
2010-04-29ppp: fix return of drop_packet for NETWORK phaseKristen Carlson Accardi1-1/+1
2010-04-29ppp: silently drop invalid packetsKristen Carlson Accardi1-8/+28
2010-04-29ppp: transition to dead when read io destroyedKristen Carlson Accardi1-1/+1
remove call to signal_close for lcp object, it is redundent. If our io is destroyed we are dead, so transition the ppp phase to DEAD so our disconnect callback can be called.
2010-04-28ppp: Hang set_recording off the GAtPPP objectDenis Kenzior1-3/+3
Marcel: recording right now only works for PPP, so we'd need some sort of multi-protocol support. So for now expose set_recording to be used through the main PPP object. HDLC object recording support needs to be extended.
2010-04-28ppp: Re-add capability to detect io down eventsDenis Kenzior1-0/+9
2010-04-28ppp: Don't crash if the interface wasn't createdDenis Kenzior1-0/+4
2010-04-28ppp: Add getter for HDLC objectDenis Kenzior1-0/+8
2010-04-28ppp: Initial port of PPP to use GAtHDLCDenis Kenzior1-359/+41
2010-04-26ppp: use default ACCM when sending LCP codes 1-7Kristen Carlson Accardi1-0/+10
According to the spec, you must transmit all Link Configuration, Termination, and Code-Reject packets as if no options had been negotiated. This requires that when encoding we use the default ACCM of 0xffffffff when sending these types of packets.
2010-04-26ppp: discard non-LCP packets in ESTABLISHMENT phaseKristen Carlson Accardi1-0/+7
2010-04-22ppp: change MTU on TUN device when MRU option receivedKristen Carlson Accardi1-1/+2
2010-04-22ppp: Shut off IPCP when entering TERMINATING phaseDenis Kenzior1-0/+2
2010-04-22ppp: implement MRU optionKristen Carlson Accardi1-0/+16
If the peer requests a MRU option, set the mtu for the network phase. When we are in link establishment phase, we should continue to behave as if no option has been set and the peer should use the default MRU. This option is required for the Huawei E160G modem.
2010-04-13ppp: Refing the channel is actually not necessaryDenis Kenzior1-3/+2
The read_watch and write_watches both take a ref
2010-04-13ppp: remove pfc and acfcKristen Carlson Accardi1-26/+0
We will not support pfc or acfc
2010-04-13ppp: Get rid of net_open and net_closeDenis Kenzior1-11/+16
There really isn't a need for these now
2010-04-13ppp: Introduce ppp_net_down_notifyDenis Kenzior1-0/+5
2010-04-13ppp: Introduce ppp_net_up_notify and use itDenis Kenzior1-12/+14
This is slightly cleaner way than defining a weird callback function.
2010-04-13ppp: Hide ppp_net definition in ppp_net.cDenis Kenzior1-2/+2
2010-04-13ppp: Use chap functions directly, instead of authDenis Kenzior1-11/+9
2010-04-13ppp: introduce ppp_auth_notifyDenis Kenzior1-0/+8
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-13ppp: Add set / get password & usernameDenis Kenzior1-5/+30
Also refactor the set credentials function, we will be removing the auth object shortly
2010-04-13ppp: Transition the phase directlyDenis Kenzior1-65/+23
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-13ppp: Let the upper layer handle open / up eventsDenis Kenzior1-0/+2
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-13ppp: unref should mean a hard shutdownDenis Kenzior1-27/+20
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-13ppp: Signal Down & Close when socket is closedDenis Kenzior1-0/+2
2010-04-13ppp: Use pppcp_signal functions directlyDenis Kenzior1-5/+6
No real need to wrap them behind lcp_ functions
2010-04-13ppp: Keep track when read watcher diesDenis Kenzior1-4/+11
2010-04-13ppp: Remove unused defineDenis Kenzior1-1/+0
2010-04-12Remove useless debug in PPP transmit destroy callbackMarcel Holtmann1-2/+1
2010-04-12Fix file descriptor leakage when closing PPP recordingMarcel Holtmann1-1/+3
2010-04-09Move CRC-CCITT table and helper into separate fileMarcel Holtmann1-60/+5
2010-04-08ppp: Fix make some functions const correctDenis Kenzior1-1/+1