grub2: bring back build of aros-side grub2 tools
[AROS.git] / workbench / devs / networks / ppp / ModemManager / misc.h
blob69c304af99c99759e3c500cfe075922466c1e08a
1 /*
2 * $Id$
3 */
5 struct EasyTimer{
6 struct MsgPort *TimeMsg;
7 struct timerequest *TimeReq;
8 };
10 struct EasySerial{
11 struct IOExtSer *SerRx; /* Serial IORequest for CMD_READ's */
12 struct IOExtSer *SerTx; /* Serial IORequest for CMD_WRITE's */
13 struct MsgPort *RxPort; /* Serial CMD_READ IORequest reply port */
14 struct MsgPort *TxPort; /* Serial CMD_WRITE IORequest reply port */
15 UBYTE *RxBuff; /* Buffer for holding incoming data */
16 UBYTE *TxBuff; /* Buffer for hold outgoing packets */
17 BOOL Ok; // is device ok (= not unplugged)
20 struct Conf{
22 BYTE InterfaceName[PPP_MAXARGLEN];
23 BYTE DeviceName[PPP_MAXARGLEN];
24 BYTE SerUnitNum;
26 struct List atcl;
28 BYTE username[PPP_MAXARGLEN];
29 BYTE password[PPP_MAXARGLEN];
31 BYTE modemmodel[PPP_MAXARGLEN];
32 BYTE signal;
33 BYTE AccessType;
35 ULONG CommandTimeOut;
37 UBYTE state;
41 struct EasySerial * OpenSerial(BYTE *name,ULONG unit);
42 VOID _CloseSerial(struct EasySerial *s);
43 VOID QueueSerRequest(struct EasySerial *s , LONG length);
44 VOID DoStr(struct EasySerial *s,const STRPTR str);
45 void DoBYTES(struct EasySerial *s, BYTE *p,ULONG len);
46 void SendBYTES(struct EasySerial *s, BYTE *p,ULONG len);
47 void DrainSerial(struct EasySerial *s);
48 BOOL GetResponse(struct EasySerial *s,UBYTE *Buffer,ULONG maxbuffer,LONG timeout);
49 #define CloseSerial(x) if(x){bug("CloseSerial\n");_CloseSerial(x);x=NULL;}
51 void SetTimer(struct EasyTimer* t,const ULONG s);
52 void CloseTimer(struct EasyTimer* t);
53 struct EasyTimer* OpenTimer();
55 BOOL ReadConfig(struct Conf *c);
56 BOOL DialUp(struct EasySerial *s,struct Conf *c);
57 BOOL TestModem(struct EasySerial *s,struct Conf *c);
59 BOOL StartStack();