LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
Search this Thread
Old 05-30-2002, 05:40 AM   #1
jmdey
LQ Newbie
 
Registered: Jan 2001
Location: india
Posts: 9

Rep: Reputation: 0
Question any sys call to get ip address of NIC


hi!
Could someone tell me if there is any system call using which i can get the ip address of the machine.
i dont want to run through the shell like me friend has asked me to do by running the "ifconfig" command but get it by programming.
can anyone help me?

jmdey
 
Old 05-30-2002, 02:50 PM   #2
mikek147
Member
 
Registered: Mar 2002
Location: Elyria, Ohio
Distribution: Debian, Nothing else required
Posts: 141

Rep: Reputation: 15
You might check into the system call gethostbyaddr(3). That should do what you want. -mk
 
Old 05-30-2002, 03:09 PM   #3
kill-hup
Member
 
Registered: Aug 2000
Location: NY - USA
Distribution: Slackware
Posts: 109

Rep: Reputation: 15
I've never done this in C myself, but I do recall someone doing sonething like it with Python: http://aspn.activestate.com/ASPN/Coo...n/Recipe/65449

I know it's not *exactly* what you wanted, but it might steer you in the right direction.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
question about select sys call xatzipol Programming 1 10-30-2005 09:22 AM
kernel : how to add sys call through modules only? pinkeshzaveri Programming 1 09-14-2005 03:17 AM
Write sys call failing ppy Programming 1 11-05-2004 08:57 AM
Any sys call to list all users ? dileepkk Linux - General 5 07-06-2004 06:04 PM
Kill sys call eshwar_ind Programming 4 05-07-2004 11:41 AM


All times are GMT -5. The time now is 01:36 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration