mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Konrad Rzeszutek <konrad@darnok.org>
To: Mike Christie <michaelc@cs.wisc.edu>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	linux-kernel@vger.kernel.org, Greg KH <greg@kroah.com>,
	dwm@enoyolf.org, darnok@68k.org, pjones@redhat.com,
	konradr@redhat.com, konradr@linux.vnet.ibm.com,
	randy.dunlap@oracle.com, hpa@zytor.com, lenb@kernel.org,
	mike.anderson@us.ibm.com, dwm@austin.ibm.com,
	arjan@infradead.org, Andy Whitcroft <apw@shadowen.org>,
	James.Bottomley@hansenpartnership.com
Subject: Re: [PATCH] Add iSCSI IBFT support (v0.4.5) - fixes to the header files.
Date: Tue, 29 Jan 2008 19:32:29 -0500	[thread overview]
Message-ID: <200801291932.31912.konrad@darnok.org> (raw)
In-Reply-To: <479F7B43.6090801@cs.wisc.edu>

On Tuesday 29 January 2008 14:15:15 Mike Christie wrote:
> Konrad Rzeszutek wrote:
> > +/*
> > + * Helper functions to parse data properly.
> > + */
> > +static ssize_t sprintf_ipaddr(char *buf, u8 *ip)
> > +{
> > +	if (ip[0] == 0 && ip[1] == 0 && ip[2] == 0 && ip[3] == 0 &&
> > +	    ip[4] == 0 && ip[5] == 0 && ip[6] == 0 && ip[7] == 0 &&
> > +	    ip[8] == 0 && ip[9] == 0 && ip[10] == 0xff && ip[11] == 0xff) {
> > +		/*
> > +		 * IPV4
> > +		 */
> > +		return sprintf(buf, "%d.%d.%d.%d\n", ip[12],
> > +			       ip[13], ip[14], ip[15]);
> > +	} else
> > +		return 0;
> > +}
>
> You probably just want to use the NIPQUAD_FMT and NIP6_FMT macros here.

Ah, I knew a macro like this _ought_ to be there somewhere. Thanks.

> Also why isn't ipv6 supported?

I didn't get to test the IPV6  yet so I didn't want to put in code that might 
have worked or not :-(


      reply	other threads:[~2008-01-30  0:35 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-01-28 18:55 Konrad Rzeszutek
2008-01-29 19:15 ` Mike Christie
2008-01-30  0:32   ` Konrad Rzeszutek [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=200801291932.31912.konrad@darnok.org \
    --to=konrad@darnok.org \
    --cc=James.Bottomley@hansenpartnership.com \
    --cc=akpm@linux-foundation.org \
    --cc=apw@shadowen.org \
    --cc=arjan@infradead.org \
    --cc=darnok@68k.org \
    --cc=dwm@austin.ibm.com \
    --cc=dwm@enoyolf.org \
    --cc=greg@kroah.com \
    --cc=hpa@zytor.com \
    --cc=konradr@linux.vnet.ibm.com \
    --cc=konradr@redhat.com \
    --cc=lenb@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=michaelc@cs.wisc.edu \
    --cc=mike.anderson@us.ibm.com \
    --cc=pjones@redhat.com \
    --cc=randy.dunlap@oracle.com \
    /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

Powered by JetHome