Configuring for DHCP, OS 9.x with MoreNetworkSetup
Configuring for DHCP, OS 9.x with MoreNetworkSetup
- Subject: Configuring for DHCP, OS 9.x with MoreNetworkSetup
- From: John Andersson <email@hidden>
- Date: Fri, 9 May 2003 12:52:21 +0200
Hi! Excuse me if this has been brought up earlier. I didnt find
anything in the archives.
I've got 2 problems.
I want, from an installer I'm making, set TCP/IP to use DHCP over
Ethernet. I run this function to find the ethernet port:
if (!OTFindPort(&portRec, "enet"))
{
// Handle error
}
My problem is, that this seems to return the Airport port, if its
available (or selected in AppleTalk?). Is there a better word to search
for, or do I have to scan through ports and examine them better?
My other problem (on a computer where problem #1 does not exist) is
that after the setup is complete, TCP/IP sometimes doesnt work
(explorer cant load URL's).
If I open TCP/IP and change something and close it again, it all works
(i.e. when TCP/IP has saved my settings "again").
I have this problem when configuring TCP/IP for PPP as well.
Do anyone of you skilled people see anything wrong with this code?
(I init and close opentransport before and after this).
OTMemzero(&digest, sizeof(digest));
digest.fTCPv4.fProtocol = kOTCfgTypeTCPv4;
PLstrcpy(digest.fTCPv4.fConfigName, configurationName);
digest.fTCPv4.fPortRef = portRec.fRef;
digest.fTCPv4.fConfigMethod = kOTCfgDHCPConfig;
digest.fTCPv4.fIPAddress = nil;
digest.fTCPv4.fSubnetMask = nil;
digest.fTCPv4.fRouterList = nil;
digest.fTCPv4.fDNSServerList = nil;
digest.fTCPv4.fLocalDomain[0] = 0;
digest.fTCPv4.fAdminDomain[0] = 0;
digest.fTCPv4.fSearchDomains = searchDomains;
digest.fTCPv4.fAppleTalkZone[0] = 0;
digest.fTCPv4.fUnloadAttr = kOTCfgTCPActiveLoadedOnDemand;
err = NSHCreateConfiguration(&digest, &configMade);
// Handle error
err = NSHSelectConfiguration(&configMade);
// Handle error
Thanks in advance for any clues or experiences. Please let me know if
you need more code.
/John
_______________________________________________
macnetworkprog mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/macnetworkprog
Do not post admin requests to the list. They will be ignored.
References: | |
| >Browser (From: "R. Welz" <email@hidden>) |