summaryrefslogtreecommitdiffstats
path: root/gatchat/gatppp.c
AgeCommit message (Collapse)AuthorFilesLines
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
2010-04-07ppp: Remove lcp_protocol_rejectDenis Kenzior1-1/+1
Use pppcp_send_reject_protocol
2010-04-06ppp: Use auth->proto, not ppp->protoDenis Kenzior1-2/+1
Otherwise we move on to NCP stage prematurely
2010-04-06Fix: Allow setting of tx ACCMDenis Kenzior1-3/+3
Specification is explicit that ACCM defaults to ~0
2010-04-06ppp: Implement receive ACCMDenis Kenzior1-2/+8
2010-04-05Make pppcp_event_type enum a private structureMarcel Holtmann1-1/+1
2010-04-03Move PPP constants where they are usedMarcel Holtmann1-1/+17
2010-04-03Make GAtPPP fields really privateMarcel Holtmann1-0/+50
2010-04-02Move frame NULL checks into the unstuffing functionMarcel Holtmann1-8/+5
2010-04-02Also the default case should have a break statementMarcel Holtmann1-1/+2
2010-04-02Refactor: Get rid of packet handler registrationsDenis Kenzior1-30/+19
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-02Fix tabs vs. whitespace coding style violationMarcel Holtmann1-1/+1
2010-04-02Add more missing break statementsMarcel Holtmann1-0/+1
2010-04-02ppp: use queue to transmitKristen Carlson Accardi1-43/+90
Since we are using non buffered I/O, use a queue to transmit when buffer space is available.
2010-04-02Split out ipcp protocol into ppp_ipcp.cDenis Kenzior1-3/+6
2010-04-02ppp: fix event generation on closeKristen Carlson Accardi1-3/+1
Prevents too early transition to PPP_DEAD
2010-04-01Remove obfuscation for some of the event handlingMarcel Holtmann1-40/+13
2010-04-01Move functions from ppp.c into gatppp.cMarcel Holtmann1-0/+501
2010-04-01Remove PPP event_queue handling and process events directlyMarcel Holtmann1-3/+0
2010-04-01Remove PPP recv_queue handling and process frames directlyMarcel Holtmann1-1/+0
2010-04-01Add support for recording PPP sessions in pppdump formatMarcel Holtmann1-1/+22
2010-04-01Implement g_at_ppp_set_debug supportMarcel Holtmann1-3/+12
2010-03-31Refactor: Use GAtDisconnectFunc for ppp disconnectDenis Kenzior1-4/+6
The ppp argument to the current disconnect callback is useless as the ppp structure is most likely stored in user data anyway.
2010-03-31Refactor: GAtPPP connect callbackDenis Kenzior1-3/+6
The connect callback was not giving enough information and the information it was providing was not in a convenient form. - Provide the ppp interface name (e.g. tun0) - Provide ip, dns1 & dns2 as strings - Do not send the ppp structure in the callback, it is most likely present in the user data anyway
2010-03-25separate memory cleanup from PPP shutdownKristen Carlson Accardi1-18/+7
don't free memory at PPP shutdown, because we need to be able to send terminate traffic. Free memory when we have reached the PPP_DEAD phase instead.
2010-03-22IP support for PPPKristen Carlson Accardi1-0/+1
Adds IPCP support, and creates a TUN interface for sending/receiving IP packets.