]> git.ipfire.org Git - ipfire-2.x.git/blame - src/install+setup/libsmooth/libsmooth.h
Kleiner PXE Fix.
[ipfire-2.x.git] / src / install+setup / libsmooth / libsmooth.h
CommitLineData
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
48struct 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
56struct nic\r
57{\r
58 char *description;\r
59 char *modulename;\r
60};\r
61\r
62/* libsmooth.c */\r
63void reboot(void);\r
64void stripnl(char *s);\r
65int mysystem(char *command);\r
66void errorbox(char *message);\r
67void statuswindow(int width, int height, char *title, char *text, ...);\r
68int runcommandwithprogress(int width, int height, char *title, char *command,\r
69 int lines, char *text, ...);\r
70int runcommandwithstatus(char *command, char *message);\r
71int runhiddencommandwithstatus(char *command, char *message);\r
72int checkformodule(char *module); \r
73int replace(char filename1[], char *from, char *to);\r
74char* get_version(void);\r
75 \r
76/* netstuff.c */\r
77int changeaddress(struct keyvalue *kv, char *colour, int typeflag,\r
78 char *defaultdhcphostname);\r
79int gettype(char *type);\r
80int setnetaddress(struct keyvalue *kv, char *colour);\r
81void networkdialogcallbacktype(newtComponent cm, void *data);\r
82int interfacecheck(struct keyvalue *kv, char *colour);\r
83int probecards(char *driver, char *driveroptions);\r
84int choosecards(char *driver, char *driveroptions);\r
85int manualdriver(char *driver, char *driveroptions);\r
86int countcards(void);\r
87int findnicdescription(char *modulename, char *description);\r
88 \r
89/* data.c */\r
90struct keyvalue *initkeyvalues(void);\r
91void freekeyvalues(struct keyvalue *head);\r
92int readkeyvalues(struct keyvalue *head, char *filename);\r
93int writekeyvalues(struct keyvalue *head, char *filename);\r
94int findkey(struct keyvalue *head, char *key, char *value);\r
95void appendkeyvalue(struct keyvalue *head, char *key, char *value);\r
96void replacekeyvalue(struct keyvalue *head, char *key, char *value);\r
97\r
98#endif\r
99\r