]>
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 void statuswindow(int width
, int height
, char *title
, char *text
, ...);
83 int runcommandwithprogress(int width
, int height
, char *title
, char *command
,
84 int lines
, char *text
, ...);
85 int runcommandwithstatus(char *command
, char *message
);
86 int runhiddencommandwithstatus(char *command
, char *message
);
87 int checkformodule(char *module
);
88 int replace(char filename1
[], char *from
, char *to
);
89 char* get_version(void);
92 int changeaddress(struct keyvalue
*kv
, char *colour
, int typeflag
,
93 char *defaultdhcphostname
);
94 int gettype(char *type
);
95 int setnetaddress(struct keyvalue
*kv
, char *colour
);
96 void networkdialogcallbacktype(newtComponent cm
, void *data
);
97 int interfacecheck(struct keyvalue
*kv
, char *colour
);
98 int rename_nics(void);
100 int create_udev(void);
101 int scan_network_cards(void);
102 int nicmenu(int colour
);
103 int clear_card_entry(int cards
);
104 int ask_clear_card_entry(int cards
);
105 int manualdriver(char *driver
, char *driveroptions
);
108 struct keyvalue
*initkeyvalues(void);
109 void freekeyvalues(struct keyvalue
*head
);
110 int readkeyvalues(struct keyvalue
*head
, char *filename
);
111 int writekeyvalues(struct keyvalue
*head
, char *filename
);
112 int findkey(struct keyvalue
*head
, char *key
, char *value
);
113 void appendkeyvalue(struct keyvalue
*head
, char *key
, char *value
);
114 void replacekeyvalue(struct keyvalue
*head
, char *key
, char *value
);