home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #20 / NN_1992_20.iso / spool / comp / unix / bsd / 5294 < prev    next >
Encoding:
Text File  |  1992-09-08  |  4.1 KB  |  107 lines

  1. Newsgroups: comp.unix.bsd
  2. Path: sparky!uunet!haven.umd.edu!darwin.sura.net!spool.mu.edu!sdd.hp.com!zaphod.mps.ohio-state.edu!sol.ctr.columbia.edu!destroyer!ubc-cs!unixg.ubc.ca!kakwa.ucs.ualberta.ca!alberta!cpsc.ucalgary.ca!ajfcal!novatel!hpeyerl
  3. From: hpeyerl@novatel.cuc.ab.ca (Herb Peyerl)
  4. Subject: patch for ifconfig to allow easier config of AUI/BNC.
  5. Message-ID: <1992Sep6.175647.9631@novatel.cuc.ab.ca>
  6. Organization: none
  7. Date: Sun, 6 Sep 1992 17:56:47 GMT
  8. Lines: 97
  9.  
  10. I've had some mail and seen a number of posts here asking about
  11. the configuration of the AUI/BNC connectors on the 3Com 3c503
  12. card.  When I released the initial version of the ec driver
  13. back in 0.0 days, there was a kludge for configuring this option
  14. requiring you to go into your ioconf.c and edit the isa_device
  15. structure setting bit 8 of the unit number to 1 indicating AUI.
  16. This was hideous but I could think of no other way to do it.
  17.  
  18. When 0.1 was released; Bill Jolitz had modified the ec driver
  19. in some ways (to his credit).  One of these ways was to remove
  20. my hideous kludge and add a check for IFF_LLC0 being set in the
  21. "ifnet" struct.  If set, the driver uses AUI, else BNC.
  22.  
  23. I've been trying to decide how best to allow this to be changed
  24. from an admin level.  I figured I could write a utility to just
  25. do the appropriate ioctl() but decided we didn't really need 
  26. YAU (yet another utility).  Other's have mentioned that creating
  27. a /dev/ec0 entry with the appropriate major/minor numbers would
  28. suffice but, not understanding how that could work, I didn't
  29. pursue it.  The final solution (which I finally decided upon) was
  30. to patch ifconfig.  It was a simple patch and works extremely
  31. well (in my basement using a 3c503 with a DESTA transceiver
  32. plugged into a transceiver cable which is plugged into the AUI
  33. port of the 3c503.)
  34.  
  35. Here's basically what you need to do:
  36.  
  37. Copy this message to somewhere (/tmp)
  38.  
  39. # cd /usr/src/sbin/ifconfig
  40. # patch < /tmp/message
  41. # make
  42. # cd obj
  43. # mv /sbin/ifconfig /sbin/ifconfig.dist
  44. # mv ifconfig /sbin/ifconfig
  45. # mv /usr/share/man/cat8/ifconfig.0 /usr/share/man/cat8/ifconfig.0.dist
  46. # mv ifconfig.0 /usr/share/man/cat8/ifconfig.0
  47. # ifconfig ec0 down
  48. # ifconfig ec0 aui
  49. # ifconfig ec0 up
  50.  
  51. Or in your  /etc/netstart change:
  52.  
  53. ifconfig ec0 inet $hostname
  54.  
  55. to:
  56.  
  57. ifconfig ec0 inet $hostname aui
  58.  
  59. Some will wonder about the appropriateness of patching ifconfig just
  60. to make it easier to configure one card.  I wondered this same thing.
  61. I figured if Bill can patch the driver to use one of the interface
  62. flags for this purpose, then he must have intended for some way to
  63. do this from user-level. It doesn't appear that any other cards use
  64. IFF_LLC0 for any other purpose so "ifconfig we0 aui" won't have any
  65. affect on anything.
  66.  
  67. Hope this helps everyone... Does anyone have any comments as to the
  68. appropriateness of this fix? (I'll wait for responses before I submit
  69. a BUGNFIX.FORM to Lynne. Unless Lynne sees this, feels it's appropriate
  70. and submits it herself.)
  71.  
  72. ###### Cut Here #######
  73.  
  74. *** ifconfig.c    Fri Feb  7 16:27:09 1992
  75. --- ifconfig.c    Sun Sep  6 11:23:50 1992
  76. ***************
  77. *** 107,112 ****
  78. --- 107,114 ----
  79.       { "-arp",    IFF_NOARP,    setifflags },
  80.       { "debug",    IFF_DEBUG,    setifflags },
  81.       { "-debug",    -IFF_DEBUG,    setifflags },
  82. +     { "aui",    IFF_LLC0,    setifflags },
  83. +     { "bnc",    -IFF_LLC0,    setifflags },
  84.       { "alias",    IFF_UP,        notealias },
  85.       { "-alias",    -IFF_UP,    notealias },
  86.       { "delete",    -IFF_UP,    notealias },
  87. *** ifconfig.8    Tue Apr 16 17:28:08 1991
  88. --- ifconfig.8    Sun Sep  6 11:43:49 1992
  89. ***************
  90. *** 130,135 ****
  91. --- 130,139 ----
  92.   addresses and 10Mb/s Ethernet addresses.
  93.   .It Fl arp
  94.   Disable the use of the Address Resolution Protocol.
  95. + .It Cm aui
  96. + Enable the AUI port on a 3c503 adaptor.
  97. + .It Cm bnc
  98. + Enable the BNC port on a 3c503 adaptor. (default)
  99.   .It Cm broadcast
  100.   (Inet only)
  101.   Specify the address to use to represent broadcasts to the
  102. -- 
  103. "I was early to finish | hpeyerl@novatel.cuc.ab.ca <Reply-To>   | I brew |
  104. I was late to start, I | peyerlh@cuug.ab.ca                     | there- | 
  105. might be an adult, but | #define JANITOR "Network Administrator"| fore I | 
  106. I'm a minor at heart." |    JANITOR, NovAtel Communications Ltd.|   AM.  |
  107.