diff options
Diffstat (limited to 'appl/cmd/ip/ppp/modem.m')
| -rw-r--r-- | appl/cmd/ip/ppp/modem.m | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/appl/cmd/ip/ppp/modem.m b/appl/cmd/ip/ppp/modem.m new file mode 100644 index 00000000..9a99acf8 --- /dev/null +++ b/appl/cmd/ip/ppp/modem.m @@ -0,0 +1,41 @@ +Modem: module +{ + PATH: con "/dis/ip/ppp/modem.dis"; + + ModemInfo: adt { + path: string; + init: string; + country: string; + other: string; + errorcorrection:string; + compression: string; + flowctl: string; + rateadjust: string; + mnponly: string; + dialtype: string; + }; + + Device: adt { + lock: ref Lock->Semaphore; + # modem stuff + ctl: ref Sys->FD; + data: ref Sys->FD; + + local: string; + remote: string; + status: string; + speed: int; + t: ref ModemInfo; + # input reader + avail: array of byte; + pid: int; + }; + + init: fn(i: ref ModemInfo): ref Device; + dial: fn( m: ref Device, number: string); + getc: fn(m: ref Device, timout: int): int; + getinput: fn(m: ref Device, n: int ): array of byte; + send: fn(m: ref Device, x: string): int; + close: fn(m: ref Device): ref Sys->Connection; + onhook: fn(m: ref Device); +}; |
