diff options
author | Lee Duncan <lduncan@suse.com> | 2021-08-27 13:20:23 -0700 |
---|---|---|
committer | Lee Duncan <lduncan@suse.com> | 2021-09-01 12:37:11 -0700 |
commit | d5df0d6149ff118351de25bae0fbf6f23df953d4 (patch) | |
tree | 45401fada5c9ff684a6f041b512d845ce17013dd /include | |
parent | 09b34121c443998ffe4df38084b19696bd3ef902 (diff) | |
download | open-iscsi-d5df0d6149ff118351de25bae0fbf6f23df953d4.tar.gz |
Change iscsi IP type from defines to enum.
This lets the compiler help us find errors, if any.
Change the declaration and usage to match. Simplify
the function that decides, while we are at it. Should
be no functional change.
Diffstat (limited to 'include')
-rw-r--r-- | include/iscsi_if.h | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/include/iscsi_if.h b/include/iscsi_if.h index 5a1c614..22b7c09 100644 --- a/include/iscsi_if.h +++ b/include/iscsi_if.h @@ -393,8 +393,11 @@ struct iscsi_path { #define ISCSI_IPV6_ROUTER_AUTOCFG_ENABLE 0x01 #define ISCSI_IPV6_ROUTER_AUTOCFG_DISABLE 0x02 -#define ISCSI_IFACE_TYPE_IPV4 0x01 -#define ISCSI_IFACE_TYPE_IPV6 0x02 +/* Interface IP Type */ +enum iscsi_iface_type { + ISCSI_IFACE_TYPE_IPV4 = 1, + ISCSI_IFACE_TYPE_IPV6, +}; #define ISCSI_MAX_VLAN_ID 4095 #define ISCSI_MAX_VLAN_PRIORITY 7 |