]>
git.ipfire.org Git - people/pmueller/ipfire-2.x.git/blob - src/install+setup/libsmooth/libsmooth.h
e48db18366a6ef164e8be194244d20be64f103d6
1 /* SmoothWall libsmooth.
3 * This program is distributed under the terms of the GNU General Public
4 * Licence. See the file COPYING for details.
6 * (c) Lawrence Manning, 2001
7 * Contains prototypes for library functions.
11 #ifndef ___LIBSMOOTH_H
12 #define ___LIBSMOOTH_H
22 #include <sys/types.h>
27 #include <sys/mount.h>
29 #include <sys/socket.h>
30 #include <netinet/in.h>
31 #include <arpa/inet.h>
33 #include <linux/cdrom.h>
34 #include <sys/ioctl.h>
38 #define STRING_SIZE 1023
44 #define NETCHANGE_TOTAL 4
46 #define KNOWN_NICS "/var/ipfire/ethernet/known_nics"
47 #define SCANNED_NICS "/var/ipfire/ethernet/scanned_nics"
49 #define _GREEN_CARD_ 0
51 #define _ORANGE_CARD_ 2
56 char key
[STRING_SIZE
];
57 char value
[STRING_SIZE
];
58 struct keyvalue
*next
;
62 char description
[256];
68 char description
[256];
76 void stripnl(char *s
);
77 int mysystem(char *command
);
78 void errorbox(char *message
);
79 void statuswindow(int width
, int height
, char *title
, char *text
, ...);
80 int runcommandwithprogress(int width
, int height
, char *title
, char *command
,
81 int lines
, char *text
, ...);
82 int runcommandwithstatus(char *command
, char *message
);
83 int runhiddencommandwithstatus(char *command
, char *message
);
84 int checkformodule(char *module
);
85 int replace(char filename1
[], char *from
, char *to
);
86 char* get_version(void);
89 int changeaddress(struct keyvalue
*kv
, char *colour
, int typeflag
,
90 char *defaultdhcphostname
);
91 int gettype(char *type
);
92 int setnetaddress(struct keyvalue
*kv
, char *colour
);
93 void networkdialogcallbacktype(newtComponent cm
, void *data
);
94 int interfacecheck(struct keyvalue
*kv
, char *colour
);
95 int scan_network_cards(void);
96 int nicmenu(char *colour
);
97 int remove_nic_entry(char *colour
);
98 int manualdriver(char *driver
, char *driveroptions
);
101 struct keyvalue
*initkeyvalues(void);
102 void freekeyvalues(struct keyvalue
*head
);
103 int readkeyvalues(struct keyvalue
*head
, char *filename
);
104 int writekeyvalues(struct keyvalue
*head
, char *filename
);
105 int findkey(struct keyvalue
*head
, char *key
, char *value
);
106 void appendkeyvalue(struct keyvalue
*head
, char *key
, char *value
);
107 void replacekeyvalue(struct keyvalue
*head
, char *key
, char *value
);