]> git.sur5r.net Git - ngadmin/blobdiff - lib/include/ngadmin.h
Factorize string related functions
[ngadmin] / lib / include / ngadmin.h
index 49dc761cd2edbac0798cbf69c174651620e78441..50fffa9684b3bb0017b62e65319c1039d6e09286 100644 (file)
@@ -63,9 +63,11 @@ enum {
 enum {
        SPEED_UNK = -1,                 /**< unknown status */
        SPEED_DOWN = 0,                 /**< link down */
-       SPEED_10 = 1,                   /**< 10 Mb/s */
-       SPEED_100 = 4,                  /**< 100 Mb/s */
-       SPEED_1000 = 5                  /**< 1000 Mb/s */
+       SPEED_10_HD = 1,                /**< 10 Mb/s half duplex */
+       SPEED_10_FD = 2,                /**< 10 Mb/s full duplex */
+       SPEED_100_HD = 3,               /**< 100 Mb/s half duplex */
+       SPEED_100_FD = 4,               /**< 100 Mb/s full duplex */
+       SPEED_1000_FD = 5               /**< 1000 Mb/s full duplex */
 };
 
 
@@ -244,6 +246,15 @@ extern "C" {
 struct ngadmin* ngadmin_init (const char *iface);
 
 
+/**
+ * Convert error to string.
+ * This function returns a string corresponding to the numerical error code.
+ * @param error The numerical error code to convert.
+ * @return A pointer to a static string or NULL if the error code is invalid.
+ */
+const char* ngadmin_errorStr (int error);
+
+
 /**
  * Close NgAdmin library. 
  * This function frees the resources used by the library. You really should