]> git.ipfire.org Git - people/teissler/ipfire-2.x.git/blame - src/install+setup/libsmooth/libsmooth.h
Neue Netzwerkdialoge sind zum ersten Test verfuegbar.
[people/teissler/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
5057b611
HS
49#define _GREEN_CARD_ 0
50#define _RED_CARD_ 1
51#define _ORANGE_CARD_ 2
52#define _BLUE_CARD_ 3
53
b4e381a8
MT
54struct keyvalue
55{
56 char key[STRING_SIZE];
57 char value[STRING_SIZE];
58 struct keyvalue *next;
59};
b4e381a8
MT
60struct nic
61{
75ae2191
MT
62 char description[256];
63 char macaddr[20];
b4e381a8 64};
5057b611 65
75ae2191 66struct knic
b4e381a8 67{
75ae2191
MT
68 char description[256];
69 char macaddr[20];
5057b611 70 char colour[20];
b4e381a8
MT
71};
72
5057b611 73
b4e381a8
MT
74/* libsmooth.c */
75void reboot(void);
76void stripnl(char *s);
77int mysystem(char *command);
78void errorbox(char *message);
79void statuswindow(int width, int height, char *title, char *text, ...);
80int runcommandwithprogress(int width, int height, char *title, char *command,
81 int lines, char *text, ...);
82int runcommandwithstatus(char *command, char *message);
83int runhiddencommandwithstatus(char *command, char *message);
84int checkformodule(char *module);
85int replace(char filename1[], char *from, char *to);
86char* get_version(void);
87
88/* netstuff.c */
89int changeaddress(struct keyvalue *kv, char *colour, int typeflag,
90 char *defaultdhcphostname);
91int gettype(char *type);
92int setnetaddress(struct keyvalue *kv, char *colour);
93void networkdialogcallbacktype(newtComponent cm, void *data);
94int interfacecheck(struct keyvalue *kv, char *colour);
5057b611 95int scan_network_cards(void);
75ae2191 96int nicmenu(char *colour);
5057b611 97int remove_nic_entry(char *colour);
b4e381a8 98int manualdriver(char *driver, char *driveroptions);
b4e381a8
MT
99
100/* data.c */
101struct keyvalue *initkeyvalues(void);
102void freekeyvalues(struct keyvalue *head);
103int readkeyvalues(struct keyvalue *head, char *filename);
104int writekeyvalues(struct keyvalue *head, char *filename);
105int findkey(struct keyvalue *head, char *key, char *value);
106void appendkeyvalue(struct keyvalue *head, char *key, char *value);
107void replacekeyvalue(struct keyvalue *head, char *key, char *value);
108
109#endif
110