+
+void iscsit_ntoa2(unsigned char *buf, u32 ip)
+{
+ memset(buf, 0, 18);
+ sprintf(buf, "%u.%u.%u.%u", ((ip>> 24)& 0xff), ((ip>> 16)& 0xff),
+ ((ip>> 8)& 0xff), (ip& 0xff));
+}
I think we have a function like this already.
If not, I think this should be:
sprintf(buf, "%pI4",
What s up with ipv6 btw? That uses %pI6.
+ if (tpg_np->tpg_np->np_sockaddr.ss_family == AF_INET6) {
+ ip =&tpg_np->tpg_np->np_ipv6[0];
Is ip supposed to be a string with the ip address in it? If so is that
right? Is np_ipv6 a string with the ip address in human readable format,
but below np_ipv4 is the integer representation then you convert it.