Search
Module:
Directory

   Desktop Functions:

   Smart Device Functions:


Show Recent Changes
Subscribe (RSS)
Misc. Pages
Comments
FAQ
Helpful Tools
Playground
Suggested Reading
Website TODO List
Support Forum
Download Visual Studio Add-In

Terms of Use
Privacy Policy

Search Results for "IPAddress" in [All]

dnsapi

.

        public uint IpAddress;      // IP4_ADDRESS IpAddress;

.

        public System.Net.IPAddress IPAddressObject { get { return new IPAddress((long)IpAddress); } }

.

        public uint IpAddress;      // IP4_ADDRESS IpAddress;

.

    /// <param name="ipAddress">The unsigned int to convert to an ip address object</param>

.

    public static IPAddress ConvertUintToIpAddress(uint ipAddress)

.

        // Network byte order (what the IPAddress object requires) is big endian

.

        addressBytes[0] = (byte)((ipAddress & 0xFF000000u) >> 24);

.

        addressBytes[1] = (byte)((ipAddress & 0x00FF0000u) >> 16);

.

        addressBytes[2] = (byte)((ipAddress & 0x0000FF00u) >> 8);

.

        addressBytes[3] = (byte)(ipAddress & 0x000000FFu);

.

        return new IPAddress(addressBytes);

.

    public static IPAddress ConvertAAAAToIpAddress(DNS_AAAA_DATA data)

.

        return new IPAddress(addressBytes);

.

        public uint IpAddress;      // IP4_ADDRESS IpAddress;

.

        public uint IpAddress;      // IP4_ADDRESS IpAddress;

.

        /// <param name="ipAddress">The unsigned int to convert to an ip address object</param>

.

        public static IPAddress ConvertUintToIpAddress(uint ipAddress)

.

        // Network byte order (what the IPAddress object requires) is big endian

.

        addressBytes[0] = (byte)((ipAddress & 0xFF000000u) >> 24);

.

        addressBytes[1] = (byte)((ipAddress & 0x00FF0000u) >> 16);

.

        addressBytes[2] = (byte)((ipAddress & 0x0000FF00u) >> 8);

.

        addressBytes[3] = (byte)(ipAddress & 0x000000FFu);

.

        return new IPAddress(addressBytes);

.

        public static IPAddress ConvertAAAAToIpAddress(DNS_AAAA_DATA data)

.

        return new IPAddress(addressBytes);

.

    private const int IpAddressV6LengthBytes = 16;

.

    private const int IpAddressV4LengthBytes = 4;

.

    public static IDictionary<string, object>[] QueryDNSForRecordTypeSpecificNameServers(string domainName, IPAddress[] dnsServers, DnsRecordTypes recordType)

.

    private static void MakeDnsRequest(string domainName, IPAddress[] dnsServers, QueryCompletionContext context, out IntPtr requestBuffer, out IntPtr addrBuffer, out IntPtr contextBuffer)

.

        foreach (IPAddress addr in dnsServers)

.

            Buffer.BlockCopy(ipv4AddressBytes, 0, sockAddrIn.SinAddr, 0, IpAddressV4LengthBytes);

.

            sockAddrIn.SinPort = (ushort)IPAddress.HostToNetworkOrder(DNSPort);

.

            sockAddrIn6.Sin6Port = (ushort)IPAddress.HostToNetworkOrder(DNSPort);

.

            Buffer.BlockCopy(ipv6AddressBytes, 0, sockAddrIn6.Sin6Addr, 0, IpAddressV6LengthBytes);

.

                string recordValue = ConvertUintToIpAddress(record.Value.Data.A.IpAddress).ToString();

.

                string recordValue = ConvertAAAAToIpAddress(record.Value.Data.AAAA).ToString();

.

    private static IPAddress ConvertUintToIpAddress(uint ipAddress)

.

        ipAddress = (uint)IPAddress.NetworkToHostOrder((int)ipAddress);

