From: Sergey Zhilkin <szhilkin@gmail.com>
To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net>
Subject: Re: [9fans] parseip error
Date: Mon, 27 Sep 2010 23:14:53 +0400 [thread overview]
Message-ID: <AANLkTik=B2VJvqKWUhDed3UwTOsoY3ZZ6nHxeVTLe8gA@mail.gmail.com> (raw)
In-Reply-To: <ab9a39cdf776631f370fc3f959c37f3f@brasstown.quanstro.net>
Strange IP :)
On Thu, Sep 23, 2010 at 11:34 PM, erik quanstrom <quanstro@quanstro.net> wrote:
> parseip(355.355.355.355) -> 99.99.99.99
>
> correction to parseip.c attached; test program
> included.
>
> - erik
>
> -----
> #include <u.h>
> #include <libc.h>
> #include <ip.h>
>
> void
> usage(void)
> {
> fprint(2, "usage: parseip [ip ...]\n");
> exits("usage");
> }
>
> void
> main(int argc, char **argv)
> {
> uchar ip[IPaddrlen];
> int i;
> uvlong n;
>
> fmtinstall('I', eipfmt);
> ARGBEGIN{
> default:
> usage();
> }ARGEND
> for(i = 0; i < argc; i++){
> n = parseip(ip, argv[i]);
> if(n != -1)
> print("%s -> %I\n", argv[i], ip);
> else
> print("%s -> -1\n", argv[i]);
> }
> exits("");
> }
--
С наилучшими пожеланиями
Жилкин Сергей
With best regards
Zhilkin Sergey
prev parent reply other threads:[~2010-09-27 19:14 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-09-23 19:34 erik quanstrom
2010-09-27 19:14 ` Sergey Zhilkin [this message]
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='AANLkTik=B2VJvqKWUhDed3UwTOsoY3ZZ6nHxeVTLe8gA@mail.gmail.com' \
--to=szhilkin@gmail.com \
--cc=9fans@9fans.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).