Tag:
IP address

Clone a VirtualBox Guest VM

by
on
September 13, 2010

Having a clone of a particular VM is helpful whether you want to keep a backup vanilla image to use in the future, or create a cluster of identical machines that can run in parallel. This process is not well documented and can be slightly tricky. Hopefully this guide will help many of you through [...]

Read More
No Comments
virtualbox

How to SSH into Ubuntu LiveCD

by
on
December 16, 2008

The ability to remotely SSH into a machine running an Ubuntu LiveCD can come in handy in many situations. The LiveCD supports a large variety of hardware and can be used to troubleshoot system problems on a machine where you have limited or no access. A user with limited skills can easily setup remote access [...]

Read More
2 Comments
ubuntu

Find IP address from remote end of a TCP socket

by
on
October 31, 2008

In C or C++ it is fairly simple to find the IP address of the remote end of a TCP socket. The following example shows how to do this using the getpeername() and inet_ntoa() system calls. int sockfd; int len; char * hostip; struct sockaddr_in sin; len = sizeof(sin); if (0 != getpeername(sockfd, (struct sockaddr [...]

Read More
No Comments
C

Find your IP address with ifconfig

by
on
October 30, 2008

You can find the IP address of your system at the command line by using the ifconfig command. The ifconfig command will show you information on all your network interfaces. If no arguments are given ifconfig displays the status of the currently active interfaces. You have to run this command as root or use sudo. [...]

Read More
No Comments
system administration

Display hostname and IP address in C

by
on
October 18, 2008

Here is a good way to determine the hostname and IP address of the local machine in C. You first have to grab the hostname with gethostname(). char hostbuf[256]; gethostname(hostbuf,sizeof(hostbuf)); Take the hostname and use it to grab the hostent struct with gethostbyname(). struct hostent *hostentry; hostentry = gethostbyname(hostbuf); Finally you have to take the [...]

Read More
4 Comments
C
Copyright 2008-2010 WiredRevolution.com. All rights reserved.