Denis Kenzior
87340d64e2
ppp: Make ppp_chap_process_packet const correct
2010-04-28 17:27:35 -05:00
Denis Kenzior
955673573b
ppp: Make ppp_net_process_packet const correct
2010-04-28 17:27:35 -05:00
Denis Kenzior
5acb633a1d
gathdlc: Add recording support, ported from PPP
...
For protocol examination using wireshark
2010-04-28 17:27:35 -05:00
Denis Kenzior
41ce6212a1
gathdlc: Add receive ACCM support
2010-04-28 17:27:35 -05:00
Denis Kenzior
7c6c72f558
gathdlc: Support transmit ACCM
2010-04-28 17:27:35 -05:00
Denis Kenzior
e088f3c2bb
gatchat: Don't try to cleanup twice
...
In case we get unrefed from the disconnect callback
2010-04-28 17:27:35 -05:00
Denis Kenzior
0845dc3b5d
gatchat: Use GAtIO for write watchers
2010-04-28 17:27:34 -05:00
Denis Kenzior
6a66505e46
gatio: support for blocking / nonblocking writes
2010-04-28 17:27:34 -05:00
Denis Kenzior
85448aac8c
gatchat: get_channel should return one from GAtIO
2010-04-28 17:27:34 -05:00
Denis Kenzior
19115e0a15
gatchat: Channel is now setup by GAtIO
2010-04-28 17:27:34 -05:00
Denis Kenzior
033b576593
gatchat: Better re-entrancy handling
2010-04-28 17:27:34 -05:00
Denis Kenzior
9c3ae4746e
gsmdial: Get rid of g_at_chat_shutdown usage
2010-04-28 17:27:34 -05:00
Denis Kenzior
d875298404
gsmdial: Unref the chat instead of using shutdown
2010-04-28 17:27:34 -05:00
Denis Kenzior
8645b05c4f
gatmux: Unref the chat instead of using shutdown
2010-04-28 17:27:34 -05:00
Denis Kenzior
f9b2e5cf5a
gatchat: Only set debug on IO if we have it
2010-04-28 17:27:33 -05:00
Denis Kenzior
3aa1faddef
gatchat: Replace shutdown by suspend/resume
...
Shutdown was actually pointless and according to Marcel he only had it
in mind for PPP useage.
2010-04-28 17:27:33 -05:00
Denis Kenzior
7b8f4f5dc8
gatchat: port gatchat to use gatio
2010-04-28 17:27:33 -05:00
Denis Kenzior
43c30e2292
gatio: Remove g_at_io_shutdown
2010-04-28 17:27:33 -05:00
Denis Kenzior
204814da05
gatio: Get re-entrancy correct
2010-04-28 17:27:32 -05:00
Denis Kenzior
c614254ae9
gatio: Style fix for gsource id comparisons
2010-04-28 17:27:32 -05:00
Denis Kenzior
2d2bc8b5b3
gatio: Kill the reader when no more space
2010-04-28 17:27:32 -05:00
Denis Kenzior
f09ce13ad7
gatchat: Remove g_at_chat_set_syntax
...
Never used and too unsafe in its current form
2010-04-28 17:27:32 -05:00
Denis Kenzior
5fc7c1e1d0
gatchat: Add initial GAtIO implementation
2010-04-28 17:27:32 -05:00
Kristen Carlson Accardi
a9c0be7339
ppp: use default ACCM when sending LCP codes 1-7
...
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-26 15:31:17 -05:00
Kristen Carlson Accardi
fce78feb54
ppp: discard non-LCP packets in ESTABLISHMENT phase
2010-04-26 12:38:31 -05:00
Marcel Holtmann
cc1975270c
Fix broken HDLC flag handling
2010-04-24 19:12:30 +02:00
Marcel Holtmann
057bd9f0b3
Fix wrong escape character check in HDLC transmit
2010-04-24 19:02:04 +02:00
Marcel Holtmann
46839fbd15
Allow real wrapping around of HDLC transmit ring buffer
2010-04-24 19:00:54 +02:00
Marcel Holtmann
8f05535bb2
Add offset parameter to ring_buffer_write_ptr() function
2010-04-24 18:59:44 +02:00
Marcel Holtmann
9fd7d841c8
Add support for wrapping of HDLC transmit ring buffer
2010-04-24 18:54:34 +02:00
Marcel Holtmann
d2c8f124e6
Use HDLC_FCS helper where possible
2010-04-23 17:22:56 +02:00
Marcel Holtmann
2a609f9054
Use HDLC constants instead of magic numbers
2010-04-23 17:21:49 +02:00
Marcel Holtmann
a31870f542
Add support for wrapping of HDLC receive ring buffer
2010-04-23 17:18:30 +02:00
Denis Kenzior
fa5e8cf56b
ppp: Fix trivial style error
2010-04-22 17:58:29 -05:00
Kristen Carlson Accardi
e98fb9a6bd
ppp: change MTU on TUN device when MRU option received
2010-04-22 17:56:31 -05:00
Denis Kenzior
fde23f113a
ppp: Request MRU if we ever get NAKed with it
...
Huawei E160G hardware seems to NAK our configure request and suggest
that it will never send packets bigger than 1440 bytes. Since we don't
particularly care (our receive ring buffer is 4K, so it can handle 2048
byte packets), we just re-send the Configure Request with the preferred
value.
2010-04-22 15:08:05 -05:00
Denis Kenzior
07280e1bff
ppp: Fix trivial copy paste error
2010-04-22 15:07:42 -05:00
Denis Kenzior
226865272c
ppp: Shut off IPCP when entering TERMINATING phase
2010-04-22 15:05:18 -05:00
Kristen Carlson Accardi
71775550fe
ppp: implement MRU option
...
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-22 07:00:40 +02:00
Marcel Holtmann
123b87de2c
No to check for NULL pointers with g_free
2010-04-15 04:42:03 -07:00
Kristen Carlson Accardi
60643ee287
ppp: nak unknown auth protocol
...
If we are sent a Config-Request for an auth proto other than
CHAP with MD5, send a NAK.
2010-04-14 17:16:03 -05:00
Denis Kenzior
15d93ad0b9
Fix: GAtMux channels should return EAGAIN
...
GAtChat uses non-blocking semantics, so the GAtMux channels should
return the EAGAIN status to make GAtChat work properly.
2010-04-14 10:39:47 -05:00
Denis Kenzior
c8aa645973
ppp: Refing the channel is actually not necessary
...
The read_watch and write_watches both take a ref
2010-04-13 15:57:07 -05:00
Denis Kenzior
8e15816ac1
Fix: Don't try to set channel flags if they're 0
2010-04-13 15:37:05 -05:00
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