lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <200801291932.31912.konrad@darnok.org>
Date:	Tue, 29 Jan 2008 19:32:29 -0500
From:	Konrad Rzeszutek <konrad@...nok.org>
To:	Mike Christie <michaelc@...wisc.edu>
Cc:	Andrew Morton <akpm@...ux-foundation.org>,
	linux-kernel@...r.kernel.org, Greg KH <greg@...ah.com>,
	dwm@...yolf.org, darnok@....org, pjones@...hat.com,
	konradr@...hat.com, konradr@...ux.vnet.ibm.com,
	randy.dunlap@...cle.com, hpa@...or.com, lenb@...nel.org,
	mike.anderson@...ibm.com, dwm@...tin.ibm.com, arjan@...radead.org,
	Andy Whitcroft <apw@...dowen.org>,
	James.Bottomley@...senpartnership.com
Subject: Re: [PATCH] Add iSCSI IBFT support (v0.4.5) - fixes to the header files.

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 :-(

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