]> git.ipfire.org Git - people/teissler/ipfire-2.x.git/blobdiff - src/install+setup/libsmooth/libsmooth.h
misc-progs: Sync STRING_SIZE.
[people/teissler/ipfire-2.x.git] / src / install+setup / libsmooth / libsmooth.h
index 22d0b073b05bc4984a53baa4767853e70ad9f8fa..fc166b221c57d4a2df44e6e6ffacdd3eef6a887b 100644 (file)
@@ -6,8 +6,6 @@
  * (c) Lawrence Manning, 2001
  * Contains prototypes for library functions.
  * 
  * (c) Lawrence Manning, 2001
  * Contains prototypes for library functions.
  * 
- * $Id: libsmooth.h,v 1.4.2.3 2005/10/30 23:25:35 franck78 Exp $
- * 
  */
 
 #ifndef ___LIBSMOOTH_H
  */
 
 #ifndef ___LIBSMOOTH_H
@@ -37,7 +35,7 @@
 
 #include "langs.h"
 
 
 #include "langs.h"
 
-#define STRING_SIZE 1023
+#define STRING_SIZE 1024
 
 #define ADDRESS 0
 #define NETADDRESS 1
 
 #define ADDRESS 0
 #define NETADDRESS 1
 #define DHCP 3
 #define NETCHANGE_TOTAL 4
 
 #define DHCP 3
 #define NETCHANGE_TOTAL 4
 
+#define SCANNED_NICS "/var/ipfire/ethernet/scanned_nics"
+#define SYSDIR "/sys/class/net"
+
+#define _GREEN_CARD_ 0
+#define _RED_CARD_ 1
+#define _ORANGE_CARD_ 2
+#define _BLUE_CARD_ 3
+
 struct keyvalue
 {
        char key[STRING_SIZE];
        char value[STRING_SIZE];
        struct keyvalue *next;  
 };
 struct keyvalue
 {
        char key[STRING_SIZE];
        char value[STRING_SIZE];
        struct keyvalue *next;  
 };
-
-/* for stuff in net.c */
 struct nic
 {
 struct nic
 {
-       char *description;
-       char *modulename;
+       char driver[80];
+       char description[256];
+       char macaddr[20];
+       char nic[20];
 };
 };
-struct driver
+
+struct knic
 {
 {
-       char *description;
-       char *modulename;
+       char driver[80];
+       char description[256];
+       char macaddr[20];
+       char colour[20];
 };
 
 };
 
+
 /* libsmooth.c */
 void reboot(void);
 void stripnl(char *s);
 int mysystem(char *command);
 void errorbox(char *message);
 /* libsmooth.c */
 void reboot(void);
 void stripnl(char *s);
 int mysystem(char *command);
 void errorbox(char *message);
+int statuswindowscroll(int width, int height, char *title, char *text, ...);
+int disclaimerbox(char *message);
 void statuswindow(int width, int height, char *title, char *text, ...);
 int runcommandwithprogress(int width, int height, char *title, char *command,
        int lines, char *text, ...);
 void statuswindow(int width, int height, char *title, char *text, ...);
 int runcommandwithprogress(int width, int height, char *title, char *command,
        int lines, char *text, ...);
@@ -85,13 +97,16 @@ int gettype(char *type);
 int setnetaddress(struct keyvalue *kv, char *colour);
 void networkdialogcallbacktype(newtComponent cm, void *data);
 int interfacecheck(struct keyvalue *kv, char *colour);
 int setnetaddress(struct keyvalue *kv, char *colour);
 void networkdialogcallbacktype(newtComponent cm, void *data);
 int interfacecheck(struct keyvalue *kv, char *colour);
-int probecards(char *driver, char *driveroptions);
-int choosecards(char *driver, char *driveroptions);
+int rename_nics(void);
+int init_knics(void);
+int create_udev(void);
+int scan_network_cards(void);
+int nicmenu(int colour);
+int clear_card_entry(int cards);
+int ask_clear_card_entry(int cards);
 int manualdriver(char *driver, char *driveroptions);
 int manualdriver(char *driver, char *driveroptions);
-int countcards(void);
-int findnicdescription(char *modulename, char *description);
          
          
-/* data.c */
+/* varval.c */
 struct keyvalue *initkeyvalues(void);
 void freekeyvalues(struct keyvalue *head);
 int readkeyvalues(struct keyvalue *head, char *filename);
 struct keyvalue *initkeyvalues(void);
 void freekeyvalues(struct keyvalue *head);
 int readkeyvalues(struct keyvalue *head, char *filename);