private A_Record ParseAAAARecord(byte[] reply,ref int offset,int rdLength,int ttl)
{
// IPv6 = 16xbyte
byte[] ip = new byte[rdLength];
Array.Copy(reply,offset,ip,0,rdLength);
// Covert byte array to IPv6
// ip = 8 x 2byte blocks in HEX
string ipStr = "";
if(rdLength == 16){
for(int i=1;i<16;i+=2){
long a = (ip[i-1] << 8) | ip[i];
ipStr += a.ToString("x");
if(i < 15){
ipStr += ":";
}
}
}
return new A_Record(ipStr,ttl);
}