.

        addressBytes[0] = (byte)((ipAddress & 0xFF000000u) >> 24);

.

        addressBytes[1] = (byte)((ipAddress & 0x00FF0000u) >> 16);

.

        addressBytes[2] = (byte)((ipAddress & 0x0000FF00u) >> 8);

.

        addressBytes[3] = (byte)(ipAddress & 0x000000FFu);

.

        return new IPAddress(addressBytes);

.

    private static IPAddress ConvertAAAAToIpAddress(DNS_AAAA_DATA data)

.

        return new IPAddress(addressBytes);

.

        public uint IpAddress;

.

        [MarshalAs(UnmanagedType.ByValArray, SizeConst = IpAddressV4LengthBytes)]

.

        this.sinAddr = new byte[IpAddressV4LengthBytes];

.

        [MarshalAs(UnmanagedType.ByValArray, SizeConst = IpAddressV6LengthBytes)]

.

        this.sin6Addr = new byte[IpAddressV6LengthBytes];

advapi32

.

        TcpListener tcpListener = new TcpListener(IPAddress.Loopback, 0);

.

        m_tcpListener = New TcpListener(IPAddress.Loopback, 0)

icmp

.

        public bool Ping(IPAddress ip)

dhcpsapi

.

    string ServerIpAddress,

.

    public uint ReservedIpAddress;

.

    reservation.ReservedIpAddress = address;

.

        public UInt32 DHCPIPAddress;

.

        DhcpClientIpAddress,

.

    Dim DHCPIPAddress As UInt32

.

    DhcpClientIpAddress

.

    Public Sub DeleteDHCPLease(ByVal IPAddress As String)

.

    Dim Octets() As String = IPAddress.Split(".")

.

    ClientInfo.DHCPSearchInfoType = DHCP_SEARCH_INFO_TYPE.DhcpClientIpAddress

.

    ClientInfo.DHCPIPAddress = Convert.ToUInt32(HexIP, 16)

.

        public UInt32 DHCPIPAddress;

.

        DhcpClientIpAddress,

.

    public static void DoDeletion(string IPAddress)

.

        string [] Octets= IPAddress.Split(dot[0]);

.

    ClientInfo.DHCPSearchInfoType = (int)DHCP_SEARCH_INFO_TYPE.DhcpClientIpAddress;

.

    ClientInfo.DHCPIPAddress = Convert.ToUInt32(HexIP, 16);

.

            outlist[i].ServerAddress = UInt32IPAddressToString(serverList[i].ServerAddress);

.

    private string UInt32IPAddressToString(uint ipAddress)

.

        IPAddress ipA = new IPAddress(ipAddress);

.

    string ServerIpAddress,

.

Declare Unicode Function DhcpEnumSubnetClients Lib "Dhcpsapi" (ByVal ServerIpAddress As String, ByVal SubnetAddress As Integer, ByRef ResumeHandle As Integer, ByVal PreferredMaximum As Integer, ByRef ClientInfo As IntPtr, ByRef ClientsRead As Integer, ByRef ClientsTotal As Integer) As Integer

.

Declare Unicode Function DhcpEnumSubnetClients Lib "dhcpsapi" (ByVal ServerIpAddress As String, ByVal SubnetAddress As Int32, ByRef ResumeHandle As IntPtr, ByVal PreferredMaximum As Integer, ByRef ClientInfo As IntPtr, ByRef ClientsRead As Integer, ByRef ClientsTotal As Integer) As Integer

.

    Dim ClientIpAddress As Int32

.

    Dim IpAddress As Int32

.

    public string IpAddress;

.

    public uint IpAddress;

.

    public uint ClientIpAddress;

.

        string ServerIpAddress = Server;

.

        uint SubnetMask = StringIPAddressToUInt32(Subnet);

