/*
- * Copyright (c) 2002-2018 Apple Inc. All rights reserved.
+ * Copyright (c) 2002-2019 Apple Inc. All rights reserved.
*
* @APPLE_LICENSE_HEADER_START@
*
bzero((char *)&ifm, sizeof(ifm));
(void) strlcpy(ifm.ifm_name, if_name, sizeof(ifm.ifm_name));
- if (ioctl(sock, SIOCGIFMEDIA, (caddr_t)&ifm) == -1) {
+ if (ioctl(sock, SIOCGIFXMEDIA, (caddr_t)&ifm) == -1) {
/* if media status not available for this interface */
goto update;
}
/*
- * Copyright (c) 2002-2007, 2011, 2013, 2015-2018 Apple Inc. All rights reserved.
+ * Copyright (c) 2002-2007, 2011, 2013, 2015-2019 Apple Inc. All rights reserved.
*
* @APPLE_LICENSE_HEADER_START@
*
bzero((char *)&ifm, sizeof(ifm));
(void)_SC_cfstring_to_cstring(interfaceName, ifm.ifm_name, sizeof(ifm.ifm_name), kCFStringEncodingASCII);
- if (ioctl(sock, SIOCGIFMEDIA, (caddr_t)&ifm) == -1) {
- SC_log(LOG_ERR, "%@: ioctl(SIOCGIFMEDIA) failed: %s", interfaceName, strerror(errno));
+ if (ioctl(sock, SIOCGIFXMEDIA, (caddr_t)&ifm) == -1) {
+ SC_log(LOG_ERR, "%@: ioctl(SIOCGIFXMEDIA) failed: %s", interfaceName, strerror(errno));
goto done;
}
/*
- * Copyright (c) 2004-2018 Apple Inc. All rights reserved.
+ * Copyright (c) 2004-2019 Apple Inc. All rights reserved.
*
* @APPLE_LICENSE_HEADER_START@
*
}
static int
-siocgifmedia(int s, const char * ifname, int * status, int * active)
+siocgifxmedia(int s, const char * ifname, int * status, int * active)
{
struct ifmediareq ifmr;
*active = 0;
bzero(&ifmr, sizeof(ifmr));
strlcpy(ifmr.ifm_name, ifname, sizeof(ifmr.ifm_name));
- if (ioctl(s, SIOCGIFMEDIA, &ifmr) == -1) {
+ if (ioctl(s, SIOCGIFXMEDIA, &ifmr) == -1) {
return (-1);
}
if (ifmr.ifm_count != 0) {
if_name,
sizeof(if_name),
kCFStringEncodingASCII);
- if (siocgifmedia(s, if_name, &bond_if_status, &bond_if_active) == -1) {
+ if (siocgifxmedia(s, if_name, &bond_if_status, &bond_if_active) == -1) {
_SCErrorSet(errno);
switch (errno) {
case EBUSY :
case ENXIO :
break;
default :
- SC_log(LOG_NOTICE, "siocgifmedia(%s) failed: %s",
+ SC_log(LOG_NOTICE, "siocgifxmedia(%s) failed: %s",
if_name,
strerror(errno));
}
int status = 0;
static lacp_system zeroes = { {0, 0, 0, 0, 0, 0}};
- if (siocgifmedia(s, scan_p->ibs_if_name, &status, &active) == -1) {
+ if (siocgifxmedia(s, scan_p->ibs_if_name, &status, &active) == -1) {
switch (errno) {
case EBUSY :
case ENXIO :
break;
default :
- SC_log(LOG_NOTICE, "siocgifmedia(%s) failed: %s",
+ SC_log(LOG_NOTICE, "siocgifxmedia(%s) failed: %s",
if_name,
strerror(errno));
break;
/*
- * Copyright (c) 2002-2007, 2010, 2011, 2013, 2015-2018 Apple Inc. All rights reserved.
+ * Copyright (c) 2002-2007, 2010, 2011, 2013, 2015-2019 Apple Inc. All rights reserved.
*
* @APPLE_LICENSE_HEADER_START@
*
goto done;
}
- if (ioctl(sock, SIOCGIFMEDIA, (caddr_t)ifm) == -1) {
-// SC_log(LOG_NOTICE, "ioctl(SIOCGIFMEDIA) failed: %s", strerror(errno));
+ if (ioctl(sock, SIOCGIFXMEDIA, (caddr_t)ifm) == -1) {
+// SC_log(LOG_NOTICE, "ioctl(SIOCGIFXMEDIA) failed: %s", strerror(errno));
goto done;
}
if (ifm->ifm_count > 0) {
ifm->ifm_ulist = (int *)CFAllocatorAllocate(NULL, ifm->ifm_count * sizeof(int), 0);
- if (ioctl(sock, SIOCGIFMEDIA, (caddr_t)ifm) == -1) {
- SC_log(LOG_NOTICE, "ioctl(SIOCGIFMEDIA) failed: %s", strerror(errno));
+ if (ioctl(sock, SIOCGIFXMEDIA, (caddr_t)ifm) == -1) {
+ SC_log(LOG_NOTICE, "ioctl(SIOCGIFXMEDIA) failed: %s", strerror(errno));
goto done;
}
}