]>
Commit | Line | Data |
---|---|---|
7064bbd9 MT |
1 | /* SmoothWall setup program. |
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 | * Main include file. | |
8 | * | |
9 | * $Id: setup.h,v 1.4 2003/12/11 11:25:54 riddles Exp $ | |
10 | * | |
11 | */ | |
12 | ||
e1457ba0 MT |
13 | #include <newt.h> |
14 | #include <libsmooth.h> | |
7064bbd9 MT |
15 | |
16 | /* hostname.c */ | |
17 | int handlehostname(void); | |
18 | ||
19 | /* domainname.c */ | |
20 | int handledomainname(void); | |
21 | ||
22 | /* networking.c */ | |
23 | int handlenetworking(void); | |
24 | ||
25 | /* dhcp.c */ | |
26 | int handledhcp(void); | |
27 | ||
28 | /* passwords.c */ | |
29 | int handlerootpassword(void); | |
30 | int handlesetuppassword(void); | |
31 | int handleadminpassword(void); | |
32 | ||
33 | /* misc.c */ | |
34 | int writehostsfiles(void); | |
7064bbd9 MT |
35 | |
36 | /* keymap.c */ | |
37 | int handlekeymap(void); | |
38 | ||
39 | /* timezone.c */ | |
40 | int handletimezone(void); | |
41 | ||
42 | /* netstuff.c */ | |
43 | #define ADDRESS 0 | |
44 | #define NETADDRESS 1 | |
45 | #define NETMASK 2 | |
46 | #define DHCP 3 | |
47 | #define NETCHANGE_TOTAL 4 | |
48 | ||
49 | #define SCANNED_NICS "/var/ipfire/ethernet/scanned_nics" | |
50 | #define SYSDIR "/sys/class/net" | |
51 | ||
52 | #define _GREEN_CARD_ 0 | |
53 | #define _RED_CARD_ 1 | |
54 | #define _ORANGE_CARD_ 2 | |
55 | #define _BLUE_CARD_ 3 | |
56 | ||
46ce813e MT |
57 | #define MAX_NICS 20 |
58 | ||
7064bbd9 MT |
59 | struct nic |
60 | { | |
61 | char driver[80]; | |
62 | char description[256]; | |
63 | char macaddr[20]; | |
64 | char nic[20]; | |
65 | }; | |
66 | ||
67 | struct knic | |
68 | { | |
69 | char driver[80]; | |
70 | char description[256]; | |
71 | char macaddr[20]; | |
72 | char colour[20]; | |
73 | }; | |
74 | ||
75 | int changeaddress(struct keyvalue *kv, char *colour, int typeflag, | |
76 | char *defaultdhcphostname); | |
77 | int gettype(char *type); | |
78 | int setnetaddress(struct keyvalue *kv, char *colour); | |
79 | void networkdialogcallbacktype(newtComponent cm, void *data); | |
80 | int interfacecheck(struct keyvalue *kv, char *colour); | |
81 | int rename_nics(void); | |
82 | int init_knics(void); | |
7064bbd9 MT |
83 | int scan_network_cards(void); |
84 | int nicmenu(int colour); | |
85 | int clear_card_entry(int cards); | |
86 | int ask_clear_card_entry(int cards); | |
87 | int manualdriver(char *driver, char *driveroptions); |