10 #include <exec/types.h>
11 #include <exec/libraries.h>
12 #include <exec/semaphores.h>
13 #include <exec/devices.h>
14 #include <exec/interrupts.h>
21 #include <devices/timer.h>
22 #include <devices/sana2.h>
23 #include <devices/sana2specialstats.h>
25 #include <proto/exec.h>
26 #include <proto/dos.h>
27 #include <aros/debug.h>
33 #include LC_LIBDEFS_FILE
37 ** Maximum Transmission Unit
42 ** Max # of Units allowed
46 #define PPP_MAXBUFF 4096
47 #define SERIAL_BUFSIZE PPP_MAXBUFF
48 #define PPP_MAXARGLEN 100
51 #define PPP_PHASE_DEAD 1
52 #define PPP_PHASE_CONFIGURATION 2
53 #define PPP_PHASE_AUTHENTICATION 3
54 #define PPP_PHASE_PROTOCOL_CONF 4
55 #define PPP_PHASE_NETWORK 5
56 #define PPP_PHASE_TERMINATE 6
58 // PPPcontrolMsg commands
59 #define PPP_CTRL_INFO_REQUEST 1
60 #define PPP_CTRL_INFO 2
61 #define PPP_CTRL_SETPHASE 3
62 #define PPP_CTRL_OPEN_SERIAL 4
63 #define PPP_CTRL_CLOSE_SERIAL 5
69 ULONG Command
; // command
70 IPTR Arg
; // command argument
72 UBYTE
*DeviceName
; // serial device name
73 ULONG UnitNum
; // serial device unit number
77 // info response part:
78 UBYTE Phase
; // ppp phase
79 BOOL Ser
; // serial device status
80 BOOL Up
; // ppp device up/down
90 UBYTE SecondaryDNS
[4];
92 ULONG num
; // message number (debug purposes)
98 BYTE str
[PPP_MAXARGLEN
];
102 struct MsgPort
*TimeMsg
;
103 struct timerequest
*TimeReq
;
107 struct IOExtSer
*SerRx
; /* Serial IORequest for CMD_READ's */
108 struct IOExtSer
*SerTx
; /* Serial IORequest for CMD_WRITE's */
109 struct MsgPort
*RxPort
; /* Serial CMD_READ IORequest reply port */
110 struct MsgPort
*TxPort
; /* Serial CMD_WRITE IORequest reply port */
111 UBYTE
*RxBuff
; /* Buffer for holding incoming data */
112 UBYTE
*TxBuff
; /* Buffer for hold outgoing packets */
113 BOOL Ok
; // is device ok (= not unplugged)
117 struct Device sd_Device
;
126 struct Unit
*sd_Unit
;
127 struct SignalSemaphore sd_Lock
;
129 struct Process
*sdu_Proc
;
131 struct EasySerial
*ser
;
133 BYTE DeviceName
[PPP_MAXARGLEN
];
135 BYTE username
[PPP_MAXARGLEN
];
136 BYTE password
[PPP_MAXARGLEN
];
138 BOOL (*CopyFromBuffer
)(APTR
, APTR
, ULONG
);
139 BOOL (*CopyToBuffer
)(APTR
, APTR
, ULONG
);
141 struct SignalSemaphore sdu_ListLock
; /* A Semaphore for access to all of our queues. */
142 struct MinList Rx_List
; /* Pending CMD_READ's */
143 struct MinList Tx_List
; /* Pending CMD_WRITE's */
154 UBYTE SecondaryDNS
[4];