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