.

        Response = DhcpEnumSubnetClients(ServerIpAddress, SubnetMask, ref ResumeHandle,

.

        clients_array[i].IpAddress = UInt32IPAddressToString(curr_element.ClientIpAddress);

.

    public static uint StringIPAddressToUInt32(string ip_string)

.

        IPAddress IpA = System.Net.IPAddress.Parse(ip_string);

.

    public static string UInt32IPAddressToString(uint ipAddress)

.

        IPAddress ipA = new IPAddress(ipAddress);

.

        string ServerIpAddress,

.

    string ServerIpAddress,

.

public static List<DhcpIpAddress> GetReservedIps(DhcpServer server, DhcpIpAddress subnet) {

.

    List<DhcpIpAddress> reservations = new List<DhcpIpAddress>();

.

                reservations.Add(new DhcpIpAddress(reservation.ReservedIpAddress));

.

    string ServerIpAddress,

.

Declare Unicode Function DhcpEnumSubnets Lib "Dhcpsapi" (ByVal ServerIpAddress As String, ByRef ResumeHandle As Integer, ByVal PreferredMaximum As Integer, ByRef EnumInfo As IntPtr, ByRef ElementsRead As Integer, ByRef ElementsTotal As Integer) As Integer

.

ServerIpAddress - [in] Unicode string that specifies the IP address of the DHCP server

.

    String ServerIpAddress = "192.168.0.250";

.

    DHCPResult = DhcpEnumSubnets(ServerIpAddress, ref resumeHandle, 1000, out ips, ref nr, ref total);

.

       IntPtr outArray = ipArray.IPAddresses;

.

       DHCP_IP_ADDRESS[] ipAddressArray = new DHCP_IP_ADDRESS[size];

.

      ipAddressArray[i] = new DHCP_IP_ADDRESS();

.

      Marshal.PtrToStructure(current, ipAddressArray[i]);

.

      current = (IntPtr)((int)current + Marshal.SizeOf(ipAddressArray[i]));

.

      Console.WriteLine("{0}", UInt32IPAddressToString(ipAddressArray[i].IPAddress));

.

    string ServerIpAddress,

.

    public IntPtr IPAddresses;

.

    public UInt32 IPAddress;

.

public static string UInt32IPAddressToString(UInt32 ipAddress)

.

    IPAddress ipA = new IPAddress(ipAddress);

.

Declare Unicode Function DhcpEnumSubnets Lib "Dhcpsapi" (ByVal ServerIpAddress As String, ByRef ResumeHandle As UInteger, ByVal PreferredMaximum As UInteger, ByRef EnumInfo As IntPtr, ByRef ElementsRead As UInteger, ByRef ElementsTotal As UInteger) As UInteger

.

    Dim ServerIpAddress As String = "192.168.0.250"

.

    DHCPResult = DhcpEnumSubnets(ServerIpAddress, resumeHandle, 1000, ips, nr, total)

.

        Dim outArray As IntPtr = ipArray.IPAddresses

.

        Dim ipAddressArray() As DHCP_IP_ADDRESS = New DHCP_IP_ADDRESS((size) - 1) {}

.

        ipAddressArray(i) = New DHCP_IP_ADDRESS

.

        Marshal.PtrToStructure(current, ipAddressArray(i))

.

        current = CType((CType(current, Integer) + Marshal.SizeOf(ipAddressArray(i))), IntPtr)

.

        Console.WriteLine("{0}", UInt32IPAddressToString(ipAddressArray(i).IPAddress))

.

    Public IPAddresses As IntPtr

.

    Public IPAddress As UInt32

.

    Public Shared Function UInt32IPAddressToString(ByVal ipAddress As UInt32) As String

.

    Dim ipA As Net.IPAddress = New Net.IPAddress(ipAddress)

.

/// <param name="ServerIpAddress">[in] Unicode string that specifies the IP address of the DHCP server.</param>

.

   String ServerIpAddress,

.

    ''' <param name="ServerIpAddress">[in] Unicode string that specifies the IP address of the DHCP server.

.

        ByVal ServerIpAddress As String, _

.

        Dim searchInfoType As DHCP_SEARCH_INFO_TYPE = DHCP_SEARCH_INFO_TYPE.DhcpClientIpAddress

.

        searchInfo.ClientIpAddress = ConvertIPAddress(clientIP)

.

    Public Shared Function ConvertIPAddress(ByVal ipAddress As String) As UInt32

.

        Dim Octets As String() = ipAddress.Split(dot(0))

.

        String ServerIpAddress = "192.168.0.250";

.

        DHCP_SEARCH_INFO_TYPE searchInfoType = DHCP_SEARCH_INFO_TYPE.DhcpClientIpAddress;

.

        searchInfo.ClientIpAddress = ConvertIPAddress("192.168.0.10");

.

        DHCPResult = DhcpGetClientInfo(ServerIpAddress, ref searchInfo, out pClientInfo);

.

    public static UInt32 ConvertIPAddress(string ipAddress)

.

        string[] Octets = ipAddress.Split(dot[0]);

.

    si.SearchType = (int)DHCP_SEARCH_INFO_TYPE.DhcpClientIpAddress ;

.

    si.ClientIpAddress = StringIPAddressToUint32(client);

.

public uint StringIPAddressToUint32(string ip_string)

.

    IPAddress ipa = IPAddress.Parse(ip_string);

.

    string ServerIpAddress,

.

    ByVal ServerIpAddress As String, _

.

ServerIpAddress (in)

.

    string ServerIpAddress,

.

    public uint ReservedIpAddress;

.

    reservation.ReservedIpAddress = address;

.

  public uint ClientIpAddress;

.

   public UInt32 ClientIpAddress;

.

      DhcpClientIpAddress = 0,

.

    DhcpClientIpAddress = 0

httpapi

.

    public static void BindCertificate(string ipAddress, int port, byte[] hash)

.

        IPAddress ip = IPAddress.Parse(ipAddress);

wininet

.

    private const string IPADDRESS_PATTERN = @"^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$";

Constants

.

    public static PropertyKey PKEY_PNPX_IpAddress = new PropertyKey(0x656A3BB3, 0xECC0, 0x43FD, 0x84, 0x77, 0x4A, 0xE0, 0x40, 0x4A, 0x96, 0xCD, 0x00003009);   // VT_LPWSTR | VT_VECTOR

Structures

.

    public uint IpAddress;

.

   Dim IpAddress As Integer

.

    public IntPtr CurrentIpAddress;

.

    public IP_ADDR_STRING IpAddressList;

.

    Public CurrentIpAddress As Int32

.

    Public IpAddressList As IP_ADDR_STRING

.

    public IP_ADDRESS_STRING IpAddress;

.

    Public IpAddress As IP_ADDRESS_STRING

.

    public IPAddress LocalAddress

.

        get { return new IPAddress(localAddr, LocalScopeId); }

.

    public IPAddress RemoteAddress

.

        get { return new IPAddress(remoteAddr, RemoteScopeId); }

.

    public IPAddress LocalAddress

.

        get { return new IPAddress(localAddr); }

.

    public IPAddress RemoteAddress

.

        get { return new IPAddress(remoteAddr); }

.

    Public ReadOnly Property LocalAddress() As IPAddress

.

            Return New IPAddress(localAddr)

.

    Public ReadOnly Property RemoteAddress() As IPAddress

.

            Return New IPAddress(remoteAddr)

.

   public string szIpAddress;

.

   Dim szIpAddress As String

dtl

.

                slot = _ipAddress;

.

                string decip = ConvertIp(_ipAddress, ref hops);

ws2_32

27: bind
.

public static bool Bind(string ipAddress, int port, IntPtr socketHandle)

.

            remoteAddress.sin_addr = inet_addr(ipAddress);

.

   Public Function inet_ntoa(ByVal IpAddress As Integer) As String

29: send
.

    public AddressIP4 IPAddress;

.

    { this.Family = Family; this.Port = Port; this.IPAddress = IP; this.Zero = 0; }

30: SendTo
.

    public AddressIP4 IPAddress;

.

    { this.Family = Family; this.Port = Port; this.IPAddress = IP; this.Zero = 0; }

iphlpapi

.

static extern int AddIPAddress(int Address, int IpMask, int IfIndex,

.

Declare Function AddIPAddress Lib "iphlpapi.dll" (TODO) As TODO

.

      [DllImport("iphlpapi.dll", EntryPoint = "AddIPAddress", SetLastError = true)]

.

        private static extern UInt32 MyAddIPAddress( UInt32 Address, UInt32 IpMaskint, int IfIndex,

.

        AddIPAddress("1.1.100.2", "255.255.0.0", 2);

.

      public void AddIPAddress(String IPAddress, String SubnetMask, int ifIndex)

.

        System.Net.IPAddress IPAdd = System.Net.IPAddress.Parse(IPAddress);

.

        System.Net.IPAddress SubNet = System.Net.IPAddress.Parse(SubnetMask);

.

        UInt32 Result =  MyAddIPAddress((uint)IPAdd.Address,

.
Documentation
[AddIPAddress] on MSDN
.

        IF_TYPE_VIRTUALIPADDRESS = 112,  // IBM VIPA

.

    public static IList<IPAddress> GetIPAddresses(FAMILY family)

.

        List<IPAddress> addresses = new List<IPAddress>();

.

            IPAddress ipAddr = new IPAddress(saData);

.

         Console.WriteLine( "DHCP Server : {0}", entry.DhcpServer.IpAddress.Address );

.

       Console.WriteLine( "IP Address     : {0}", entry.IpAddressList.IpAddress.Address );

.

       Console.WriteLine( "Subnet Mask    : {0}", entry.IpAddressList.IpMask.Address );

.

       Console.WriteLine( "Default Gateway: {0}", entry.GatewayList.IpAddress.Address );

.

         Console.WriteLine( "Primary WINS Server  : {0}", entry.PrimaryWinsServer.IpAddress.Address );

.

         Console.WriteLine( "Secondary WINS Server: {0}", entry.SecondaryWinsServer.IpAddress.Address );

.

DestAddr is a 32 bit representation of the four IP bytes. For .NET 1.0, you can get this from IPAddress.Address. In .NET 1.1, this is obsolete. You can use BitConverter.ToUInt32(IPAddress.GetAddressBytes()) instead.

.

        IPAddress ipv4Address = (from thisAddress in hostInfo.AddressList

.

      Add-Member -InputObject $objOutput -MemberType NoteProperty -Name "LocalAddress" -Value ([System.Net.IPAddress]::new($y[$i].localAddr).IPAddressToString)

.

      Add-Member -InputObject $objOutput -MemberType NoteProperty -Name "RemoteAddress" -Value ([System.Net.IPAddress]::new($y[$i].remoteAddr).IPAddressToString)

.

    Public Function LocalAddress() As System.Net.IPAddress

.

        Return System.Net.IPAddress.Parse(dwLocalAddr.s_b1.ToString & "." & _

.

    Public Function RemoteAddress() As System.Net.IPAddress

.

        Return System.Net.IPAddress.Parse(dwRemoteAddr.s_b1.ToString & "." & _

.

static UInt32 GetIpAddressTable( [Out] IntPtr ipTable, [In,Out] IntPtr tableSize, bool sort);

.

  foreach (System.Net.IPAddress strIP in System.Net.Dns.GetHostAddresses(System.Net.Dns.GetHostName()))

.

    string ipAddrStr = IPToString( IPAddress.NetworkToHostOrder((int)addrStruct._address) );

.

    string ipMaskStr = IPToString( IPAddress.NetworkToHostOrder((int)addrStruct._mask) );

.

               IPAddress ip=new IPAddress(table[index].dwAddr);

.

            Dim ip As New IPAddress(table(index).dwAddr)

.

static extern TODO IPAddress(TODO);

.

Declare Function IPAddress Lib "iphlpapi.dll" (TODO) As TODO

.
Documentation
[IPAddress] on MSDN
.

    internal static UInt32 lIpFromString(string sIpAddress)

.

        string[] octets = sIpAddress.Split(new string[] { "." }, StringSplitOptions.None);

.

    internal static string[] GetLocalIpAddresses()

.

        string[] localIpAddresses = new string[host.AddressList.Length];

.

        localIpAddresses[i] = host.AddressList[i].ToString();

.

        return localIpAddresses;

.

        string[] localIpAddresses = GetLocalIpAddresses();

.

        if (localIpAddresses == null)

.

        foreach (string localAddress in localIpAddresses)

.

        result = IpPacketFilter.PfBindInterfaceToIPAddress(interfaceHandle, PFADDRESSTYPE.PF_IPV4, ref lLocalIp);

.
Summary
The PfBindInterfaceToIPAddress function associates an interface with the IP stack index having the specified address.
.

    [DllImport("iphlpapi.dll", EntryPoint = "PfBindInterfaceToIPAddress")]

.

    static extern uint PfBindInterfaceToIPAddress(IntPtr Interface_handle, uint pfatType, ref uint IPAddress);

.

Declare Function PfBindInterfaceToIPAddress Lib "iphlpapi.dll" (TODO) As TODO

.

    /// The PfBindInterfaceToIPAddress function associates an interface with the IP stack index having the specified address.

.

    /// <param name="IPAddress">[in] Pointer to an array of bytes that specifies the IP address for the interface.</param>

.

    internal static UInt32 lIpFromString(string sIpAddress)

.

        string[] octets = sIpAddress.Split(new string[] { "." }, StringSplitOptions.None);

.

    internal static string[] GetLocalIpAddresses()

.

        string[] localIpAddresses = new string[host.AddressList.Length];

.

        localIpAddresses[i] = host.AddressList[i].ToString();

.

        return localIpAddresses;

.

        string[] localIpAddresses = GetLocalIpAddresses();

.

        if (localIpAddresses == null)

.

        foreach (string localAddress in localIpAddresses)

.

        result = IpPacketFilter.PfBindInterfaceToIPAddress(interfaceHandle, PFADDRESSTYPE.PF_IPV4, ref lLocalIp);

.
Documentation
[PfBindInterfaceToIPAddress] on MSDN
.

    internal static UInt32 lIpFromString(string sIpAddress)

.

        string[] octets = sIpAddress.Split(new string[] { "." }, StringSplitOptions.None);

.

    internal static string[] GetLocalIpAddresses()

.

        string[] localIpAddresses = new string[host.AddressList.Length];

.

        localIpAddresses[i] = host.AddressList[i].ToString();

.

        return localIpAddresses;

.

        string[] localIpAddresses = GetLocalIpAddresses();

.

        if (localIpAddresses == null)

.

        foreach (string localAddress in localIpAddresses)

.

        result = IpPacketFilter.PfBindInterfaceToIPAddress(interfaceHandle, PFADDRESSTYPE.PF_IPV4, ref lLocalIp);

.

Public Shared Function GetMAC(ByVal IPAddress A

.

    Dim addr As IPAddress = IPAddress.Parse(IPAddress)

.

IPAddress dst = IPAddress.Parse(

.

// Please do not use the IPAddress.Address property

.

// This API is now obsolete. --> http://msdn.microsoft.com/en-us/library/system.net.ipaddress.address.aspx

winspool

.

     string szIPAddress="";

.

        if (XcvData(hXcv, "IPAddress", IntPtr.Zero, 0, buf, 256, out cbOutputNeeded, out dwStatus))

.

           szIPAddress= Marshal.PtrToStringAuto(buf);


 
Access PInvoke.net directly from VS: