]> git.ipfire.org Git - ipfire-2.x.git/blame - src/install+setup/libsmooth/libsmooth.h
Der Oinkmaster für Snort ist nun erstmal unter /etc/snort/oinkmaster2.0 abgelegt
[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 *
b4e381a8
MT
9 */
10
11#ifndef ___LIBSMOOTH_H
12#define ___LIBSMOOTH_H
13
14#include <stdio.h>
15#include <stdlib.h>
16#include <string.h>
17#include <ctype.h>
18#include <wchar.h>
19#include <locale.h>
20#include <unistd.h>
21#include <sys/file.h>
22#include <sys/types.h>
23#include <sys/stat.h>
24#include <fcntl.h>
25#include <newt.h>
26#include <dirent.h>
27#include <sys/mount.h>
28
29#include <sys/socket.h>
30#include <netinet/in.h>
31#include <arpa/inet.h>
32
33#include <linux/cdrom.h>
34#include <sys/ioctl.h>
35
36#include "langs.h"
37
38#define STRING_SIZE 1023
39
40#define ADDRESS 0
41#define NETADDRESS 1
42#define NETMASK 2
43#define DHCP 3
44#define NETCHANGE_TOTAL 4
45
75ae2191
MT
46#define KNOWN_NICS "/var/ipfire/ethernet/known_nics"
47#define SCANNED_NICS "/var/ipfire/ethernet/scanned_nics"
48
b4e381a8
MT
49struct keyvalue
50{
51 char key[STRING_SIZE];
52 char value[STRING_SIZE];
53 struct keyvalue *next;
54};
b4e381a8
MT
55struct nic
56{
75ae2191
MT
57 char description[256];
58 char macaddr[20];
b4e381a8 59};
75ae2191 60struct knic
b4e381a8 61{
75ae2191
MT
62 char description[256];
63 char macaddr[20];
b4e381a8
MT
64};
65
66/* libsmooth.c */
67void reboot(void);
68void stripnl(char *s);
69int mysystem(char *command);
70void errorbox(char *message);
71void statuswindow(int width, int height, char *title, char *text, ...);
72int runcommandwithprogress(int width, int height, char *title, char *command,
73 int lines, char *text, ...);
74int runcommandwithstatus(char *command, char *message);
75int runhiddencommandwithstatus(char *command, char *message);
76int checkformodule(char *module);
77int replace(char filename1[], char *from, char *to);
78char* get_version(void);
79
80/* netstuff.c */
81int changeaddress(struct keyvalue *kv, char *colour, int typeflag,
82 char *defaultdhcphostname);
83int gettype(char *type);
84int setnetaddress(struct keyvalue *kv, char *colour);
85void networkdialogcallbacktype(newtComponent cm, void *data);
86int interfacecheck(struct keyvalue *kv, char *colour);
75ae2191 87int nicmenu(char *colour);
b4e381a8 88int manualdriver(char *driver, char *driveroptions);
b4e381a8
MT
89
90/* data.c */
91struct keyvalue *initkeyvalues(void);
92void freekeyvalues(struct keyvalue *head);
93int readkeyvalues(struct keyvalue *head, char *filename);
94int writekeyvalues(struct keyvalue *head, char *filename);
95int findkey(struct keyvalue *head, char *key, char *value);
96void appendkeyvalue(struct keyvalue *head, char *key, char *value);
97void replacekeyvalue(struct keyvalue *head, char *key, char *value);
98
99#endif
100