Sam's Blog

Good Place to share my experiences and ideas

 
Finance
Just came across to this wonderful site www.getrichslowly.org
Fitness
Check this one out www.getfitslowly.com
आपली मराठी
मराठी सिनेमा आणी नाटकं online पहा www.aapalimarathi.com
गीत रामायण संकेतस्थळ
Saturday, January 28, 2006
ग. दि मां चे संकेस्थळ इथे आहे. जरुर भेट द्या.
तुम्ही गीतरामायण online ऐकु शकता
posted by Sameer @ 10:53 AM   0 comments
Get Free Linux CDS
Tuesday, March 15, 2005
Ubuntu is new linux distribution they are sending CDs free of charge.

"Ubuntu" is an ancient African word, meaning "humanity to others". Ubuntu also means "I am what I am because of who we all are". The Ubuntu Linux distribution brings the spirit of Ubuntu to the software world.


Want to know more about ...visit
http://www.ubuntulinux.org/
Read about Free CDs at
http://www.ubuntulinux.org/support/documentation/faq/shipit/
posted by Sameer @ 11:15 AM   0 comments
Novel Linux Desktop 9
Hi Friends,
Its been long time after my last post. Now got some free time from busy office schedule. Novel Linux Desktop (NLD) is new linux distro targettted for coprporate users. I tried it in our office and found that it has good mix of power and flexibility. It has everything a desktop user will need. With YAST2, the configuration was very easy. Hardware detection the worst part of the linux is made very simple in this distribution(I was surprised to see whne we plug our flash ram into USB port is was automatically detected and files were show in browser instataneously). I am die hard fan of Red Hat but now I am also thinking of using it. So my desktop will now have RH9, NLD and Windows XP. I will advice linux users and linux newbies to give try to this distro.

Labels:

posted by Sameer @ 11:05 AM   0 comments
C code to find out network interfaces and mac address in Redhat Linux
Saturday, January 15, 2005
i needed mac address of network interface in linux for my program. Many people advised me to look into the code of ifconfig. But is is very vast i was finding spme small function that will do my work. Previously I was reading some files in /proc file system to get this id, but in Redhat linux 9.0 I was not able to find the interface file. So I searched the internet and here is the code

#include
#include
//#include
#include
#include
#include
#include
#include
#include
#include
#include

using namespace std;

int main()
{
struct ifreq ifr;
struct if_nameindex* if_name;
unsigned char* mac;
int sd;
int i = 0;

/* get socket descriptor */
sd = socket(PF_INET, SOCK_DGRAM, IPPROTO_IP);
if(sd == -1)
{ cerr << "Socket Error" << endl; exit(1);}

/* get all network interface names */
if_name = if_nameindex();

while( (if_name[i].if_index != 0) && (if_name[i].if_name != NULL) )
{
/* write the name of the interface to the ifreq struct */
memcpy(&ifr.ifr_name, if_name[i].if_name, IFNAMSIZ);

/* get hardware address */
if (ioctl(sd, SIOCGIFHWADDR, &ifr) < 0)
{ cerr << "ioctl Error: SIOCGIFHWADDR" << endl; exit(1); }

mac = (unsigned char*) &ifr.ifr_hwaddr.sa_data;

/cout << if_name[i].if_name << endl;

/* display MAC */
printf("%02X:%02X:%02X:%02X:%02X:%02Xn", mac[0],mac[1],mac[2],mac[3],mac[4],mac[5]);

++i;
}
/* free memory allocated by if_nameindex() */
if_freenameindex(if_name);
return 0;
}
posted by Sameer @ 4:50 AM   0 comments
Gamil Notifier
Thursday, January 06, 2005
Cool Tool!!
It has buit in proxy authentication also, very helpful for people sitting behind firewall. It does the work of loggin in to mail account for you and if new mail arrives it shows it in small popup window. Double click its icon in task tray will open gmail inbox in browser.
posted by Sameer @ 9:00 AM   0 comments
Bluejacking
Tuesday, January 04, 2005
Bluejacking is coolest use bluetooth of your mobile phone.
Want to know more visit
http://www.bluejackq.com/whatisbluejacking.htm

But here in india we don't have so many mobile phone users with bluetooth :-(

posted by Sameer @ 10:20 PM   0 comments
First Post
Monday, January 03, 2005
Just thought why should not I start a blogging ?
And opened accont here..
posted by Sameer @ 1:06 PM   0 comments
About Me

Name: Sameer
Home:
About Me:
See my complete profile
Previous Post
Archives
Links
Powered by

Free Blogger Templates

BLOGGER

© 2005 Sam's Blog Template by Isnaini Dot Com