aboutsummaryrefslogtreecommitdiff
path: root/include/pxe_utils.h
diff options
context:
space:
mode:
authorSean Edmond2023-04-11 10:48:47 -0700
committerTom Rini2023-05-05 17:48:44 -0400
commit7d0188927bcf4f6ce74ccfca43f0f081a39ade00 (patch)
tree6246507177d0aa833472e6c46f61e75178d251f7 /include/pxe_utils.h
parenta0245818f7f8e375abc00f36ff88326331e4e2f9 (diff)
net: dhcp6: pxe: Add DHCP/PXE commands for IPv6
Adds commands to support DHCP and PXE with IPv6. New configs added: - CMD_DHCP6 - DHCP6_PXE_CLIENTARCH - DHCP6_PXE_DHCP_OPTION - DHCP6_ENTERPRISE_ID New commands added (when IPv6 is enabled): - dhcp6 - pxe get -ipv6 - pxe boot -ipv6 Signed-off-by: Sean Edmond <seanedmond@microsoft.com> Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
Diffstat (limited to 'include/pxe_utils.h')
-rw-r--r--include/pxe_utils.h10
1 files changed, 8 insertions, 2 deletions
diff --git a/include/pxe_utils.h b/include/pxe_utils.h
index 1e5e8424f53..9f195930487 100644
--- a/include/pxe_utils.h
+++ b/include/pxe_utils.h
@@ -93,6 +93,7 @@ typedef int (*pxe_getfile_func)(struct pxe_context *ctx, const char *file_path,
* @bootdir: Directory that files are loaded from ("" if no directory). This is
* allocated
* @pxe_file_size: Size of the PXE file
+ * @use_ipv6: TRUE : use IPv6 addressing, FALSE : use IPv4 addressing
*/
struct pxe_context {
struct cmd_tbl *cmdtp;
@@ -112,6 +113,7 @@ struct pxe_context {
bool allow_abs_path;
char *bootdir;
ulong pxe_file_size;
+ bool use_ipv6;
};
/**
@@ -209,12 +211,14 @@ int format_mac_pxe(char *outbuf, size_t outbuf_len);
* @allow_abs_path: true to allow absolute paths
* @bootfile: Bootfile whose directory loaded files are relative to, NULL if
* none
+ * @use_ipv6: TRUE : use IPv6 addressing
+ * FALSE : use IPv4 addressing
* Return: 0 if OK, -ENOMEM if out of memory, -E2BIG if bootfile is larger than
* MAX_TFTP_PATH_LEN bytes
*/
int pxe_setup_ctx(struct pxe_context *ctx, struct cmd_tbl *cmdtp,
pxe_getfile_func getfile, void *userdata,
- bool allow_abs_path, const char *bootfile);
+ bool allow_abs_path, const char *bootfile, bool use_ipv6);
/**
* pxe_destroy_ctx() - Destroy a PXE context
@@ -251,7 +255,9 @@ int pxe_get_file_size(ulong *sizep);
* "rpi/info", which indicates that all files should be fetched from the
* "rpi/" subdirectory
* @sizep: Size of the PXE file (not bootfile)
+ * @use_ipv6: TRUE : use IPv6 addressing
+ * FALSE : use IPv4 addressing
*/
-int pxe_get(ulong pxefile_addr_r, char **bootdirp, ulong *sizep);
+int pxe_get(ulong pxefile_addr_r, char **bootdirp, ulong *sizep, bool use_ipv6);
#endif /* __PXE_UTILS_H */