Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

KenLin

macrumors newbie
Original poster
Jul 3, 2007
4
0
Dear All,
I want to change IP address via cocoa's API or other function.
Is anyone knows how to change IP in program?

Thanks!
Ken Lin in trouble :apple:
 
Dear janey:
I want to write a program to change IP easier via cocoa.

Thanks,
Ken
 
Dear Ken,

My question is asking you why one would want to change an IP address in such a manner when there are so many things that factor into this that the end user does not have control over?

Thanks,
Jane
 
Dear Ken,

My question is asking you why one would want to change an IP address in such a manner when there are so many things that factor into this that the end user does not have control over?

Thanks,
Jane
_______
Dear Jane:
Because i want to write a wireless dongle program, and i need to change / specify dongle's host IP address.

Thanks
Ken
 
You could always do a shell out from your program to launch ifconfig with the required settings to change the ip address.
 
You can do this in Terminal.
Code:
sudo ifconfig en1 inet 192.168.0.1
And I imagine you can run a shell script via cocoa.
 
Thanks: Jane, blaster_boy & lancestraz:

Yes, shell script can work.
Do u have any other method to change IP address? like API or other functions?

Ken
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.