Example #1
0
        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);
        }
Example #2
0
        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);
        }
Example #3
0
 public static extern int DhcpCreateOption(
     string IpAddress,
     uint OptionID,
     ref DHCP_OPTION OptionInfo);
Example #4
0
 public static extern int DhcpCreateOption(
     string IpAddress,
     uint OptionID,
     ref DHCP_OPTION OptionInfo);
Example #5
0
 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;
 }
Example #6
0
 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;
 }