Tag Archives: ip
Resolve hostname to ip address in C

Resolve hostname to ip address (TCP v4) in Windows using C and gethostbyname. #include <stdio.h> #include <winsock2.h> #include <ws2tcpip.h>  …

Resolve hostname to ip address in C

Resolve hostname to ip address (TCP v4) in Windows using C and getaddrinfo. #include <stdio.h> #include <winsock2.h> #include <ws2tcpip.h>  …

Convert Long to IP in C#

IPAddress Long2IP(long addr) { try { return IPAddress.Parse(addr.ToString()); } catch { return null; } }IPAddress Long2IP(long addr) { try {…

Convert IP to Long in C#

long IP2Long(IPAddress addr) { try { String[] ipbytes; double num = 0;   ipbytes = addr.ToString().Split(’.’); for (int i =…

Monitoring Opened TCP/IP network ports/connections in Linux

tcptrack displays the status of TCP connections that it sees on a given network interface. tcptrack monitors their state and…

Monitoring Opened TCP/IP network ports / connections

CurrPorts is network monitoring software that displays the list of all currently opened TCP/IP and UDP ports on your local…

Get public/external IP address

Use the following code to get your wan/external/public ip address using http://dyndns.org site. try { System.Net.WebClient wc = new System.Net.WebClient();…

IP to Country

Open your Backtrack or any linux distro and execute: whois -h whois.arin.net x.y.z.q | grep Country:whois -h whois.arin.net x.y.z.q |…

Get ip address from TcpClient

To get ip address from a TcpClient do the following: IPEndPoint ipend = (IPEndPoint)mytcpclient.Client.RemoteEndPoint; Console.WriteLine(ipend.Address.ToString());IPEndPoint ipend = (IPEndPoint)mytcpclient.Client.RemoteEndPoint; Console.WriteLine(ipend.Address.ToString());

List network interfaces

Type the following command: ip link showip link show Output 1: lo: <LOOPBACK,UP,LOWER_UP> mtu 16436 qdisc noqueue state UNKNOWN link/loopback…

Previous Page · Next Page