home *** CD-ROM | disk | FTP | other *** search
/ Amiga Tools 5 / Amiga Tools 5.iso / internet-tools / ipdial / source / ipdial.h < prev    next >
Encoding:
C/C++ Source or Header  |  1996-04-16  |  3.7 KB  |  154 lines

  1. /**
  2. ***  IPDial - IPDial.h
  3. ***
  4. ***  Main include file with prototypes
  5. ***
  6. ***
  7. ***  This program is free software; you can redistribute it and/or modify
  8. ***  it under the terms of the GNU General Public License as published by
  9. ***  the Free Software Foundation; either version 2 of the License, or
  10. ***  (at your option) any later version.
  11. ***
  12. ***  This program is distributed in the hope that it will be useful,
  13. ***  but WITHOUT ANY WARRANTY; without even the implied warranty of
  14. ***  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  15. ***  GNU General Public License for more details.
  16. ***
  17. ***  You should have received a copy of the GNU General Public License
  18. ***  along with this program; if not, write to the Free Software
  19. ***  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  20. ***
  21. ***  Authors: Jochen Wiedmann <wiedmann@neckar-alb.de>
  22. ***           Stefan Gybas <cab@studbox.uni-stuttgart.de>
  23. **/
  24.  
  25.  
  26. #ifndef IPDIAL_H
  27. #define IPDIAL_H
  28.  
  29.  
  30. /*** Version defintions ***/
  31.  
  32. #define VERS "IPDial 2.1"
  33. #define DATE "16.04.96"
  34. #define VSTRING VERS " (" DATE ")"
  35. #define VERSTAG "\\0$VER: " VERS " (" DATE ")"
  36.  
  37.  
  38. /*** Program definitions ***/
  39.  
  40. #define DELAY_AFTER_IO 0               /*  use Delay() after DoIO() */
  41. #define ScBufSize 1024                 /*  size of scratch buffer  */
  42. #undef USE_ABORTPKT                    /*  currently not implemented in OS  */
  43. #undef SETCMD                          /*  enable SET command?  */
  44. #undef SHOWPARMSCMD                    /*  enable SHOWPARAMS command?  */
  45.  
  46.  
  47. /*** Default values for serial settings ***/
  48.  
  49. #define DEFAULT_UNIT 0
  50. #define DEFAULT_BAUD 9600
  51. #define DEFAULT_PROTOCOL (STRPTR) "RTSCTS"
  52. #define DEFAULT_BUFSIZE 4096
  53.  
  54.  
  55. /*** other dafaule values ***/
  56.  
  57. #define DEFAULT_TIMEOUT 5              /*  default timout for WAIT command  */
  58.  
  59.  
  60. /*** Include files ***/
  61.  
  62. #include <stdlib.h>
  63. #include <stdio.h>
  64. #include <string.h>
  65.  
  66. #ifdef __SASC_60
  67. #include <proto/exec.h>
  68. #include <proto/dos.h>
  69. #else
  70. #include <clib/exec_protos.h>
  71. #include <clib/dos_protos.h>
  72. #include <exec/types.h>
  73. #endif
  74.  
  75. #ifdef __GNUC__
  76. #define stricmp strcasecmp
  77. #define strnicmp strncasecmp
  78. #endif
  79.  
  80.  
  81. /*** Prototypes ***/
  82.  
  83.  
  84. /* IPDial.c */
  85.  
  86. extern ULONG EchoMode;
  87. extern ULONG VerboseMode;
  88. extern UBYTE ScratchBuffer[ScBufSize];
  89. extern VOID PrintError(ULONG, STRPTR);
  90. extern VOID CleanupAndExit(int);
  91.  
  92.  
  93. /* DeviceIO.c */
  94.  
  95. extern BYTE DeviceIOWait(APTR);
  96. extern VOID DeviceIOAbort(APTR);
  97. extern VOID DeviceIOSend(APTR, UWORD);
  98. extern BYTE DeviceIODo(APTR, UWORD);
  99. extern ULONG DeviceIOSignal(APTR);
  100. extern struct IORequest *DeviceIOReq(APTR);
  101. extern APTR DeviceIOCreate(ULONG);
  102. extern VOID DeviceIODelete(APTR);
  103. extern BYTE DeviceIOOpen(STRPTR, ULONG, APTR, ULONG);
  104.  
  105.  
  106. /* Serial.c */
  107.  
  108. extern VOID SerialCleanup(VOID);
  109. extern ULONG SerialOpen(STRPTR, LONG, LONG, STRPTR);
  110. extern VOID SerialSend(STRPTR);
  111. extern LONG SerialWait(STRPTR *, LONG);
  112. extern VOID SerialSetBaud(ULONG);
  113. extern VOID SerialSetBufSize(ULONG);
  114. extern VOID SerialTerminal(STRPTR, ULONG, ULONG);
  115. extern STRPTR SerialWaitBuffer(VOID);
  116. extern LONG TimerWait(LONG, LONG);
  117.  
  118. #ifdef SHOWPARMSCMD
  119. extern VOID SerialShowParms(VOID);
  120. #endif
  121.  
  122. #ifdef SETCMD
  123. extern VOID SerialSetDataBits(UBYTE);
  124. extern VOID SerialSetStopBits(UBYTE);
  125. extern ULONG SerialSetParity(STRPTR);
  126. extern ULONG SerialSetProtocol(STRPTR);
  127. #endif
  128.  
  129. /* Buffer.c */
  130.  
  131. extern APTR BufferCreate(VOID);
  132. extern VOID BufferClear(APTR);
  133. extern VOID BufferExtend(APTR, const UBYTE*, ULONG);
  134. extern LONG BufferCheck(APTR, STRPTR *);
  135. extern STRPTR BufferBuffer(APTR);
  136.  
  137.  
  138. /* StrReadArgs.c */
  139.  
  140. extern ULONG StrReadArgs(STRPTR, LONG *, STRPTR);
  141. extern VOID StrReadArgsFree(VOID);
  142.  
  143.  
  144. /* Vsscanf.c */
  145.  
  146. extern LONG Vsscanf(STRPTR, STRPTR, ULONG);
  147.  
  148.  
  149. /* SanaConfig.c */
  150.  
  151. extern STRPTR ReadSanaConfig(STRPTR);
  152.  
  153. #endif
  154.