-/* Attempts to parse 's' as the name of a bond link status detection mode. If
- * successful, stores the mode in '*detect' and returns true. Otherwise
- * returns false without modifying '*detect'. */
-bool
-bond_detect_mode_from_string(enum bond_detect_mode *detect, const char *s)
-{
- if (!strcmp(s, bond_detect_mode_to_string(BLSM_CARRIER))) {
- *detect = BLSM_CARRIER;
- } else if (!strcmp(s, bond_detect_mode_to_string(BLSM_MIIMON))) {
- *detect = BLSM_MIIMON;
- } else {
- return false;
- }
- return true;
-}
-
-/* Returns a string representing 'detect'. */
-const char *
-bond_detect_mode_to_string(enum bond_detect_mode detect)
-{
- switch (detect) {
- case BLSM_CARRIER:
- return "carrier";
- case BLSM_MIIMON:
- return "miimon";
- }
- NOT_REACHED();
-}