|
|
|
|
|
|
| Author |
Message |
Dances With Crows *nix forums Guru
Joined: 01 Mar 2005
Posts: 328
|
Posted: Wed Sep 07, 2005 11:50 am Post subject:
Re: Help-----what the API "getnetconfig" can not be found in Linux
|
|
|
On Wed, 7 Sep 2005 15:49:34 +0800, Gavin Yu staggered into the Black Sun
and said:
| Quote: | We want to port our program running on Solaris5.8 to Linux(redhat).
During this, we found there were not corresponding functions to
replace the API "getnetconfig, setnetconfig, endnetconfig,
getnetconfigent, freenetconfigent".
At the same time, we also found the file "etc/netconfig" does not
exist on Linux. Does anyone can tell us how to port above functions?
|
Google http://www.cs.biu.ac.il/cgi-bin/man?netconfig+4 says this is a
Solaris/SunOS-specific thing. It doesn't exist in the same way on
Linux; there aren't typically any device nodes for your eth0..eth9
devices.[0] You can figure out how many network devices there are and
what their IP (and IPV6, if present) addresses are by popen()ing
/sbin/ifconfig and parsing what you get back. There are ioctls you can
call and files in /proc you can read to get that information, of course,
but running ifconfig is probably faster than rewriting it.
Also, when you're asking for things like this, you typically get better
results when you explain more of the larger picture. Don't say, "What
is the equivalent to Win32MultiMediaCrud() in Linux?", say "I need to
keep audio/video synced to +/- 0.05 seconds in the video player I'm
writing; how could I do that?" What are you using getnetconfig() et al
*for* here, in other words? HTH anyway,
[0] There can be, but that particular kernel option is only rarely
turned on.
--
Matt G|There is no Darkness in Eternity/But only Light too dim for us to see
Brainbench MVP for Linux Admin / mail: TRAP + SPAN don't belong
http://www.brainbench.com / "He is a rhythmic movement of the
-----------------------------/ penguins, is Tux." --MegaHAL |
|
| Back to top |
|
 |
Gavin Yu *nix forums beginner
Joined: 07 Sep 2005
Posts: 16
|
Posted: Wed Sep 07, 2005 5:49 am Post subject:
Help-----what the API "getnetconfig" can not be found in Linux
|
|
|
Hi,
We want to port our program running on Solaris5.8 to Linux(redhat).
During this, we found there were not corresponding functions to replace
the API "getnetconfig, setnetconfig, endnetconfig, getnetconfigent,
freenetconfigent".
At the same time, we also found the file "etc/netconfig" does not exist
on Linux.
Does anyone can tell us how to port above functions?
Thanks in advance!
Gavin Yu |
|
| Back to top |
|
 |
Google
|
|
| Back to top |
|
 |
|
|
The time now is Thu Jan 08, 2009 5:52 am | All times are GMT
|
|
Buy Anything On eBay | Credit Card | Myspace Backgrounds | Debt Consolidation | Bankruptcy
|
|
Copyright © 2004-2005 DeniX Solutions SRL
|
|
|
|
Other DeniX Solutions sites:
Unix/Linux blog |
electronics forum |
medicine forum |
science forum |
|
|
Privacy Policy
|
Powered by phpBB © 2001, 2005 phpBB Group
|
|