protected SearchIndex.CZ_INDEX_INFO IndexInfoAtPos(uint Index_Pos) { SearchIndex.CZ_INDEX_INFO czIndexInfo = new SearchIndex.CZ_INDEX_INFO(); this.FileStrm.Seek((long)(this.Index_Set + 7U * Index_Pos), SeekOrigin.Begin); czIndexInfo.IpSet = this.GetUInt32(); czIndexInfo.Offset = this.GetOffset(); this.FileStrm.Seek((long)czIndexInfo.Offset, SeekOrigin.Begin); czIndexInfo.IpEnd = this.GetUInt32(); return(czIndexInfo); }
protected SearchIndex.CZ_INDEX_INFO IndexInfoAtPos(uint Index_Pos) { SearchIndex.CZ_INDEX_INFO cZ_INDEX_INFO = new SearchIndex.CZ_INDEX_INFO(); this.FileStrm.Seek((long)((ulong)(this.Index_Set + 7u * Index_Pos)), SeekOrigin.Begin); cZ_INDEX_INFO.IpSet = this.GetUInt32(); cZ_INDEX_INFO.Offset = this.GetOffset(); this.FileStrm.Seek((long)((ulong)cZ_INDEX_INFO.Offset), SeekOrigin.Begin); cZ_INDEX_INFO.IpEnd = this.GetUInt32(); return(cZ_INDEX_INFO); }
public string GetAddressWithIP(string IPValue) { if (!this.bFilePathInitialized) { return(""); } this.Initialize(); uint uint32 = this.IPToUInt32(IPValue); while (true) { this.Search_Set = this.IndexInfoAtPos(this.Search_Index_Set); this.Search_End = this.IndexInfoAtPos(this.Search_Index_End); if (uint32 < this.Search_Set.IpSet || uint32 > this.Search_Set.IpEnd) { if (uint32 < this.Search_End.IpSet || uint32 > this.Search_End.IpEnd) { this.Search_Mid = this.IndexInfoAtPos((this.Search_Index_End + this.Search_Index_Set) / 2U); if (uint32 < this.Search_Mid.IpSet || uint32 > this.Search_Mid.IpEnd) { if (uint32 < this.Search_Mid.IpSet) { this.Search_Index_End = (this.Search_Index_End + this.Search_Index_Set) / 2U; } else { this.Search_Index_Set = (this.Search_Index_End + this.Search_Index_Set) / 2U; } } else { goto label_8; } } else { goto label_6; } } else { break; } } return(this.ReadAddressInfoAtOffset(this.Search_Set.Offset)); label_6: return(this.ReadAddressInfoAtOffset(this.Search_End.Offset)); label_8: return(this.ReadAddressInfoAtOffset(this.Search_Mid.Offset)); }