diff options
| author | Adriano Cordova <[email protected]> | 2024-11-11 18:09:45 -0300 |
|---|---|---|
| committer | Heinrich Schuchardt <[email protected]> | 2024-11-18 16:12:35 +0100 |
| commit | 9063dba2d326e07682338cdb636787e99f1bf3f5 (patch) | |
| tree | 2013532b61da4c9903fea97a89e1d406dd01efa9 /include/net-common.h | |
| parent | 1327c2a8d6514d4abfa3642ce338fed50b811b21 (diff) | |
net: net_utils: Move ip_to_string to lib/net_utils.c
The function string_to_ip is already in net_utils, which is
compiled unconditionally, but ip_to_string is currently only
accessible if the legacy network stack is selected. This
commit puts ip_to_string in net_utils.c and removes it from the
legacy network code.
Signed-off-by: Adriano Cordova <[email protected]>
Reviewed-by: Heinrich Schuchardt <[email protected]>
Diffstat (limited to 'include/net-common.h')
| -rw-r--r-- | include/net-common.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/include/net-common.h b/include/net-common.h index 3cd0f343744..b7a519e36db 100644 --- a/include/net-common.h +++ b/include/net-common.h @@ -426,6 +426,16 @@ void string_to_enetaddr(const char *addr, uint8_t *enetaddr); */ struct in_addr string_to_ip(const char *s); +/** + * ip_to_string() - Convert a string to ip address + * + * Implemented in lib/net_utils.c (built unconditionally) + * + * @x: Input ip to parse + * @s: string containing the parsed ip address + */ +void ip_to_string(struct in_addr x, char *s); + /* copy a filename (allow for "..." notation, limit length) */ void copy_filename(char *dst, const char *src, int size); |
