LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 09-07-2008, 01:57 PM   #1
JaseyJaseJase
LQ Newbie
 
Registered: Sep 2008
Posts: 6

Rep: Reputation: 0
Changing my IP Address and Modifying the ARP table using c++


Hi

I'm trtying to find out how to change the IP address and ARP table on my linux box (Fedora). I'm assuming their my be some calls to a kernal module I use to do this, can anyone point me in the right direction?

Thanks

J
 
Old 09-07-2008, 02:57 PM   #2
lipun4u
Member
 
Registered: Sep 2008
Location: Mumbai, india
Distribution: ubuntu and hp-unix
Posts: 118

Rep: Reputation: 15
u can change ip address by

ifconfig eth0 192.168.0.1

etho is the interface
 
Old 09-07-2008, 04:05 PM   #3
JaseyJaseJase
LQ Newbie
 
Registered: Sep 2008
Posts: 6

Original Poster
Rep: Reputation: 0
Thanks

Hi thanks lipun4u

I'm looking for a way to do it directly from code rather than getting the code to call a system command. If I work out the way to do it I'l post the solution on here.

J
 
Old 09-08-2008, 03:01 AM   #4
jf.argentino
Member
 
Registered: Apr 2008
Location: Toulon (France)
Distribution: FEDORA CORE
Posts: 493

Rep: Reputation: 50
Hi

You have to use the SIOCSIFADDR ioctl
 
Old 09-08-2008, 12:20 PM   #5
JaseyJaseJase
LQ Newbie
 
Registered: Sep 2008
Posts: 6

Original Poster
Rep: Reputation: 0
Thanks

I tried using ictol, with the suggested define it work fine now for sertting IP address and adding/changing ARP enteries.

thanks for the pointer

J
 
  


Reply



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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Arp table poisoning cristian1983 Linux - Security 2 12-28-2007 01:31 PM
how to modify ARP table canci Programming 1 08-22-2006 10:31 PM
ARP table 98steve600 Linux - General 1 03-28-2005 03:25 AM
Outputting the ARP table spud Programming 2 03-09-2005 09:38 AM
How to create an proxyarp entry in arp table by using arp command? himalayas Linux - Networking 0 06-04-2003 04:14 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 02:30 AM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration