[En-Nut-Discussion] PPP Start-up example
Harald Kipp
harald.kipp at egnite.de
Fri May 9 10:48:45 CEST 2003
Ralph,
The PPP state machine is still incomplete, I assume it
will not be able to act as a server.
I'll prepare a sample, but for now:
Register the physical and the PPP device
NutRegisterDevice(&devUart1, 0, 0);
NutRegisterDevice(&devPpp, 0, 0);
This uses the normal UART driver, which works OK for a few
kbps throughput.
Open the PPP device.
pcom = _open("ppp:uart1/user/password", _O_RDWR | _O_BINARY)
The filename must be in this form
PPP:<phys.device>/<login>/<password>
Set the PPP baudrate
_ioctl(pcom, UART_SETSPEED, &baud);
Call NutChat() talk to the modem.
Configure the PPP interface
NutNetIfConfig("ppp", 0, 0, 0);
This call will start PPP negotiation with the peer. If it returns
zero, the connection is established.
Hope this helps,
Harald
At 16:51 09.05.2003 +1200, you wrote:
>How would one start a PPP interface with the 3.2 nutos release.
>
>Is there an example somewhere?
>
>Can it be run in a 'server' as well as a client mode?
>
>Thanks
>Ralph
>
>---
>Outgoing mail is certified Virus Free.
>Checked by AVG anti-virus system (http://www.grisoft.com).
>Version: 6.0.461 / Virus Database: 260 - Release Date: 10/03/2003
>
>_______________________________________________
>En-Nut-Discussion mailing list
>En-Nut-Discussion at egnite.de
>http://www.egnite.de/mailman/listinfo/en-nut-discussion
More information about the En-Nut-Discussion
mailing list