]> git.saurik.com Git - apple/network_cmds.git/commitdiff
network_cmds-329.2.1.tar.gz mac-os-x-1065 mac-os-x-1066 v329.2.1
authorApple <opensource@apple.com>
Wed, 31 Mar 2010 21:25:36 +0000 (21:25 +0000)
committerApple <opensource@apple.com>
Wed, 31 Mar 2010 21:25:36 +0000 (21:25 +0000)
ifconfig.tproj/ifconfig.c
ifconfig.tproj/ifmedia.c
netstat.tproj/route.c
route.tproj/route.c

index 1c50df3e2278c50a370cd9858ec568fb2c341658..62bfd199827faa300857f2b2266c525c241cfb6c 100644 (file)
@@ -162,7 +162,7 @@ main(int argc, char *argv[])
 #ifndef __APPLE__
        strlcpy(options, "adklmnuv", sizeof(options));
 #else
-       strlcpy(options, "adlmruv", sizeof(options));
+       strlcpy(options, "abdlmruv", sizeof(options));
 #endif
        for (p = opts; p != NULL; p = p->next)
                strlcat(options, p->opt, sizeof(options));
index cefaacf0dd694342c743e5d1ab00071b63e1d91e..f525154b906949c9fc96599a659e01843e23f212 100644 (file)
@@ -394,16 +394,16 @@ static struct ifmedia_description ifm_subtype_fddi_aliases[] =
 static struct ifmedia_description ifm_subtype_fddi_option_descriptions[] =
     IFM_SUBTYPE_FDDI_OPTION_DESCRIPTIONS;
 
-#ifdef notdef
 static struct ifmedia_description ifm_subtype_ieee80211_descriptions[] =
     IFM_SUBTYPE_IEEE80211_DESCRIPTIONS;
 
-static struct ifmedia_description ifm_subtype_ieee80211_aliases[] =
-    IFM_SUBTYPE_IEEE80211_ALIASES;
-
 static struct ifmedia_description ifm_subtype_ieee80211_option_descriptions[] =
     IFM_SUBTYPE_IEEE80211_OPTION_DESCRIPTIONS;
 
+#ifdef notdef
+static struct ifmedia_description ifm_subtype_ieee80211_aliases[] =
+    IFM_SUBTYPE_IEEE80211_ALIASES;
+
 struct ifmedia_description ifm_subtype_ieee80211_mode_descriptions[] =
     IFM_SUBTYPE_IEEE80211_MODE_DESCRIPTIONS;
 
@@ -497,6 +497,24 @@ static struct ifmedia_type_to_subtype ifmedia_types_to_subtypes[] = {
                        { NULL, 0 },
                },
        },
+#ifdef __APPLE__
+       {
+               {
+                       { &ifm_subtype_shared_descriptions[0], 0 },
+                       { &ifm_subtype_shared_aliases[0], 1 },
+                       { &ifm_subtype_ieee80211_descriptions[0], 0 },
+                       { NULL, 0 },
+               },
+               {
+                       { &ifm_shared_option_descriptions[0], 0 },
+                       { &ifm_subtype_ieee80211_option_descriptions[0], 1 },
+                       { NULL, 0 },
+               },
+               {
+                       { NULL, 0 },
+               },
+       },
+#else /* __APPLE__ */
 #ifdef notdef
        {
                {
@@ -535,6 +553,7 @@ static struct ifmedia_type_to_subtype ifmedia_types_to_subtypes[] = {
                },
        },
 #endif
+#endif /* __APPLE__ */
 };
 
 static int
index 1e7befcbf441301149eb10f2356d97e62d9bc239..e7b820581a3b91e4f9e375fefa92e55f27460928 100644 (file)
@@ -116,7 +116,9 @@ struct bits {
        { RTF_BLACKHOLE,'B' },
        { RTF_BROADCAST,'b' },
        { RTF_IFSCOPE,  'I' },
+#ifdef RTF_IFREF
        { RTF_IFREF,    'i' },
+#endif /* RTF_IFREF */
        { 0 }
 };
 
index b1960d7b6e6e14439771209e7dcaeedc5bb43403..c43f159bf73776465be62ced55b5d37233062bba 100644 (file)
@@ -1299,8 +1299,10 @@ print_rtmsg(rtm, msglen)
                        (long)rtm->rtm_pid, rtm->rtm_seq, rtm->rtm_errno);
                if (rtm->rtm_flags & RTF_IFSCOPE)
                        (void) printf("ifscope %d, ", rtm->rtm_index);
+#ifdef RTF_IFREF
                if (rtm->rtm_flags & RTF_IFREF)
                        (void) printf("ifref, ");
+#endif /* RTF_IFREF */
                (void) printf("flags:");
                bprintf(stdout, rtm->rtm_flags, routeflags);
                pmsg_common(rtm);