diff options
| author | Adriano Cordova <[email protected]> | 2024-12-04 00:05:21 -0300 |
|---|---|---|
| committer | Heinrich Schuchardt <[email protected]> | 2024-12-04 12:24:37 +0100 |
| commit | b20f497f22a76785f4c615af78a5b70f6ba49046 (patch) | |
| tree | b54461d0c9b276775473a2d66c7cff327a61e7c5 /include | |
| parent | b98d2323505bcc0dfe5863f02c3f6b43d7756d8a (diff) | |
efi_loader: efi_net: add efi_net_set_addr, efi_net_get_addr
Add the functions efi_net_set_addr and efi_net_get_addr to set
and get the ip address from efi code in a network agnostic way.
This could also go in net_common, or be compiled conditionally
for each network stack.
Signed-off-by: Adriano Cordova <[email protected]>
Reviewed-by: Heinrich Schuchardt <[email protected]>
Diffstat (limited to 'include')
| -rw-r--r-- | include/efi_loader.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/include/efi_loader.h b/include/efi_loader.h index 39809eac1bc..612bc42816b 100644 --- a/include/efi_loader.h +++ b/include/efi_loader.h @@ -125,6 +125,22 @@ static inline void efi_set_bootdev(const char *dev, const char *devnr, size_t buffer_size) { } #endif +#if CONFIG_IS_ENABLED(NETDEVICES) && CONFIG_IS_ENABLED(EFI_LOADER) +void efi_net_get_addr(struct efi_ipv4_address *ip, + struct efi_ipv4_address *mask, + struct efi_ipv4_address *gw); +void efi_net_set_addr(struct efi_ipv4_address *ip, + struct efi_ipv4_address *mask, + struct efi_ipv4_address *gw); +#else +static inline void efi_net_get_addr(struct efi_ipv4_address *ip, + struct efi_ipv4_address *mask, + struct efi_ipv4_address *gw) { } +static inline void efi_net_set_addr(struct efi_ipv4_address *ip, + struct efi_ipv4_address *mask, + struct efi_ipv4_address *gw) { } +#endif + /* Maximum number of configuration tables */ #define EFI_MAX_CONFIGURATION_TABLES 16 |
