9front - general discussion about 9front
 help / color / mirror / Atom feed
From: hiro <23hiro@gmail.com>
To: Benjamin Riefenstahl <b.riefenstahl@turtle-trading.net>
Cc: 9front@9front.org
Subject: Re: [9front] Loopback device
Date: Mon, 3 Jan 2022 23:22:09 +0100	[thread overview]
Message-ID: <CAFSF3XM_Rp_9X9BJ_fqW9d9zcMB+OVqDPLtBbut8gT1DfD2j8g@mail.gmail.com> (raw)
In-Reply-To: <87y23w7e9z.fsf@turtle-trading.net>

i think the main use case would be something like what tc is used for on linux:
simulating a network link with output buffers, fragmentation, packet
drop, delay.

somebody might use it's flow-control for creating a bit of fairness on
a saturated slow link...

you're right that it isn't currently being built by default:

cpu% cd /sys/src/9/port
cpu% g λ
devloopback.c:718:      L'λ',
cpu% g loopback|grep -v devloopback.c
sdloop.c:2:  * sd loopback driver,

also try cat master in same directory.


On 1/3/22, Benjamin Riefenstahl <b.riefenstahl@turtle-trading.net> wrote:
> Hi hiro,
>
> Thanks for taking the time.
>
> hiro writes:
>> loopback is a *link*. it has two sides.
>> it's not the same as the 127.0.0.1 feature from other unixes.
>
> Ok.  But that does not answer my questions.  Why doesn't the bind
> command from the man page work?  And what *does* loopback do?
>
> Calling it a link with two sides makes it sound like a pipe.  And being
> mounted in /net makes it sound like, well, localhost, which also has two
> sides, in the sense that I can run a server on it and than connect to
> that server, all on the same host.
>
>> localhost/127.0.0.1 is not normally used on plan9.
>>
>> it doesn't make much sense on a distributed and namespaced system.
>> better use more meaningful unique IPs and hostnames and service names
>> and then use just those, together with our excellent ndb service to
>> resolve it all.
>
> I find I most often use it for testing and for other code that needs an
> IP with two sides where I do not want to hardcode, configure or find out
> the host name or host IP.
>
> Thanks, benny
>

  reply	other threads:[~2022-01-03 22:29 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-03 15:29 Benjamin Riefenstahl
2022-01-03 17:43 ` hiro
2022-01-03 20:30   ` Benjamin Riefenstahl
2022-01-03 22:22     ` hiro [this message]
     [not found]     ` <CAFSF3XMZnF1TsM6tVHS220LwF7e0YW4kbWC3O15r5JJiR=0WKg@mail.gmail.com>
2022-01-03 22:45       ` Benjamin Riefenstahl
2022-01-03 21:05 ` rgl

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=CAFSF3XM_Rp_9X9BJ_fqW9d9zcMB+OVqDPLtBbut8gT1DfD2j8g@mail.gmail.com \
    --to=23hiro@gmail.com \
    --cc=9front@9front.org \
    --cc=b.riefenstahl@turtle-trading.net \
    /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.
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 NNTP newsgroup(s).