Merge from vendor branch OPENSSH:
[dragonfly.git] / sbin / rconfig / defs.h
1 /*
2  * DEFS.H
3  *
4  * $DragonFly: src/sbin/rconfig/defs.h,v 1.1 2004/06/18 02:46:46 dillon Exp $
5  */
6
7 #include <sys/types.h>
8 #include <sys/file.h>
9 #include <sys/stat.h>
10 #include <sys/ioctl.h>
11 #include <sys/socket.h>
12 #include <sys/sockio.h>
13 #include <sys/sysctl.h>
14 #include <sys/wait.h>
15
16 #include <net/ethernet.h>
17 #include <net/if.h>
18 #include <net/if_var.h>
19 #include <net/if_dl.h>
20 #include <net/if_types.h>
21 #include <net/route.h>
22
23 #include <netinet/in.h>
24 #include <netinet/in_var.h>
25 #include <arpa/inet.h>
26 #include <netdb.h>
27
28 #include <stdio.h>
29 #include <stdlib.h>
30 #include <stdarg.h>
31 #include <unistd.h>
32 #include <string.h>
33 #include <fcntl.h>
34 #include <errno.h>
35 #include <signal.h>
36
37 typedef struct tag {
38     struct tag *next;
39     const char *name;
40     int flags;
41 } *tag_t;
42
43 #define PAS_ALPHA       0x0001
44 #define PAS_NUMERIC     0x0002
45 #define PAS_ANY         0x0004
46
47 extern const char *TagDir;
48 extern const char *WorkDir;
49 extern const char *ConfigFiles;
50 extern tag_t AddrBase;
51 extern tag_t VarBase;
52 extern int VerboseOpt;
53
54 extern void doServer(void);
55 extern void doClient(void);
56
57 const char *parse_str(char **scanp, int flags);
58 int udp_transact(struct sockaddr_in *sain, struct sockaddr_in *rsin, int *pfd,
59                 char **bufp, int *lenp, const char *ctl, ...);
60 int tcp_transact(struct sockaddr_in *sain, FILE **pfi, FILE **pfo, char **bufp,
61                 int *lenp, const char *ctl, ...);
62
63