diff options
author | Hannes Reinecke <hare@suse.de> | 2014-11-14 11:19:10 -0800 |
---|---|---|
committer | Mike Christie <michaelc@cs.wisc.edu> | 2014-11-14 14:12:05 -0600 |
commit | 4959a89f421fdebc521f48003a79c2161e59d192 (patch) | |
tree | bf42b9b79e32e3b63089ce5f04b2c32807c95188 /include | |
parent | a125761c7b306ebc3aa1df3539cd4052dcfd59ca (diff) | |
download | open-iscsi-4959a89f421fdebc521f48003a79c2161e59d192.tar.gz |
Represent DHCP "origin" as an enum, not a string.
See IBFT standard for location of "origin" field in iBFT table,
and see MS document: http://msdn.microsoft.com/en-us/library/aa366281.aspx
for description of enums, duplicated here in part:
typedef enum {
IpPrefixOriginOther = 0,
IpPrefixOriginManual,
IpPrefixOriginWellKnown,
IpPrefixOriginDhcp,
IpPrefixOriginRouterAdvertisement,
IpPrefixOriginUnchanged = 16
} IP_PREFIX_ORIGIN;
Diffstat (limited to 'include')
-rw-r--r-- | include/fw_context.h | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/include/fw_context.h b/include/fw_context.h index 295b54d..6a7ec1a 100644 --- a/include/fw_context.h +++ b/include/fw_context.h @@ -28,6 +28,15 @@ #include "list.h" #include "auth.h" +enum ibft_ip_prefix_origin { + IBFT_IP_PREFIX_ORIGIN_OTHER = 0, + IBFT_IP_PREFIX_ORIGIN_MANUAL, + IBFT_IP_PREFIX_ORIGIN_WELL_KNOWN, + IBFT_IP_PREFIX_ORIGIN_DHCP, + IBFT_IP_PREFIX_ORIGIN_ROUTER_ADVERTISEMENT, + IBFT_IP_PREFIX_ORIGIN_UNCHANGED = 16 +}; + struct boot_context { struct list_head list; char boot_root[BOOT_NAME_MAXLEN]; @@ -48,7 +57,7 @@ struct boot_context { char initiatorname[TARGET_NAME_MAXLEN + 1]; /* network settings */ - char origin[2]; + enum ibft_ip_prefix_origin origin; char dhcp[NI_MAXHOST]; char iface[IF_NAMESIZE]; char mac[18]; |