all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Alex Kost <alezost@gmail.com>
To: "Ludovic Courtès" <ludo@gnu.org>
Cc: guix-devel@gnu.org
Subject: Re: feedback as solicited by Guix manual (Section 7.1.5)
Date: Sat, 04 Jun 2016 15:52:57 +0300	[thread overview]
Message-ID: <87mvn19kuu.fsf@gmail.com> (raw)
In-Reply-To: 87inxq4rp9.fsf@gnu.org

Ludovic Courtès (2016-06-03 11:11 +0300) wrote:

> Alex Kost <alezost@gmail.com> skribis:
[...]
>> Wow, do you mean that ifconfig is not only for Linux kernel?
>
> Exactly.
>
> Under the hood, ‘ip’ uses Linux-specific netlink socket interfaces,
> whereas GNU ifconfig uses the good ol’ ioctls that most Unices support
> (including GNU/Hurd):
>
>
> ~$ sudo strace -e socket ip a
> socket(PF_NETLINK, SOCK_RAW|SOCK_CLOEXEC, 0) = 3
> 1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1
>     link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
>     inet 127.0.0.1/8 scope host lo
>        valid_lft forever preferred_lft forever
>     inet6 ::1/128 scope host 
>        valid_lft forever preferred_lft forever
> 2: eno1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
>     link/ether 5c:26:0a:64:07:23 brd ff:ff:ff:ff:ff:ff
>     inet 193.50.110.57/24 brd 193.50.110.255 scope global eno1
>        valid_lft forever preferred_lft forever
>     inet6 fe80::5e26:aff:fe64:723/64 scope link 
>        valid_lft forever preferred_lft forever
> 3: wlp0s29u1u2: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc mq state DOWN group default qlen 1000
>     link/ether 60:02:b4:99:9b:31 brd ff:ff:ff:ff:ff:ff
> +++ exited with 0 +++
> ludo@pluto ~$ sudo strace -e ioctl ifconfig -a
> ioctl(3, SIOCGIFINDEX, {ifr_name="wlp0s29u1u2", ifr_index=3}) = 0
> ioctl(3, SIOCGIFINDEX, {ifr_name="lo", ifr_index=1}) = 0
> ioctl(3, SIOCGIFINDEX, {ifr_name="eno1", ifr_index=2}) = 0
> ioctl(5, SIOCGIFINDEX, {ifr_name="eno1", ifr_index=2}) = 0
> ioctl(4, SIOCGIFHWADDR, {ifr_name="eno1", ifr_hwaddr=5c:26:0a:64:07:23}) = 0
> ioctl(4, SIOCGIFHWADDR, {ifr_name="eno1", ifr_hwaddr=5c:26:0a:64:07:23}) = 0
> ioctl(4, SIOCGIFHWADDR, {ifr_name="eno1", ifr_hwaddr=5c:26:0a:64:07:23}) = 0
> ioctl(4, SIOCGIFHWADDR, {ifr_name="eno1", ifr_hwaddr=5c:26:0a:64:07:23}) = 0
> eno1      Link encap:Ethernet  HWaddr 5C:26:0A:64:07:23
>
> [...]
>
>
>> If ifconfig is a general thing (suitable for Hurd) then I agree; we
>> should probably leave it as it is now.  Otherwise I would also add a
>> mention how to do it with "ip", like this:
>
>
> diff --git a/doc/guix.texi b/doc/guix.texi
> index c8c7555..12dd354 100644
> --- a/doc/guix.texi
> +++ b/doc/guix.texi
> @@ -6010,6 +6010,13 @@ Run the following command see what your network interfaces are called:
>  ifconfig -a
>  @end example
>  
> +@noindent
> +@dots{} or, using the GNU/Linux-specific @command{ip} command:
> +
> +@example
> +ip a
> +@end example
> +
>  @c http://cgit.freedesktop.org/systemd/systemd/tree/src/udev/udev-builtin-net_id.c#n20
>  Wired interfaces have a name starting with @samp{e}; for example, the
>  interface corresponding to the first on-board Ethernet controller is
>
> OK with this?

As for me, I'm absolutely OK with this.  And thanks for the explanation
that ifconfig is a more general tool.

-- 
Alex

  reply	other threads:[~2016-06-04 12:53 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-30  0:45 feedback as solicited by Guix manual (Section 7.1.5) Ethan Stefan Day
2016-05-31 15:58 ` Leo Famulari
2016-05-31 16:31   ` Matthew Jordan
2016-05-31 17:56     ` Leo Famulari
2016-05-31 18:35       ` Matthew Jordan
2016-05-31 21:10         ` Ludovic Courtès
2016-06-01  4:53           ` Tomáš Čech
2016-06-01 19:45             ` Alex Kost
2016-06-02  8:07               ` Ludovic Courtès
2016-06-02  8:37                 ` Alex Kost
2016-06-03  8:11                   ` Ludovic Courtès
2016-06-04 12:52                     ` Alex Kost [this message]
2016-06-01 19:22           ` Matthew Jordan
2016-06-03  8:00             ` Ludovic Courtès
2016-05-31 21:13         ` Ethan Stefan Day
2016-06-04 21:00           ` Rescuing the GNU Storage Guide? Ludovic Courtès
2016-06-04 23:18             ` Ludovic Courtès
2016-05-31 16:19 ` feedback as solicited by Guix manual (Section 7.1.5) 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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87mvn19kuu.fsf@gmail.com \
    --to=alezost@gmail.com \
    --cc=guix-devel@gnu.org \
    --cc=ludo@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 external index

	https://git.savannah.gnu.org/cgit/guix.git

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.