All of lore.kernel.org
 help / color / mirror / Atom feed
* [LTP] [RFC PATCH 0/2] Simplify network setup
@ 2017-03-29  9:37 Petr Vorel
  2017-03-29  9:37 ` [LTP] [RFC PATCH 1/2] network: Add tool for setup IP variables Petr Vorel
  2017-03-29  9:37 ` [LTP] [RFC PATCH 2/2] network: Use setup_network_variables to set up variables Petr Vorel
  0 siblings, 2 replies; 4+ messages in thread
From: Petr Vorel @ 2017-03-29  9:37 UTC (permalink / raw)
  To: ltp

Hi,

this patch simplifies network related setup a lot as with input of 2 IPv4 and 2 IPv6 addresses defines these variables:
IPV4_NETWORK
LHOST_IPV4_HOST
RHOST_IPV4_HOST
IPV4_NET_REV
IPV6_NETWORK
LHOST_IPV6_HOST
RHOST_IPV6_HOST
IPV6_NET_REV
LHOST_IPV6_REV
RHOST_IPV6_REV
IPV4_NET16_UNUSED
IPV6_NET32_UNUSED

Tool, written in C is not perfect, probably needs cleanup.
Part of the code is borrowed from ipcalc [1], inet_ntop6_impl is based on
inet_ntop() musl implementation [2], that's why I put their copyright.

Any comments are highly appreciated.

Kind regards,
Petr

[1] https://github.com/nmav/ipcalc/blob/master/ipcalc.c
[2] https://github.com/bpowers/musl/blob/master/src/network/inet_ntop.c

Petr Vorel (2):
  network: Add tool for setup IP variables
  network: Use setup_network_variables to set up variables

 testcases/lib/.gitignore                |  13 +-
 testcases/lib/Makefile                  |   4 +-
 testcases/lib/setup_network_variables.c | 602 ++++++++++++++++++++++++++++++++
 testcases/lib/test_net.sh               |  33 +-
 4 files changed, 619 insertions(+), 33 deletions(-)
 create mode 100644 testcases/lib/setup_network_variables.c

-- 
2.12.0


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2017-03-31 14:38 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-03-29  9:37 [LTP] [RFC PATCH 0/2] Simplify network setup Petr Vorel
2017-03-29  9:37 ` [LTP] [RFC PATCH 1/2] network: Add tool for setup IP variables Petr Vorel
2017-03-31 14:38   ` Cyril Hrubis
2017-03-29  9:37 ` [LTP] [RFC PATCH 2/2] network: Use setup_network_variables to set up variables Petr Vorel

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.