Tokenring support for network interfaces

Alexander Gottwald Alexander.Gottwald@informatik.tu-chemnitz.de
Thu Feb 7 05:50:00 GMT 2002


Hi, the patch adds support for enumerating tokenring network interfaces.

bye
    ago
-- 
 Alexander.Gottwald@informatik.tu-chemnitz.de 
 http://www.gotti.org           ICQ: 126018723
 phone: +49 3725 349 80 80	mobile: +49 172 7854017
 4. Chemnitzer Linux-Tag http://www.tu-chemnitz.de/linux/tag/lt4
-------------- next part --------------
2002-02-06  Alexander Gottwald <Alexander.Gottwald@s1999.tuchemnitz.de>

    * net.cc (get_2k_ifconf): Create interface entries for tokenring cards.
-------------- next part --------------
--- net.cc	Wed Feb  6 20:10:34 2002
+++ net.cc.new	Wed Feb  6 20:10:22 2002
@@ -1652,7 +1652,7 @@ static void
 get_2k_ifconf (struct ifconf *ifc, int what)
 {
   int cnt = 0;
-  char eth[2] = "/", ppp[2] = "/", slp[2] = "/", sub[2] = "0";
+  char eth[2] = "/", ppp[2] = "/", slp[2] = "/", sub[2] = "0", tok[2] = "/";
 
   /* Union maps buffer to correct struct */
   struct ifreq *ifr = ifc->ifc_req;
@@ -1685,6 +1685,11 @@ get_2k_ifconf (struct ifconf *ifc, int w
 		  /* Setup the interface name */
 		  switch (ift->table[if_cnt].dwType)
 		    {
+		      case MIB_IF_TYPE_TOKENRING:
+			  ++*tok;
+			strcpy (ifr->ifr_name, "tok");
+			strcat (ifr->ifr_name, tok);
+			break;
 		      case MIB_IF_TYPE_ETHERNET:
 			if (*sub == '0')
 			  ++*eth;


More information about the Cygwin-patches mailing list