]> Kevux Git Server - fll/commit
Feature: Add f_network_to_ip_string() and f_network_from_ip_string() functions.
authorKevin Day <kevin@kevux.org>
Thu, 22 Jun 2023 03:26:54 +0000 (22:26 -0500)
committerKevin Day <kevin@kevux.org>
Thu, 22 Jun 2023 03:29:42 +0000 (22:29 -0500)
commit33904595f701043afbc8f94036899dc331dd3386
treeb949e60e4c884e16c21864b078340a58a9f76713
parent1601bc651209dcdc315343f8c743dd68c435927a
Feature: Add f_network_to_ip_string() and f_network_from_ip_string() functions.

Provide support for inet_ntop() and inet_pton().

String are handling in FLL via f_string_static_t and f_string_dynamic_t.
The functions f_network_to_ip_string() and f_network_from_ip_string() are written to convert to these string types.

This implements a custom f_network_family_ip_t type to pass the digit IP address.
The idea here is to help reduce how much the FLL API is locked into the "libc" or POSIX API.

The structures are allocated using "{ 0 }" to take advantage of the supposed relatively new feature that treats this as an initialize all to NULL.
18 files changed:
build/level_0/settings
build/monolithic/settings
level_0/f_network/c/network.c
level_0/f_network/c/network.h
level_0/f_network/c/network/common.h [new file with mode: 0644]
level_0/f_network/data/build/dependencies
level_0/f_network/data/build/settings
level_0/f_network/data/build/settings-mocks
level_0/f_network/data/build/settings-tests
level_0/f_network/tests/unit/c/mock-network.c
level_0/f_network/tests/unit/c/mock-network.h
level_0/f_network/tests/unit/c/test-network-from_host_long.h
level_0/f_network/tests/unit/c/test-network-from_ip_string.c [new file with mode: 0644]
level_0/f_network/tests/unit/c/test-network-from_ip_string.h [new file with mode: 0644]
level_0/f_network/tests/unit/c/test-network-to_ip_string.c [new file with mode: 0644]
level_0/f_network/tests/unit/c/test-network-to_ip_string.h [new file with mode: 0644]
level_0/f_network/tests/unit/c/test-network.c
level_0/f_network/tests/unit/c/test-network.h