On Jul 21, 2011, at 11:33 AM, vincent habchi wrote:
> But anyhow, as somebody pointed out, there are far better ways to get the MAC
> address of the en0 port than executing BSD commands in a subprocess.
Apple sample code GetPrimaryMACAddress works well with Lion.
http://developer.apple.co
Hi,
> NSString *tempFilePath = @"/Users/john/OutCocoa.txt";
> NSString *commandLine = [NSString stringWithFormat:@"/sbin/ifconfig en0 |
> grep ether | cut -d' ' -f 2 > \"%@\" 2>&1", tempFilePath];
> sprintf(cmd, "/bin/sh -c %s", [commandLine UTF8String]);
Quote the command.
sprintf (cmd, "
Rather than using other processes, look into the System Configuration framework.
- Gary L. Wade (Sent from my iPhone)
On Jul 21, 2011, at 8:28 AM, Leonardo wrote:
> Hi,
> while on MacOs X 10.6 and earlier this piece of code worked properly, on
> Lion I get a different result (bug).
> I have to
Hi,
while on MacOs X 10.6 and earlier this piece of code worked properly, on
Lion I get a different result (bug).
I have to take the MacAddress en0. May you please tell me where I do wrong?
NSString *tempFilePath = @"/Users/john/OutCocoa.txt";
NSString *commandLine = [NSString stringWithFor