2 package org.smallfoot.wwn;
4 import java.math.BigInteger;
47 else if (wwn.matches(
"500a098.*"))
62 String res = super.toString();
63 if (null == res) res =
"";
100 BigInteger serDirPort =
wwn.subtract(
wwn.shiftRight(36).shiftLeft(36));
103 BigInteger serPort[] = serDirPort.divideAndRemainder(
new BigInteger(
"1000000",16));
113 int controller = (serPort[0].intValue() / 0x010) % 8;
114 int offset = (serPort[0].intValue() / 0x100) % 8;
116 if (0 == offset) SP =
'N';
117 else SP += (offset-1);
120 return res + String.format(
"NetApp-%04x-SP%d%c",serPort[1].intValue() % 0x10000,controller,SP);
122 return res + String.format(
"NetApp-%06x-iGrp%d-0%c",serPort[1].intValue(),controller,SP);