Exemple #1
0
 public Route(RouteTableManager.MIB_IPFORWARDROW baseStruct)
 {
     Destination = 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;
 }
Exemple #2
0
 public RouteTableManager.MIB_IPFORWARDROW GetBaseStruct()
 {
     return(new RouteTableManager.MIB_IPFORWARDROW()
     {
         dwForwardDest = RouteTableManager.IpToUint(Destination),
         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
     });
 }