Lucas De Marchi
53f1e826c6
Fix common misspellings in gatchat
...
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-09-14 16:00:42 +09:00
Denis Kenzior
54c75c47f8
gatchat: Skip string contents in extract_line
2010-08-16 13:11:44 -05:00
Denis Kenzior
5681e9df49
gatchat: Handle embedded \r and \n in responses
2010-08-16 12:44:50 -05:00
Denis Kenzior
0b2beb0068
gatutil: Handle non-printable characters
...
Signed arithmetic and shifts do not work well...
2010-08-16 11:25:19 -05:00
Denis Kenzior
5f47eca7ed
gatchat: Add g_at_chat_clone
...
This function will clone a chat object, but will create a new group
internally.
2010-08-12 16:06:32 -05:00
Denis Kenzior
2356ebf9ef
gatchat: Make GAtChat a facade for struct at_chat
...
Each GAtChat object is now simply a representation of a set of
outstanding commands and registered unsolicited notification handlers.
This makes it easy to cancel entire groups, e.g. by canceling the
GAtChat object itself rather than forcing the user into tracking all
relevant g_at_chat_register and g_at_chat_send ids.
2010-08-12 16:06:27 -05:00
Zhenhua Zhang
a72e092d19
ppp: Add MAX_IPCP_FAILURE to avoid timeout quickly
...
We use IPCP NAK response to stall the progress of acquiring the client
IP address from DHCP server. So we need to increase the max failure of
NAKs in IPCP handshaking.
2010-07-09 09:53:24 -03:00
Zhenhua Zhang
b3c35db955
gatppp: Unset disconnect function when unref PPP
...
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-07 11:26:55 -05:00
Zhenhua Zhang
e70b1f0abd
gatserver: Restore GAtServer disconnect handling
...
Restore GAtServer disconnect handling when resuming a server session
2010-07-07 11:26:55 -05:00
Zhenhua Zhang
1badaf741a
test-server: Refactor set_raw_mode
...
Rename variable 'options' to 'ti' and use sizeof(ti).
2010-07-06 22:30:32 -03:00
Zhenhua Zhang
2d219d37f9
gatserver: Don't free twice after user disconnect
...
It's possible to free gatserver in user disconnect function. So we
should not free it again.
2010-07-06 11:24:44 -05:00
Zhenhua Zhang
4ec07e9443
test-server: Use cfmakeraw to set TTY raw mode
...
Use cfmakeraw to disable echoing and special characters processing. If
we don't turn off ICRNL, TTY layer translates \r\n to \n\n.
2010-07-06 09:49:48 -03:00
Zhenhua Zhang
b86b2d3299
gatppp: Check ppp instance before unref it
2010-07-06 09:47:15 -03:00
Denis Kenzior
a92d37454a
gsmdial: Wait for a no carrier before sending CFUN
2010-06-29 12:15:44 -05:00
Denis Kenzior
3a6b3bcd0c
test-server: Send a NO_CARRIER when ppp is done
2010-06-29 12:12:42 -05:00
Denis Kenzior
2955c206e4
test-server: Update to the new API
2010-06-29 12:01:34 -05:00
Denis Kenzior
674625ebe2
ppp: Don't accept 0 ip-addr/dns1/dns2
2010-06-29 11:55:18 -05:00
Denis Kenzior
820b1f55c8
ppp: Refactor server-side API
...
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-29 11:53:11 -05:00
Denis Kenzior
969862337a
test-server: Update to the new API
2010-06-29 11:50:25 -05:00
Denis Kenzior
d7c0640412
ppp: Tweak set_server_info API some more
2010-06-29 11:49:40 -05:00
Denis Kenzior
295270b4be
hdlc: Stop recording packets to stdout (fd = 0)
2010-06-29 11:46:40 -05:00
Denis Kenzior
aca0fdf87f
hdlc: Don't bother recording empty packets
2010-06-29 11:46:20 -05:00
Zhenhua Zhang
1afd51a8c7
gsmdial: Configure network interface for PPP
2010-06-28 17:39:23 -05:00
Zhenhua Zhang
0725aba03f
test-server: Configure network interface
...
Require ROOT priviledge to:
1. Run external command to configure and bring up network interface.
2. Enable kernel IP forwarding.
2010-06-28 17:39:18 -05:00
Denis Kenzior
90d240820b
ppp: Tweak the set_server_info API
2010-06-28 17:38:54 -05:00
Zhenhua Zhang
b6601bfeed
test-server: Add PPP server support
...
So that gsmdial and wvdial could talk to test-server and establish PPP
connection.
2010-06-28 16:37:20 -05:00
Denis Kenzior
ae24477801
ppp: Refactor server RCR action
...
We need to generate the Conf-Rej / Conf-Nak in the same order as the
client sent us.
2010-06-28 15:58:03 -05:00
Denis Kenzior
c5c7a229d2
ppp: Refactor client RCR action
2010-06-28 15:30:15 -05:00
Denis Kenzior
d5c963f5d8
ppp: Simplify the logic by re-using code
2010-06-28 11:15:44 -05:00
Denis Kenzior
cff81df606
ppp: Minor style tweaks
2010-06-28 10:21:33 -05:00
Zhenhua Zhang
8be0707ab0
gsmdial: Update to the new API
2010-06-28 10:19:14 -05:00
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
Zhenhua Zhang
9f180fc27a
ppp: Fix leak in pppcp_send_protocol_reject
...
Free the reject pppcp packet after ppp_transmit.
2010-06-21 09:19:55 -05:00
Denis Kenzior
ab76f57cf9
gathdlc: Don't crash if unreffed in callback
2010-06-18 12:23:10 -05:00
Zhenhua Zhang
e2e17512e0
gsmdial: Unref ppp when we get disconnected
2010-06-17 14:57:49 -05:00
Zhenhua Zhang
199582f684
test-server: Fix GIOChannel leak in create_tty
...
Remove client_io and unref server_io after creating GAtServer.
2010-06-17 14:54:42 -05:00
Zhenhua Zhang
1822deba4a
gatserver: Check for disconnection when resuming
...
If the internal GAtIO is no longer valid, treat it as if our channel was
disconnected.
2010-06-17 14:38:53 -05:00
Zhenhua Zhang
047ea0cebb
gatserver: Suspend/resume GAtServer with GAtIO
...
Support g_at_server_suspend and g_at_server_resume operation by using
GAtIO to handle IO related function.
2010-06-17 14:38:23 -05:00
Denis Kenzior
48c3c4268c
gatppp: whitespace issues
2010-06-11 09:20:05 -05:00
Denis Kenzior
a0eafc269e
gatppp: Unref HDLC when unrefing PPP
2010-06-11 09:20:05 -05:00
Denis Kenzior
75e6a4707b
gathdlc: Free the main HDLC structure on unref
2010-06-11 09:20:05 -05:00
Denis Kenzior
719842ea39
gatchat: Check for disconnection when resuming
...
If the internal GAtIO is no longer valid, treat it as if our channel was
disconnected.
2010-06-07 19:32:26 -05:00
Marcel Holtmann
6178173160
Restore GAtChat disconnect handling when resuming a chat session
2010-06-07 02:18:39 -07:00
Denis Kenzior
1803f00c6e
ppp: Trivial whitespace error
2010-05-19 05:26:21 -05:00
Kristen Carlson Accardi
3fff4c49c8
ppp: implement ppp_packet_new
2010-05-19 02:58:45 -05:00
Kristen Carlson Accardi
41188e326a
ppp: fix another hardcode of ppp_packet size
2010-05-11 09:26:08 -05:00
Denis Kenzior
1794ad32fd
gsmdial: Shut down cleanly when ppp link dies
2010-05-10 16:36:33 -05:00
Denis Kenzior
3946d7e07c
ppp: Keep these defines private
2010-05-10 16:28:23 -05:00
Kristen Carlson Accardi
125fc62526
ppp: set address and control field
...
Before sending to hdlc, set the address and control field.
Fix hardcode of ppp header size.
2010-05-10 16:27:15 -05:00