/// <summary> /// Get the bytes for total storage /// </summary> /// <returns> /// Bytes gotten. /// </returns> public byte[] GetBytes() { /* * +------------+-----------+ * | 4bytes | 4bytes | * +------------+-----------+ * start ip index ptr */ byte[] b = new byte[8]; IpTool.WriteIntLong(b, 0, IndexStartIp); IpTool.WriteIntLong(b, 4, IndexPtr); return(b); }
public byte[] GetBytes() { /* * +------------+-----------+-----------+ * | 4bytes | 4bytes | 4bytes | * +------------+-----------+-----------+ * start ip end ip data ptr + len */ byte[] b = new byte[12]; IpTool.WriteIntLong(b, 0, StartIP); //start ip IpTool.WriteIntLong(b, 4, EndIp); //end ip //write the data ptr and the length long mix = DataPtr | ((DataLen << 24) & 0xFF000000L); IpTool.WriteIntLong(b, 8, mix); return(b); }