home *** CD-ROM | disk | FTP | other *** search
/ Network PC / Network PC.iso / amiga utilities / communication / internet / amitcp3.0b / netinclude / clib / netlib_protos.h next >
Encoding:
C/C++ Source or Header  |  1997-11-21  |  4.7 KB  |  224 lines

  1. #ifndef CLIB_NETLIB_PROTOS_H
  2. #define CLIB_NETLIB_PROTOS_H
  3. /*
  4. **      $Filename: clib/netlib_protos.h $
  5. **    $Release$
  6. **      $Revision: 3.9 $
  7. **      $Date: 1994/04/12 22:03:21 $
  8. **
  9. **    Prototypes for netlib utility functions
  10. **
  11. **    Copyright © 1993 AmiTCP/IP Group, <AmiTCP-Group@hut.fi>
  12. **                  Helsinki University of Technology, Finland.
  13. **                  All rights reserved.
  14. */
  15.  
  16. #ifndef EXEC_TYPES_H
  17. #include <exec/types.h>
  18. #endif
  19. #ifndef SYS_TYPES_H
  20. #include <sys/types.h>
  21. #endif
  22. #ifndef SYS_CDEFS_H
  23. #include <sys/cdefs.h>
  24. #endif
  25. #ifndef EXEC_LIBRARIES_H
  26. struct Library;
  27. #endif
  28. #ifndef SYS_TIME_H
  29. #include <sys/time.h>
  30. #endif
  31. #ifndef SYS_SOCKET_H
  32. #include <sys/socket.h>
  33. #endif
  34. #ifndef NETDB_H
  35. struct hostent;
  36. struct netent;
  37. struct servent;
  38. struct protoent;
  39. #endif
  40. #ifndef NETINET_IN_H
  41. #include <netinet/in.h>
  42. #endif
  43. #ifndef DOS_DOS_H
  44. #include <dos/dos.h>
  45. #endif
  46. #ifndef SYS_STAT_H
  47. #include <sys/stat.h>
  48. #endif
  49.  
  50. /* access.c */
  51. int __access(const char *name, int mode);
  52.  
  53. /* autoinit.c */
  54. extern int h_errno;
  55. extern struct Library *SocketBase;
  56. LONG __stdargs _STI_200_openSockets(void);
  57. void __stdargs _STD_200_closeSockets(void);
  58.  
  59. /* chmod.c */
  60. int chmod(const char *path, int mode);
  61.  
  62. /* chown.c */
  63. int chown(const char *name, uid_t uid, gid_t gid);
  64.  
  65. /* dostat.c */
  66. void __dostat(struct FileInfoBlock *fib, struct stat *st);
  67.  
  68. /* dummy.c */
  69. struct hostent  *gethostent(void);
  70. struct netent  *getnetent(void);
  71. struct servent  *getservent(void);
  72. struct protoent *getprotoent(void);
  73.  
  74. /* fhopen.c */
  75. int fhopen(long file, int mode);
  76.  
  77. /* fib.c */
  78. extern struct FileInfoBlock __dostat_fib[1];
  79.  
  80. /* getopt.c */
  81. extern int opterr;
  82. extern int optind;
  83. extern int optopt;
  84. extern char *optarg;
  85. int   getopt(int argc, char **argv, char *opts);
  86.  
  87. /* getpid.c */
  88. pid_t getpid(void);
  89.  
  90. /* gettimeofday.c */
  91. int   gettimeofday(struct timeval *tp, struct timezone *tzp);
  92.  
  93. /* herror.c */
  94. void  herror(const char *banner);
  95.  
  96. /* init_inet_daemon.c */
  97. int init_inet_daemon(void);
  98.  
  99. /* init_usergroup.c */
  100. extern struct Library *UserGroupBase;
  101. LONG __stdargs _STI_200_openUserGroup(void);
  102. void __stdargs _STDcloseUserGroup(void);
  103.  
  104. /* ioctl.c */
  105. int ioctl(int fd, unsigned int request, char *argp);
  106.  
  107. /* iomode.c */
  108. int iomode(int fd, int mode);
  109.  
  110. /* isatty.c */
  111. int isatty(int fd);
  112.  
  113. /* lineread.c */
  114. int   lineRead(struct LineRead * rl);
  115.  
  116. /* perror.c */
  117. void  perror(const char *banner);
  118.  
  119. /* popen.c */
  120. #ifndef _STDIO_H
  121. struct __iobuf; /* typedef struct __iobuf FILE */
  122. #endif
  123. struct __iobuf *popen(const char *cmd, const char *mode);
  124. struct __iobuf *popenl(const char *arg0, ...);
  125. int pclose(struct __iobuf *fptr);
  126. void __stdargs _STD_4000_popen(void);
  127. char *mktemp(char * template);
  128.  
  129. /* printfault.c */
  130. void  PrintNetFault(LONG code, const UBYTE *banner);
  131.  
  132. /* printuserfault.c */
  133. void  PrintUserFault(LONG code, const UBYTE *banner);
  134.  
  135. /* rcmd.c */
  136. int   rcmd(char **, int, const char *, const char *, const char *, int *);
  137. int   rresvport(int *alport);
  138.  
  139. /* serveraccept.c */
  140. long serveraccept(char *pname, struct sockaddr_in *ha);
  141.  
  142. /* set_socket_stdio.c */
  143. int set_socket_stdio(int sock);
  144.  
  145. /* setegid.c */
  146. int setegid(gid_t g);
  147.  
  148. /* seteuid.c */
  149. int seteuid(uid_t u);
  150.  
  151. /* sleep.c */
  152. void sleep(unsigned int secs);
  153.  
  154. /* stat.c */
  155. int stat(const char *name, struct stat *st);
  156.  
  157. /* strerror.c */
  158. char *strerror(int code);
  159.  
  160. /* stubs.c */
  161. #if !defined(__SASC) || !defined(_OPTINLINE) /* these are inlined for SAS/C */
  162. char * inet_ntoa(struct in_addr addr);
  163. struct in_addr inet_makeaddr(int net, int host);
  164. unsigned long inet_lnaof(struct in_addr addr);
  165. unsigned long inet_netof(struct in_addr addr);
  166. int select(int nfds, fd_set *readfds, fd_set *writefds, fd_set *exeptfds,
  167.        struct timeval *timeout);
  168. #endif
  169.  
  170. /* syslog.c */
  171. void  openlog(const char *ident, int logstat, int logfac);
  172. void  closelog(void);
  173. int   setlogmask(int pmask);
  174.  
  175. /* timerinit.c */
  176. extern long __local_to_GMT;
  177. extern struct Library *TimerBase; /* actually struct Device * */
  178. LONG __stdargs _STI_200_openTimer(void);
  179. void __stdargs _STD_200_closeTimer(void);
  180.  
  181. /* usleep.c */
  182. void usleep(unsigned int usecs);
  183.  
  184. /* utime.c */
  185. #ifndef UTIME_H
  186. struct utimbuf;
  187. #endif
  188. int utime(const char *name, const struct utimbuf *times);
  189.  
  190. #ifndef _IOS1_H
  191. struct UFB;
  192. #endif
  193.  
  194. /* _allocufb.c */
  195. struct UFB * __allocufb(int *fdp);
  196.  
  197. /* _chkufb.c */
  198. long __stdargs _STI_1000_install_AmiTCP_callback(void);
  199. long ASM SAVEDS fdCallback(REG(d0) int fd, REG(d1) int action);
  200. struct UFB * __chkufb(int fd);
  201.  
  202. /* _close.c */
  203. int __close(int fd);
  204.  
  205. /* _dup.c */
  206. /* _dup2.c */
  207.  
  208. /* _fstat.c */
  209. int fstat(int fd, struct stat *st);
  210.  
  211. /* _lseek.c */
  212. long __lseek(int fd, long rpos, int mode);
  213.  
  214. /* _open.c */
  215. __stdargs int __open(const char *name, int mode, ...);
  216.  
  217. /* _read.c */
  218. int __read(int fd, void *buffer, unsigned int length);
  219.  
  220. /* _write.c */
  221. int __write(int fd, const void *buffer, unsigned int length);
  222.  
  223. #endif /* !CLIB_NETLIB_PROTOS_H */
  224.