public void SetMtu(uint mtu) { Logger.Debug($"Setting MTU on Interface({IntfIndex})"); var r = IPNetHelper.InitInterface(IntfIndex); r.NlMtu = mtu; IPNetHelper.SetInterface(r); }
public void RestoreMetric() { Logger.Debug($"Restoring Metric on Interface({IntfIndex})"); var r = IPNetHelper.InitInterface(IntfIndex); r.Metric = _defaultInterfaceMetric; r.UseAutomaticMetric = 1; IPNetHelper.SetInterface(r); }
public void SetMetric(uint metric) { Logger.Debug($"Setting Metric on Interface({IntfIndex})"); var r = IPNetHelper.InitInterface(IntfIndex); r.Metric = metric; r.UseAutomaticMetric = 0; IPNetHelper.SetInterface(r); }
public void SetIgnoreDefaultRoute(bool setting) { Logger.Debug(setting ? $"Ignoring Default Route on Interface({IntfIndex})" : $"Reverting Default Route on Interface({IntfIndex})"); var r = IPNetHelper.InitInterface(IntfIndex); r.DisableDefaultRoutes = (byte)(setting ? 1 : 0); IPNetHelper.SetInterface(r); }