예제 #1
0
파일: Routing.cs 프로젝트: Jaofeng/Library
 /// <summary></summary>
 /// <param name="baseStruct"></param>
 internal IPForwardRow(RouteTableManager.IPFORWARDROW baseStruct)
 {
     Dest      = RouteTableManager.UintToIp(baseStruct.dwForwardDest);
     Mask      = RouteTableManager.UintToIp(baseStruct.dwForwardMask);
     Policy    = baseStruct.dwForwardPolicy;
     NextHop   = RouteTableManager.UintToIp(baseStruct.dwForwardNextHop);
     IfIndex   = baseStruct.dwForwardIfIndex;
     Type      = baseStruct.dwForwardType;
     Proto     = baseStruct.dwForwardProto;
     Age       = baseStruct.dwForwardAge;
     NextHopAS = baseStruct.dwForwardNextHopAS;
     Metric    = baseStruct.dwForwardMetric1;
 }
예제 #2
0
파일: Routing.cs 프로젝트: Jaofeng/Library
 /// <summary></summary>
 /// <returns></returns>
 internal RouteTableManager.IPFORWARDROW GetBaseStruct()
 {
     return(new RouteTableManager.IPFORWARDROW()
     {
         dwForwardDest = RouteTableManager.IpToUint(Dest),
         dwForwardMask = RouteTableManager.IpToUint(Mask),
         dwForwardPolicy = Policy,
         dwForwardNextHop = RouteTableManager.IpToUint(NextHop),
         dwForwardIfIndex = IfIndex,
         dwForwardType = Type,
         dwForwardProto = Proto,
         dwForwardAge = Age,
         dwForwardNextHopAS = NextHopAS,
         dwForwardMetric1 = Metric,
         dwForwardMetric2 = -1,
         dwForwardMetric3 = -1,
         dwForwardMetric4 = -1,
         dwForwardMetric5 = -1
     });
 }