]>
git.ipfire.org Git - people/teissler/ipfire-2.x.git/blob - src/install+setup/libsmooth/libsmooth.h
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"
47 #define SYSDIR "/sys/class/net"
49 #define _GREEN_CARD_ 0
51 #define _ORANGE_CARD_ 2
56 char key
[STRING_SIZE
];
57 char value
[STRING_SIZE
];
58 struct keyvalue
*next
;
63 char description
[256];
71 char description
[256];
79 void stripnl(char *s
);
80 int mysystem(char *command
);
81 void errorbox(char *message
);
82 int statuswindowscroll(int width
, int height
, char *title
, char *text
, ...);
83 int disclaimerbox(char *message
);
84 void statuswindow(int width
, int height
, char *title
, char *text
, ...);
85 int runcommandwithprogress(int width
, int height
, char *title
, char *command
,
86 int lines
, char *text
, ...);
87 int runcommandwithstatus(char *command
, char *message
);
88 int runhiddencommandwithstatus(char *command
, char *message
);
89 int checkformodule(char *module
);
90 int replace(char filename1
[], char *from
, char *to
);
91 char* get_version(void);
94 int changeaddress(struct keyvalue
*kv
, char *colour
, int typeflag
,
95 char *defaultdhcphostname
);
96 int gettype(char *type
);
97 int setnetaddress(struct keyvalue
*kv
, char *colour
);
98 void networkdialogcallbacktype(newtComponent cm
, void *data
);
99 int interfacecheck(struct keyvalue
*kv
, char *colour
);
100 int rename_nics(void);
101 int init_knics(void);
102 int create_udev(void);
103 int scan_network_cards(void);
104 int nicmenu(int colour
);
105 int clear_card_entry(int cards
);
106 int ask_clear_card_entry(int cards
);
107 int manualdriver(char *driver
, char *driveroptions
);
110 struct keyvalue
*initkeyvalues(void);
111 void freekeyvalues(struct keyvalue
*head
);
112 int readkeyvalues(struct keyvalue
*head
, char *filename
);
113 int writekeyvalues(struct keyvalue
*head
, char *filename
);
114 int findkey(struct keyvalue
*head
, char *key
, char *value
);
115 void appendkeyvalue(struct keyvalue
*head
, char *key
, char *value
);
116 void replacekeyvalue(struct keyvalue
*head
, char *key
, char *value
);