]>
git.ipfire.org Git - people/pmueller/ipfire-2.x.git/blob - src/install+setup/libsmooth/libsmooth.h
85c4dad1db65f8469ab3262e18c43ba9200cf527
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 SCANNED_NICS "/var/ipfire/ethernet/scanned_nics"
48 #define _GREEN_CARD_ 0
50 #define _ORANGE_CARD_ 2
55 char key
[STRING_SIZE
];
56 char value
[STRING_SIZE
];
57 struct keyvalue
*next
;
62 char description
[256];
69 char description
[256];
77 void stripnl(char *s
);
78 int mysystem(char *command
);
79 void errorbox(char *message
);
80 void statuswindow(int width
, int height
, char *title
, char *text
, ...);
81 int runcommandwithprogress(int width
, int height
, char *title
, char *command
,
82 int lines
, char *text
, ...);
83 int runcommandwithstatus(char *command
, char *message
);
84 int runhiddencommandwithstatus(char *command
, char *message
);
85 int checkformodule(char *module
);
86 int replace(char filename1
[], char *from
, char *to
);
87 char* get_version(void);
90 int changeaddress(struct keyvalue
*kv
, char *colour
, int typeflag
,
91 char *defaultdhcphostname
);
92 int gettype(char *type
);
93 int setnetaddress(struct keyvalue
*kv
, char *colour
);
94 void networkdialogcallbacktype(newtComponent cm
, void *data
);
95 int interfacecheck(struct keyvalue
*kv
, char *colour
);
97 int create_udev(void);
98 int scan_network_cards(void);
99 int nicmenu(int colour
);
100 int clear_card_entry(int cards
);
101 int ask_clear_card_entry(int cards
);
102 int manualdriver(char *driver
, char *driveroptions
);
105 struct keyvalue
*initkeyvalues(void);
106 void freekeyvalues(struct keyvalue
*head
);
107 int readkeyvalues(struct keyvalue
*head
, char *filename
);
108 int writekeyvalues(struct keyvalue
*head
, char *filename
);
109 int findkey(struct keyvalue
*head
, char *key
, char *value
);
110 void appendkeyvalue(struct keyvalue
*head
, char *key
, char *value
);
111 void replacekeyvalue(struct keyvalue
*head
, char *key
, char *value
);