9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: "boyd, rounin" <boyd@insultant.net>
To: <9fans@cse.psu.edu>
Subject: [9fans] telnet
Date: Fri, 23 Apr 2004 05:44:04 +0200	[thread overview]
Message-ID: <003501c428e5$39cdffc0$48db7d50@SOMA> (raw)

it seems that telnet has departed from the man page and the
utility of using it (albiet not strictly correctly) with smtp, pop,
ftp etc ... has also been lost.

here is a diff so you can:

    telnet host

    telnet host!service

service can be textual or numeric.

as far as i can see 'net' [see netmkaddr] will always be 'tcp'.

brahma% diff /n/sources/plan9/sys/src/cmd/ip telnet.c
41c41
<  fatal("usage: telnet [-Cdnr] net!host[!service]", 0, 0);
---
>  fatal("usage: telnet [-Cdnr] host[!service]", 0, 0);
80a81,85
> enum {
>  Thost,
>  Tservice,
> };
> 
82c87
<  *  dial and return a data connection
---
>  *  dial host[!service] and return a data connection
89a95,96
>  int n;
>  char *to[2];
91c98,110
<  name = netmkaddr(dest, "tcp", "telnet");
---
>  to[Thost] = dest;
>  to[Tservice] = "telnet";
> 
>  switch (n = getfields(dest, to, nelem(to), 0, "!")) {
>  case 2:
>  case 1:
>   break;
> 
>  default:
>   usage();
>  }
> 
>  name = netmkaddr(to[Thost], "tcp", to[Tservice]);

all done with drawterm [to NY], mousepad and 2 buttons.

i have not hacked the man page into shape.



             reply	other threads:[~2004-04-23  3:44 UTC|newest]

Thread overview: 60+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-04-23  3:44 boyd, rounin [this message]
2004-04-23  3:50 ` boyd, rounin
2004-04-23  4:01 ` Russ Cox
2004-04-23  4:04   ` boyd, rounin
2004-04-23  4:57     ` Russ Cox
2004-04-23  5:09       ` boyd, rounin
2004-04-23  5:33         ` Russ Cox
2004-04-23  5:39           ` boyd, rounin
2004-04-27  6:53           ` Charles Forsyth
2004-04-23  8:06         ` Richard Miller
2004-04-23  8:12           ` boyd, rounin
2004-04-23  8:38             ` Fco.J.Ballesteros
2004-04-23  8:30           ` Charles Forsyth
2004-04-23  8:35             ` boyd, rounin
2004-04-23  8:43               ` Geoff Collyer
2004-04-23  9:24             ` a
2004-04-23 10:04               ` Charles Forsyth
2004-04-23 10:10                 ` a
2004-04-23 12:38                 ` Brantley Coile
2004-04-23 12:51                   ` Charles Forsyth
2004-04-23 17:13                   ` boyd, rounin
2004-04-23  8:38           ` Axel Belinfante
2004-04-23  8:39           ` Geoff Collyer
2004-04-23  8:42             ` Fco.J.Ballesteros
2004-04-23  8:44               ` Geoff Collyer
2004-04-23  8:48                 ` Fco.J.Ballesteros
2004-04-23  8:55                   ` boyd, rounin
2004-04-23  9:48                     ` Richard Miller
2004-04-23  9:56                       ` Geoff Collyer
2004-04-24 22:41                         ` boyd, rounin
2004-04-25  3:35                           ` Russ Cox
2004-04-25 19:48                             ` Dave Lukes
2004-04-25 21:44                               ` boyd, rounin
2004-04-26 18:38                           ` rog
2004-04-23 19:15                       ` rog
2004-04-23 19:37                         ` Russ Cox
2004-04-23 22:33                         ` Geoff Collyer
2004-04-23 14:34                 ` andrey mirtchovski
2004-04-23 16:33                   ` 9nut
2004-04-23 17:37                     ` boyd, rounin
2004-04-23 17:26                   ` boyd, rounin
2004-04-23  8:51               ` boyd, rounin
2004-04-23  8:58                 ` Fco.J.Ballesteros
2004-04-23  9:03                   ` boyd, rounin
2004-04-23  9:08                   ` Geoff Collyer
2004-04-23 11:23                     ` Fco.J.Ballesteros
2004-04-23 12:19                       ` C H Forsyth
2004-04-23 12:17                         ` Fco.J.Ballesteros
2004-04-23 12:34                     ` Brantley Coile
2004-04-23 14:38               ` ron minnich
2004-04-23 14:42                 ` Fco.J.Ballesteros
2004-04-23 14:47                 ` andrey mirtchovski
2004-04-23  8:54           ` Dave Lukes
2004-04-23  9:03             ` Charles Forsyth
2004-04-23 12:25           ` Brantley Coile
2004-04-23 16:02             ` 9nut
2004-04-27  6:52         ` Charles Forsyth
2004-04-23  6:53           ` boyd, rounin
2004-04-23  4:07   ` boyd, rounin
2004-04-27 12:52 Dan Cross

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='003501c428e5$39cdffc0$48db7d50@SOMA' \
    --to=boyd@insultant.net \
    --cc=9fans@cse.psu.edu \
    /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).