1 #ifndef CLIB_NETLIB_PROTOS_H
2 #define CLIB_NETLIB_PROTOS_H
4 ** $Filename: clib/netlib_protos.h $
9 ** Prototypes for netlib utility functions
11 ** Copyright © 1993 AmiTCP/IP Group, <AmiTCP-Group@hut.fi>
12 ** Helsinki University of Technology, Finland.
13 ** All rights reserved.
14 ** Copyright © 2005 Pavel Fedin
18 #include <exec/types.h>
21 #include <sys/types.h>
24 #include <sys/cdefs.h>
26 #ifndef EXEC_LIBRARIES_H
33 #include <sys/socket.h>
42 #include <netinet/in.h>
50 //#include <lineread.h>
54 int chmod(const char *path
, mode_t mode
);
57 int chown(const char *name
, uid_t uid
, gid_t gid
);
60 struct netent
*getnetent(void);
61 struct servent
*getservent(void);
68 int getopt(int argc
, char * const *argv
, const char *opts
);
71 int gettimeofday(struct timeval
*tp
, struct timezone
*tzp
);
74 void herror(const char *banner
);
76 /* init_inet_daemon.c */
77 int init_inet_daemon(void);
80 int ioctl(int fd
, unsigned int request
, char *argp
);
83 int iomode(int fd
, int mode
);
89 int lineRead(struct LineRead
* rl
);
92 void perror(const char *banner
);
95 FILE *popen(const char *cmd
, const char *mode
);
96 FILE *popenl(const char *arg0
, ...);
97 int pclose(FILE *fptr
);
98 char *mktemp(char * template);
101 void PrintNetFault(LONG code
, const UBYTE
*banner
);
103 /* printuserfault.c */
104 void PrintUserFault(LONG code
, const UBYTE
*banner
);
107 int rcmd(char **, int, const char *, const char *, const char *, int *);
108 int rresvport(int *alport
);
111 long serveraccept(char *pname
, struct sockaddr_in
*ha
);
113 /* set_socket_stdio.c */
114 int set_socket_stdio(int sock
);
117 int setegid(gid_t g
);
120 int seteuid(uid_t u
);
123 unsigned sleep(unsigned secs
);
126 int stat(const char *name
, struct stat
*st
);
129 char *strerror(int code
);
133 char * inet_ntoa(struct in_addr addr
);
135 #ifndef inet_makeaddr
136 struct in_addr
inet_makeaddr(int net
, int host
);
139 unsigned long inet_lnaof(struct in_addr addr
);
142 unsigned long inet_netof(struct in_addr addr
);
145 int select(int nfds
, fd_set
*readfds
, fd_set
*writefds
, fd_set
*exeptfds
,
146 struct timeval
*timeout
);
155 void openlog(const char *ident
, int logstat
, int logfac
);
157 int setlogmask(int pmask
);
160 extern long __local_to_GMT
;
163 void usleep(unsigned int usecs
);
169 int utime(const char *name
, const struct utimbuf
*times
);
172 int asprintf(char **ret
, const char *format
, ...);
175 int vasprintf(char **ret
, const char *format
, va_list ap
);
178 void verrc(int eval
, int code
, const char *fmt
, va_list ap
) __attribute__((noreturn
));
179 void vwarnc(int code
, const char *fmt
, va_list ap
);
190 int __access(const char *name
, int mode
);
193 void __dostat(struct FileInfoBlock
*fib
, struct stat
*st
);
196 int fhopen(long file
, int mode
);
199 extern struct FileInfoBlock __dostat_fib
[1];
202 int fstat(int fd
, struct stat
*st
);
205 long __lseek(int fd
, long rpos
, int mode
);
208 int __open(const char *name
, int mode
, ...);
211 int __read(int fd
, void *buffer
, unsigned int length
);
214 int __write(int fd
, const void *buffer
, unsigned int length
);
218 #endif /* !CLIB_NETLIB_PROTOS_H */