public static int DhcpSetOptionValue(string server, DhcpOption Option) { DHCP_OPTION_SCOPE_INFO scopeInfo = new DHCP_OPTION_SCOPE_INFO(); scopeInfo.ScopeType = DHCP_OPTION_SCOPE_TYPE.DhcpGlobalOptions; DHCP_OPTION convertedOption = new DHCP_OPTION(); //convertedOption. int success = dhcpsapimethods.DhcpSetOptionValue(server, Option.OptionID, ref scopeInfo, ref convertedOption.DefaultValue); return(success); }
public static int DhcpCreateOption(string ipAddress, DhcpOption Option) { DHCP_OPTION convertedOption = new DHCP_OPTION(); convertedOption.OptionType = Option.OptionType; convertedOption.OptionName = Option.OptionName; convertedOption.OptionID = Option.OptionID; convertedOption.OptionComment = Option.OptionComment; convertedOption.DefaultValue = ConvertToNative(Option); int success = dhcpsapimethods.DhcpCreateOption(ipAddress, convertedOption.OptionID, ref convertedOption); return(success); }
public static extern int DhcpCreateOption( string IpAddress, uint OptionID, ref DHCP_OPTION OptionInfo);
public static int DhcpSetOptionValue(string server, DhcpOption Option) { DHCP_OPTION_SCOPE_INFO scopeInfo = new DHCP_OPTION_SCOPE_INFO(); scopeInfo.ScopeType = DHCP_OPTION_SCOPE_TYPE.DhcpGlobalOptions; DHCP_OPTION convertedOption = new DHCP_OPTION(); //convertedOption. int success = dhcpsapimethods.DhcpSetOptionValue(server, Option.OptionID, ref scopeInfo, ref convertedOption.DefaultValue); return success; }
public static int DhcpCreateOption(string ipAddress, DhcpOption Option) { DHCP_OPTION convertedOption = new DHCP_OPTION(); convertedOption.OptionType = Option.OptionType; convertedOption.OptionName = Option.OptionName; convertedOption.OptionID = Option.OptionID; convertedOption.OptionComment = Option.OptionComment; convertedOption.DefaultValue = ConvertToNative(Option); int success = dhcpsapimethods.DhcpCreateOption(ipAddress, convertedOption.OptionID, ref convertedOption); return success; }