]>
Commit | Line | Data |
---|---|---|
cd1a2927 MT |
1 | /* SmoothWall libsmooth.\r |
2 | *\r | |
3 | * This program is distributed under the terms of the GNU General Public\r | |
4 | * Licence. See the file COPYING for details.\r | |
5 | *\r | |
6 | * (c) Lawrence Manning, 2001\r | |
7 | * Contains prototypes for library functions.\r | |
8 | * \r | |
9 | * $Id: libsmooth.h,v 1.4.2.3 2005/10/30 23:25:35 franck78 Exp $\r | |
10 | * \r | |
11 | */\r | |
12 | \r | |
13 | #ifndef ___LIBSMOOTH_H\r | |
14 | #define ___LIBSMOOTH_H\r | |
15 | \r | |
16 | #include <stdio.h>\r | |
17 | #include <stdlib.h>\r | |
18 | #include <string.h>\r | |
19 | #include <ctype.h>\r | |
20 | #include <wchar.h>\r | |
21 | #include <locale.h>\r | |
22 | #include <unistd.h>\r | |
23 | #include <sys/file.h>\r | |
24 | #include <sys/types.h>\r | |
25 | #include <sys/stat.h>\r | |
26 | #include <fcntl.h>\r | |
27 | #include <newt.h>\r | |
28 | #include <dirent.h>\r | |
29 | #include <sys/mount.h>\r | |
30 | \r | |
31 | #include <sys/socket.h>\r | |
32 | #include <netinet/in.h>\r | |
33 | #include <arpa/inet.h>\r | |
34 | \r | |
35 | #include <linux/cdrom.h>\r | |
36 | #include <sys/ioctl.h>\r | |
37 | \r | |
38 | #include "langs.h"\r | |
39 | \r | |
40 | #define STRING_SIZE 1023\r | |
41 | \r | |
42 | #define ADDRESS 0\r | |
43 | #define NETADDRESS 1\r | |
44 | #define NETMASK 2\r | |
45 | #define DHCP 3\r | |
46 | #define NETCHANGE_TOTAL 4\r | |
47 | \r | |
48 | struct keyvalue\r | |
49 | {\r | |
50 | char key[STRING_SIZE];\r | |
51 | char value[STRING_SIZE];\r | |
52 | struct keyvalue *next; \r | |
53 | };\r | |
54 | \r | |
55 | /* for stuff in net.c */\r | |
56 | struct nic\r | |
57 | {\r | |
58 | char *description;\r | |
59 | char *modulename;\r | |
60 | };\r | |
61 | \r | |
62 | /* libsmooth.c */\r | |
63 | void reboot(void);\r | |
64 | void stripnl(char *s);\r | |
65 | int mysystem(char *command);\r | |
66 | void errorbox(char *message);\r | |
67 | void statuswindow(int width, int height, char *title, char *text, ...);\r | |
68 | int runcommandwithprogress(int width, int height, char *title, char *command,\r | |
69 | int lines, char *text, ...);\r | |
70 | int runcommandwithstatus(char *command, char *message);\r | |
71 | int runhiddencommandwithstatus(char *command, char *message);\r | |
72 | int checkformodule(char *module); \r | |
73 | int replace(char filename1[], char *from, char *to);\r | |
74 | char* get_version(void);\r | |
75 | \r | |
76 | /* netstuff.c */\r | |
77 | int changeaddress(struct keyvalue *kv, char *colour, int typeflag,\r | |
78 | char *defaultdhcphostname);\r | |
79 | int gettype(char *type);\r | |
80 | int setnetaddress(struct keyvalue *kv, char *colour);\r | |
81 | void networkdialogcallbacktype(newtComponent cm, void *data);\r | |
82 | int interfacecheck(struct keyvalue *kv, char *colour);\r | |
83 | int probecards(char *driver, char *driveroptions);\r | |
84 | int choosecards(char *driver, char *driveroptions);\r | |
85 | int manualdriver(char *driver, char *driveroptions);\r | |
86 | int countcards(void);\r | |
87 | int findnicdescription(char *modulename, char *description);\r | |
88 | \r | |
89 | /* data.c */\r | |
90 | struct keyvalue *initkeyvalues(void);\r | |
91 | void freekeyvalues(struct keyvalue *head);\r | |
92 | int readkeyvalues(struct keyvalue *head, char *filename);\r | |
93 | int writekeyvalues(struct keyvalue *head, char *filename);\r | |
94 | int findkey(struct keyvalue *head, char *key, char *value);\r | |
95 | void appendkeyvalue(struct keyvalue *head, char *key, char *value);\r | |
96 | void replacekeyvalue(struct keyvalue *head, char *key, char *value);\r | |
97 | \r | |
98 | #endif\r | |
99 | \r |