]> Kevux Git Server - fll/commitdiff
Update: Add F_network_version_four, F_network_version_four_not, F_network_version_six...
authorKevin Day <kevin@kevux.org>
Sun, 9 Jul 2023 16:33:16 +0000 (11:33 -0500)
committerKevin Day <kevin@kevux.org>
Sun, 9 Jul 2023 16:33:16 +0000 (11:33 -0500)
The IPv4 and IPv6 situation is common enough to merit explicit status codes.

level_0/f_status/c/status.h
level_0/f_status_string/c/status_string.c
level_0/f_status_string/c/status_string.h
level_0/f_status_string/tests/unit/c/test-status_string-to.c
level_1/fl_status_string/c/status_string.c
level_1/fl_status_string/tests/unit/c/test-status_string-from.c

index 7fa7b55c2d8d4acba9ae5a8bd9f16f3a9d433dac..dccfa6418f8e2116da3b9149087fc95dc3e0889e 100644 (file)
@@ -582,6 +582,10 @@ extern "C" {
       F_network_server_not,
       F_network_time,
       F_network_time_not,
+      F_network_version_four,
+      F_network_version_four_not,
+      F_network_version_six,
+      F_network_version_six_not,
     #endif // _di_f_status_network_e_
 
     #ifndef _di_f_status_number_e_
index 370f1fa38cf10ad83a91ef4126228fe5d8b2165d..6ee1e08fc09f3983dda020c66c3030e8c1cb5495 100644 (file)
@@ -456,6 +456,10 @@ extern "C" {
     const f_string_static_t f_status_network_server_not_s = macro_f_string_static_t_initialize_1(F_status_network_server_not_s, 0, F_status_network_server_not_s_length);
     const f_string_static_t f_status_network_time_s = macro_f_string_static_t_initialize_1(F_status_network_time_s, 0, F_status_network_time_s_length);
     const f_string_static_t f_status_network_time_not_s = macro_f_string_static_t_initialize_1(F_status_network_time_not_s, 0, F_status_network_time_not_s_length);
+    const f_string_static_t f_status_network_version_four_s = macro_f_string_static_t_initialize_1(F_status_network_version_four_s, 0, F_status_network_version_four_s_length);
+    const f_string_static_t f_status_network_version_four_not_s = macro_f_string_static_t_initialize_1(F_status_network_version_four_not_s, 0, F_status_network_version_four_not_s_length);
+    const f_string_static_t f_status_network_version_six_s = macro_f_string_static_t_initialize_1(F_status_network_version_six_s, 0, F_status_network_version_six_s_length);
+    const f_string_static_t f_status_network_version_six_not_s = macro_f_string_static_t_initialize_1(F_status_network_version_six_not_s, 0, F_status_network_version_six_not_s_length);
   #endif // _di_f_status_network_s_
 
   #ifndef _di_f_status_number_s_
@@ -2841,6 +2845,26 @@ extern "C" {
           *name = f_status_network_time_not_s;
 
           break;
+
+        case F_network_version_four:
+          *name = f_status_network_version_four_s;
+
+          break;
+
+        case F_network_version_four_not:
+          *name = f_status_network_version_four_not_s;
+
+          break;
+
+        case F_network_version_six:
+          *name = f_status_network_version_six_s;
+
+          break;
+
+        case F_network_version_six_not:
+          *name = f_status_network_version_six_not_s;
+
+          break;
       #endif // _di_f_status_network_s_
 
       #ifndef _di_f_status_number_s_
index 47a71dea0110671dd5c5648c7f365047f6d192d4..5be2fe11f64820efc9086cce22359ade0090a88d 100644 (file)
@@ -1303,6 +1303,10 @@ extern "C" {
     #define F_status_network_server_not_s       "F_network_server_not"
     #define F_status_network_time_s             "F_network_time"
     #define F_status_network_time_not_s         "F_network_time_not"
+    #define F_status_network_version_four_s     "F_network_version_four"
+    #define F_status_network_version_four_not_s "F_network_version_four_not"
+    #define F_status_network_version_six_s      "F_network_version_six"
+    #define F_status_network_version_six_not_s  "F_network_version_six_not"
 
     #define F_status_network_s_length                  9
     #define F_status_network_busy_s_length             14
@@ -1326,6 +1330,10 @@ extern "C" {
     #define F_status_network_server_not_s_length       20
     #define F_status_network_time_s_length             14
     #define F_status_network_time_not_s_length         18
+    #define F_status_network_version_four_s_length     22
+    #define F_status_network_version_four_not_s_length 26
+    #define F_status_network_version_six_s_length      21
+    #define F_status_network_version_six_not_s_length  25
 
     extern const f_string_static_t f_status_network_s;
     extern const f_string_static_t f_status_network_busy_s;
@@ -1349,6 +1357,10 @@ extern "C" {
     extern const f_string_static_t f_status_network_server_not_s;
     extern const f_string_static_t f_status_network_time_s;
     extern const f_string_static_t f_status_network_time_not_s;
+    extern const f_string_static_t f_status_network_version_four_s;
+    extern const f_string_static_t f_status_network_version_four_not_s;
+    extern const f_string_static_t f_status_network_version_six_s;
+    extern const f_string_static_t f_status_network_version_six_not_s;
   #endif // _di_f_status_network_s_
 
   #ifndef _di_f_status_number_s_
index 4b89db70e6cc9ab4e823558f46c35b374611a48f..6d7da0072e5d9ebc4c94409546376c911ee136e3 100644 (file)
@@ -459,6 +459,10 @@ void test__f_status_string_to__works(void **state) {
     F_network_server_not,
     F_network_time,
     F_network_time_not,
+    F_network_version_four,
+    F_network_version_four_not,
+    F_network_version_six,
+    F_network_version_six_not,
     F_number,
     F_number_decimal,
     F_number_decimal_not,
@@ -1075,6 +1079,10 @@ void test__f_status_string_to__works(void **state) {
     f_status_network_server_not_s,
     f_status_network_time_s,
     f_status_network_time_not_s,
+    f_status_network_version_four_s,
+    f_status_network_version_four_not_s,
+    f_status_network_version_six_s,
+    f_status_network_version_six_not_s,
     f_status_number_s,
     f_status_number_decimal_s,
     f_status_number_decimal_not_s,
@@ -1261,7 +1269,7 @@ void test__f_status_string_to__works(void **state) {
     f_status_status_code_last_s,
   };
 
-  for (uint16_t i = 0; i < 613; ++i) {
+  for (uint16_t i = 0; i < 617; ++i) {
 
     f_string_static_t result = f_string_static_t_initialize;
 
index 95900c9c8b9285e3191bebd757fe39937ead646a..9485b26a4630a97a1fed804beba955050a2795dc 100644 (file)
@@ -2606,6 +2606,30 @@ extern "C" {
 
         return F_none;
       }
+
+      if (f_compare_dynamic(name, f_status_network_version_four_s) == F_equal_to) {
+        *code = F_network_version_four;
+
+        return F_none;
+      }
+
+      if (f_compare_dynamic(name, f_status_network_version_four_not_s) == F_equal_to) {
+        *code = F_network_version_four_not;
+
+        return F_none;
+      }
+
+      if (f_compare_dynamic(name, f_status_network_version_six_s) == F_equal_to) {
+        *code = F_network_version_six;
+
+        return F_none;
+      }
+
+      if (f_compare_dynamic(name, f_status_network_version_six_not_s) == F_equal_to) {
+        *code = F_network_version_six_not;
+
+        return F_none;
+      }
     #endif // _di_f_status_network_s_
 
     #ifndef _di_f_status_number_s_
index f201747a0ecf39947bed0b6f292385c9acc93502..8e4f1fbf00c564b88909db64af2acdaaef8b713d 100644 (file)
@@ -475,6 +475,10 @@ void test__fl_status_string_from__works(void **state) {
     F_network_server_not,
     F_network_time,
     F_network_time_not,
+    F_network_version_four,
+    F_network_version_four_not,
+    F_network_version_six,
+    F_network_version_six_not,
     F_number,
     F_number_decimal,
     F_number_decimal_not,
@@ -1091,6 +1095,10 @@ void test__fl_status_string_from__works(void **state) {
     f_status_network_server_not_s,
     f_status_network_time_s,
     f_status_network_time_not_s,
+    f_status_network_version_four_s,
+    f_status_network_version_four_not_s,
+    f_status_network_version_six_s,
+    f_status_network_version_six_not_s,
     f_status_number_s,
     f_status_number_decimal_s,
     f_status_number_decimal_not_s,
@@ -1277,7 +1285,7 @@ void test__fl_status_string_from__works(void **state) {
     f_status_status_code_last_s,
   };
 
-  for (uint16_t i = 0; i < 613; ++i) {
+  for (uint16_t i = 0; i < 617; ++i) {
 
     f_status_t result = F_none;