• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /macosx-10.10.1/configd-699.1.5/SystemConfiguration.fproj/

Lines Matching defs:ifm

391 __freeMediaList(struct ifmediareq *ifm)
393 if (ifm->ifm_ulist != NULL) CFAllocatorDeallocate(NULL, ifm->ifm_ulist);
394 CFAllocatorDeallocate(NULL, ifm);
402 struct ifmediareq *ifm;
406 ifm = (struct ifmediareq *)CFAllocatorAllocate(NULL, sizeof(struct ifmediareq), 0);
407 bzero((void *)ifm, sizeof(*ifm));
409 if (_SC_cfstring_to_cstring(interfaceName, ifm->ifm_name, sizeof(ifm->ifm_name), kCFStringEncodingASCII) == NULL) {
420 if (ioctl(sock, SIOCGIFMEDIA, (caddr_t)ifm) == -1) {
425 if (ifm->ifm_count > 0) {
426 ifm->ifm_ulist = (int *)CFAllocatorAllocate(NULL, ifm->ifm_count * sizeof(int), 0);
427 if (ioctl(sock, SIOCGIFMEDIA, (caddr_t)ifm) == -1) {
439 __freeMediaList(ifm);
440 ifm = NULL;
443 return ifm;
550 struct ifmediareq *ifm;
574 ifm = __copyMediaList(interfaceName);
575 if (ifm != NULL) {
576 if (ifm->ifm_count > 0) {
577 ifm_new = IFM_TYPE(ifm->ifm_ulist[0]);
579 __freeMediaList(ifm);
695 struct ifmediareq *ifm;
709 ifm = __copyMediaList(interfaceName);
710 if (ifm == NULL) {
720 for (i = 0; i < ifm->ifm_count; i++) {
723 options = __createMediaDictionary(ifm->ifm_ulist[i], filter);
728 if ((active != NULL) && (*active == NULL) && (ifm->ifm_active == ifm->ifm_ulist[i])) {
732 if ((current != NULL) && (*current == NULL) && (ifm->ifm_current == ifm->ifm_ulist[i])) {
746 *active = __createMediaDictionary(ifm->ifm_active, FALSE);
750 if ((active != NULL) && (ifm->ifm_active == ifm->ifm_current)) {
753 *current = __createMediaDictionary(ifm->ifm_current, FALSE);
757 __freeMediaList(ifm);
861 struct ifmediareq *ifm;
876 ifm = __copyMediaList(interfaceName);
877 if (ifm == NULL) {
890 if (IFM_TYPE(ifm->ifm_current) != IFM_ETHER) {
893 if (ifm->ifm_count == 1
894 && IFM_SUBTYPE(ifm->ifm_ulist[0]) == IFM_AUTO) {
898 for (i = 0; i < ifm->ifm_count; i++) {
899 if ((ifm->ifm_ulist[i] & IFM_FDX) != 0) {
905 __freeMediaList(ifm);