Re: /etc/ethers not consulted by ether_hostton() ?
site_archiver@lists.apple.com Delivered-To: darwin-dev@lists.apple.com -- Terry On Mar 22, 2009, at 2:57 AM, Marc Balmer <marc@msys.ch> wrote: Am 22.03.2009 um 08:13 schrieb Terry Lambert: - Marc Balmer _______________________________________________ Do not post admin requests to the list. They will be ignored. Darwin-dev mailing list (Darwin-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/darwin-dev/site_archiver%40lists.appl... I know for a fact that there is code to support flat file lookup and I even identified it for you by file name and pointed you at the source code. Yeah, there are also module plugins for netinfo and DS and theoretically it's even possible to make other plugins. I'm sure you could also add Open Directory records, and (probably) plist files, to do the same thing. That no one has given you specific steps to activate flat file support probably only means you asked the question on a Friday. On Mar 20, 2009, at 6:49 AM, Marc Balmer wrote: While porting a piece of software from OpenBSD to Mac OS X 10.5.6, I found that /etc/ethers seems not to be read by ether_hostton(). I created an /etc/ethers file with a few entries, but neither my software nor e.g. tcpdump finds those entries. Does anybody here have some information on this? If this is the wrong mailing list to ask, pls tell me which one would be more appropriate. This appears to be handled in SEL_NAME case in the file lookup.subproj/file_module.c in the LibInfo project, which is part of libc/libSystem. Maybe you are formatting the contents incorrectly for parsing, and need to look at the source for the parse routine? Alternately, since it's in the file-module of LibInfo, maybe you have to do some sort of configuration dance to ensure that it's being consulted (I would have no idea what). I expect enumation by ether_line() would work in any case, assuming your file format was correct, since there are no explicit comparison items used in that case, as it's an iterator. Good luck (and before you ask, I have no idea what sort of dance would be necessary, you'll need to trace the code paths to find out). Thanks for your reply. In the meantime, with the help of an opendarwin developer, I found out the right steps. In short, /etc/ethers seems not to be supported on Mac OS X at all and all man pages mentioning seem to be just plain wrong. To get it working, a netinfo Ethernets database has to be built and then ether_hostton() and friends will use that information. I described this on http://mac.vnode.ch/wake.html . This email sent to site_archiver@lists.apple.com
participants (1)
-
Terry Lambert