From: Julien Lepiller <julien@lepiller.eu>
To: guix-devel@gnu.org
Subject: Guile Netlink 1.0 released
Date: Sun, 14 Mar 2021 20:31:10 +0100 [thread overview]
Message-ID: <20210314203110.207ed0ca@tachikoma.lepiller.eu> (raw)
Hi!
I'm proud to announce the first release of Guile Netlink!
git clone https://git.lepiller.eu/git/guile-netlink
cd guile-netlink
git checkout 1.0 # or 29ff43368f1cc2d10a7e5f09dc9f80f85582d6ee
git tag -v 1.0
The 'git tag -v' command check the authenticity of your checkout. You
may need to retrieve the signing key first:
gpg --keyserver pool.sks-keyservers.net \
--recv-keys 1EFB09091F17D28CCBF9B13A53D457B2D636EE82
Guile Netlink provides three components:
- A helper library for implementing netlink protocols
- An implementation of rtnetlink, one of the netlink protocols. It is
used to query and alter the state of the network stack in Linux.
- A high-level API implemented on top of rtnetlink and inspired by
iproute2's commands
Here are a few examples (most of which will only work as root and will
really modify your network), extracted from the manual:
;; same as "ip l add v0p0 type veth peer v0p1"
(link-add "v0p0" "veth" #:type-args '((peer . "v0p1")))
;; same as "ip a add 192.0.2.15/24 dev enp1s0
(addr-add "enp1s0" "192.0.2.15/24")
(addr-add "enp1s0" "2001:db8::1a4c/64" #:ipv6? #t)
;; removing the previous addresses, as in "ip a del 192.0.2.15/24 dev
;; enp1s0"
(addr-del "enp1s0" "192.0.2.15/24")
(addr-del "enp1s0" "2001:db8::1a4c/64" #:ipv6? #t)
;; same as "ip a" or "ip addr show"
(addr-show)
;; same as "ip r add default via 192.0.2.1 dev enp1s0"
(route-add "default" #:device "enp1s0" #:via "192.0.2.1")
;; same as "ip r add 192.0.2.0/24 dev enp1s0 src 192.0.2.15"
(route-add "192.0.2.0/24" #:device "enp1s0" #:src "192.0.2.15")
Hopefully, the high-level API can be used on Linux to replace our
current implementation of container networking and static networking
service type.
You will find the complete documentation online at
https://git.lepiller.eu/guile-netlink/manual, the code is available at
https://git.lepiller.eu/guile-netlink (note that the clone URL is
different, see above) and you can report any issue, patch and ideas to
me, by email.
Hope you'll enjoy!
Julien
next reply other threads:[~2021-03-14 19:32 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-14 19:31 Julien Lepiller [this message]
2021-03-14 20:40 ` Guile Netlink 1.0 released Vincent Legoll
2021-03-14 23:12 ` Vladimir Sedach
2021-03-14 23:59 ` Julien Lepiller
2021-03-15 10:17 ` Léo Le Bouter
2021-03-15 17:12 ` Ludovic Courtès
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210314203110.207ed0ca@tachikoma.lepiller.eu \
--to=julien@lepiller.eu \
--cc=guix-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).