Attention is currently required from: pespin.
Hello Jenkins Builder, laforge,
I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/c/libosmocore/+/31063
to look at the new patch set (#4).
Change subject: Introduce tundev API
......................................................................
Introduce tundev API
The data structre is held private so that it can be easily extended in
the future.
Change-Id: I6f8324da9ba49b9249682e2ec5b45297f18dd8c2
---
M TODO-RELEASE
M include/osmocom/core/Makefile.am
A include/osmocom/core/tun.h
M src/core/Makefile.am
A src/core/tun.c
5 files changed, 617 insertions(+), 0 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/63/31063/4
--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/31063
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: I6f8324da9ba49b9249682e2ec5b45297f18dd8c2
Gerrit-Change-Number: 31063
Gerrit-PatchSet: 4
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: newpatchset
Attention is currently required from: laforge.
Hello Jenkins Builder, laforge,
I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/c/libosmocore/+/31062
to look at the new patch set (#4).
Change subject: Introduce netdev API
......................................................................
Introduce netdev API
This module provides several operations on network devices
(interfaces), like monitoring changes, setting addresses, routes, link
state, etc.
It also supports managing network interfaces on several different netns
concurrently.
These functionalitites will be used by the tun module included in a
follow-up patch.
Change-Id: I7a00c0445a89e088676a4897061b65196d9197f1
---
M TODO-RELEASE
M include/osmocom/core/Makefile.am
A include/osmocom/core/netdev.h
M src/core/Makefile.am
A src/core/netdev.c
5 files changed, 958 insertions(+), 0 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/62/31062/4
--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/31062
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: I7a00c0445a89e088676a4897061b65196d9197f1
Gerrit-Change-Number: 31062
Gerrit-PatchSet: 4
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Attention: laforge <laforge(a)osmocom.org>
Gerrit-MessageType: newpatchset
Attention is currently required from: laforge.
Jenkins Builder has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/31062 )
Change subject: Introduce netdev API
......................................................................
Patch Set 3:
(1 comment)
File src/core/netdev.c:
Robot Comment from checkpatch (run ID jenkins-gerrit-lint-2992):
https://gerrit.osmocom.org/c/libosmocore/+/31062/comment/bdd31b76_adef5814
PS3, Line 48: * // Add a local IPv4 addres:
'addres' may be misspelled - perhaps 'address'?
--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/31062
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: I7a00c0445a89e088676a4897061b65196d9197f1
Gerrit-Change-Number: 31062
Gerrit-PatchSet: 3
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Attention: laforge <laforge(a)osmocom.org>
Gerrit-Comment-Date: Tue, 24 Jan 2023 18:28:55 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment
Attention is currently required from: laforge.
Hello Jenkins Builder, laforge,
I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/c/libosmocore/+/31062
to look at the new patch set (#3).
Change subject: Introduce netdev API
......................................................................
Introduce netdev API
This module provides several operations on network devices
(interfaces), like monitoring changes, setting addresses, routes, link
state, etc.
It also supports managing network interfaces on several different netns
concurrently.
These functionalitites will be used by the tun module included in a
follow-up patch.
Change-Id: I7a00c0445a89e088676a4897061b65196d9197f1
---
M TODO-RELEASE
M include/osmocom/core/Makefile.am
A include/osmocom/core/netdev.h
M src/core/Makefile.am
A src/core/netdev.c
5 files changed, 956 insertions(+), 0 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/62/31062/3
--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/31062
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: I7a00c0445a89e088676a4897061b65196d9197f1
Gerrit-Change-Number: 31062
Gerrit-PatchSet: 3
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Attention: laforge <laforge(a)osmocom.org>
Gerrit-MessageType: newpatchset
Attention is currently required from: laforge.
pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/31062 )
Change subject: Introduce netdev API
......................................................................
Patch Set 2:
(1 comment)
File include/osmocom/core/netdev.h:
https://gerrit.osmocom.org/c/libosmocore/+/31062/comment/4a7f01e8_bdd3957a
PS2, Line 31: unsigned
> AFAICT, in the kernel, an ifindex is always of type "int", not "unsigned int".
see "man if_nametoindex()":
unsigned int if_nametoindex(const char *ifname);
On success, if_nametoindex() returns the index number of the network interface; on error, 0 is returned and errno is set to indicate the error.
--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/31062
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: I7a00c0445a89e088676a4897061b65196d9197f1
Gerrit-Change-Number: 31062
Gerrit-PatchSet: 2
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Attention: laforge <laforge(a)osmocom.org>
Gerrit-Comment-Date: Tue, 24 Jan 2023 17:59:43 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: laforge <laforge(a)osmocom.org>
Gerrit-MessageType: comment
Attention is currently required from: pespin.
laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/31063 )
Change subject: Introduce tundev API
......................................................................
Patch Set 3:
(1 comment)
File src/core/tun.c:
https://gerrit.osmocom.org/c/libosmocore/+/31063/comment/198119ec_dc592da6
PS3, Line 265: if_nametoindex
FYI, there is a somewhat strange TUNSETIFINDEX ioctl() using which you could first set an arbitrary ifindex number which would then be used when creatin the tunnel with TUNSETIFF. See https://patchwork.ozlabs.org/project/netdev/patch/51B99946.3000703@parallel… - which was merged in 2013 / kernel 3.12. Not sure if it's worth the effort, just wanted to point it out.
--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/31063
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: I6f8324da9ba49b9249682e2ec5b45297f18dd8c2
Gerrit-Change-Number: 31063
Gerrit-PatchSet: 3
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Comment-Date: Tue, 24 Jan 2023 17:50:36 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment
Attention is currently required from: laforge.
pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/31062 )
Change subject: Introduce netdev API
......................................................................
Patch Set 2:
(2 comments)
File src/core/netdev.c:
https://gerrit.osmocom.org/c/libosmocore/+/31062/comment/782a2aef_0af874ed
PS2, Line 703: /
> this might be interpreted in a way that one can set/change the ifindex of the actual kernel network […]
I will improve the documentation.
https://gerrit.osmocom.org/c/libosmocore/+/31062/comment/0344c954_d694eb58
PS2, Line 720: unsigned
> if we used a signed int for ifindex, we could return a negative error value here if no ifindex was s […]
0 seems to be an "unused"/"reserved" ifindex according to if_nametoindex return value. Also "ip l" shows no interface with ifindex=0.
I Will add an "#define IFINDEX_UNSET 0" in the header in case it's more descriptive.
--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/31062
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: I7a00c0445a89e088676a4897061b65196d9197f1
Gerrit-Change-Number: 31062
Gerrit-PatchSet: 2
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Attention: laforge <laforge(a)osmocom.org>
Gerrit-Comment-Date: Tue, 24 Jan 2023 17:48:24 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: laforge <laforge(a)osmocom.org>
Gerrit-MessageType: comment
Attention is currently required from: pespin.
laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/31062 )
Change subject: Introduce netdev API
......................................................................
Patch Set 2: Code-Review+1
(2 comments)
File include/osmocom/core/netdev.h:
https://gerrit.osmocom.org/c/libosmocore/+/31062/comment/4b299be1_59cdbd99
PS2, Line 31: unsigned
AFAICT, in the kernel, an ifindex is always of type "int", not "unsigned int".
File src/core/netdev.c:
https://gerrit.osmocom.org/c/libosmocore/+/31062/comment/2c65560c_668364bf
PS2, Line 720: unsigned
if we used a signed int for ifindex, we could return a negative error value here if no ifindex was set yet?
--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/31062
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: I7a00c0445a89e088676a4897061b65196d9197f1
Gerrit-Change-Number: 31062
Gerrit-PatchSet: 2
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Comment-Date: Tue, 24 Jan 2023 17:41:46 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
Attention is currently required from: pespin.
laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/31062 )
Change subject: Introduce netdev API
......................................................................
Patch Set 2:
(1 comment)
File src/core/netdev.c:
https://gerrit.osmocom.org/c/libosmocore/+/31062/comment/4c67fe8f_6faefbcc
PS2, Line 703: /
this might be interpreted in a way that one can set/change the ifindex of the actual kernel network device, whcih "obviously" doesn't work. One might call it osmo_netdev_specify_ifindex() to make it a bit more clear. But if we keep the name the documentation should at least be very clear. "Set ifindex of he interface" is misleading. the function set_netns_name below at least states "to use when opening the netdev interface" in the description, which makes it more celar.
--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/31062
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: I7a00c0445a89e088676a4897061b65196d9197f1
Gerrit-Change-Number: 31062
Gerrit-PatchSet: 2
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Comment-Date: Tue, 24 Jan 2023 17:34:51 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment