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

  1. Newsgroups: comp.unix.bsd
  2. Path: sparky!uunet!spool.mu.edu!sol.ctr.columbia.edu!destroyer!ubc-cs!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: <1992Sep10.154423.10000@novatel.cuc.ab.ca>
  6. Organization: none
  7. Date: Thu, 10 Sep 1992 15:44:23 GMT
  8. Lines: 113
  9.  
  10. [ I posted this message a week ago and we were having some problems
  11.   with our news software.  Since I hadn't received any responses
  12.   or seen any followups, I began to get suspicious.  I checked
  13.   around on a few other sites and did not see my message arrive
  14.   there; so, I'm posting it again.  Apologies if this is a re-
  15.   run but I felt it was going to be important enough to a large
  16.   enough audience that a repost was warranted. I'd appreciate some
  17.   feedback regarding this matter.  Even if it's just to say "It 
  18.   worked for me." I'll be on vacation from the 11th to the 21st
  19.   and will attend to my mail upon my well rested return. Thanks. ]
  20.  
  21. I've had some mail and seen a number of posts here asking about
  22. the configuration of the AUI/BNC connectors on the 3Com 3c503
  23. card.  When I released the initial version of the ec driver
  24. back in 0.0 days, there was a kludge for configuring this option
  25. requiring you to go into your ioconf.c and edit the isa_device
  26. structure setting bit 8 of the unit number to 1 indicating AUI.
  27. This was hideous but I could think of no other way to do it.
  28.  
  29. When 0.1 was released; Bill Jolitz had modified the ec driver
  30. in some ways (to his credit).  One of these ways was to remove
  31. my hideous kludge and add a check for IFF_LLC0 being set in the
  32. "ifnet" struct.  If set, the driver uses AUI, else BNC.
  33.  
  34. I've been trying to decide how best to allow this to be changed
  35. from an admin level.  I figured I could write a utility to just
  36. do the appropriate ioctl() but decided we didn't really need 
  37. YAU (yet another utility).  Other's have mentioned that creating
  38. a /dev/ec0 entry with the appropriate major/minor numbers would
  39. suffice but, not understanding how that could work, I didn't
  40. pursue it.  The final solution (which I finally decided upon) was
  41. to patch ifconfig.  It was a simple patch and works extremely
  42. well (in my basement using a 3c503 with a DESTA transceiver
  43. plugged into a transceiver cable which is plugged into the AUI
  44. port of the 3c503.)
  45.  
  46. Here's basically what you need to do:
  47.  
  48. Copy this message to somewhere (/tmp)
  49.  
  50. # cd /usr/src/sbin/ifconfig
  51. # patch < /tmp/message
  52. # make
  53. # cd obj
  54. # mv /sbin/ifconfig /sbin/ifconfig.dist
  55. # mv ifconfig /sbin/ifconfig
  56. # mv /usr/share/man/cat8/ifconfig.0 /usr/share/man/cat8/ifconfig.0.dist
  57. # mv ifconfig.0 /usr/share/man/cat8/ifconfig.0
  58. # ifconfig ec0 down
  59. # ifconfig ec0 aui
  60. # ifconfig ec0 up
  61.  
  62. Or in your  /etc/netstart change:
  63.  
  64. ifconfig ec0 inet $hostname
  65.  
  66. to:
  67.  
  68. ifconfig ec0 inet $hostname aui
  69.  
  70. (Note: "ifconfig ec0 bnc" is also supported but is the default upon
  71.  startup so is not needed. It is useful if you want to change from
  72.  aui to bnc on the fly.  Make sure you mark the interface down, then
  73.  set aui/bnc and then mark the interface up.)
  74.  
  75. Some will wonder about the appropriateness of patching ifconfig just
  76. to make it easier to configure one card.  I wondered this same thing.
  77. I figured if Bill can patch the driver to use one of the interface
  78. flags for this purpose, then he must have intended for some way to
  79. do this from user-level. It doesn't appear that any other cards use
  80. IFF_LLC0 for any other purpose so "ifconfig we0 aui" won't have any
  81. affect on anything.
  82.  
  83. Hope this helps everyone... Does anyone have any comments as to the
  84. appropriateness of this fix? (I'll wait for responses before I submit
  85. a BUGNFIX.FORM to Lynne. Unless Lynne sees this, feels it's appropriate
  86. and submits it herself.)
  87.  
  88. ###### Cut Here #######
  89.  
  90. *** ifconfig.c    Fri Feb  7 16:27:09 1992
  91. --- ifconfig.c    Sun Sep  6 11:23:50 1992
  92. ***************
  93. *** 107,112 ****
  94. --- 107,114 ----
  95.       { "-arp",    IFF_NOARP,    setifflags },
  96.       { "debug",    IFF_DEBUG,    setifflags },
  97.       { "-debug",    -IFF_DEBUG,    setifflags },
  98. +     { "aui",    IFF_LLC0,    setifflags },
  99. +     { "bnc",    -IFF_LLC0,    setifflags },
  100.       { "alias",    IFF_UP,        notealias },
  101.       { "-alias",    -IFF_UP,    notealias },
  102.       { "delete",    -IFF_UP,    notealias },
  103. *** ifconfig.8    Tue Apr 16 17:28:08 1991
  104. --- ifconfig.8    Sun Sep  6 11:43:49 1992
  105. ***************
  106. *** 130,135 ****
  107. --- 130,139 ----
  108.   addresses and 10Mb/s Ethernet addresses.
  109.   .It Fl arp
  110.   Disable the use of the Address Resolution Protocol.
  111. + .It Cm aui
  112. + Enable the AUI port on a 3c503 adaptor.
  113. + .It Cm bnc
  114. + Enable the BNC port on a 3c503 adaptor. (default)
  115.   .It Cm broadcast
  116.   (Inet only)
  117.   Specify the address to use to represent broadcasts to the
  118. -- 
  119. "I was early to finish | hpeyerl@novatel.cuc.ab.ca <Reply-To>   | I brew |
  120. I was late to start, I | peyerlh@cuug.ab.ca                     | there- | 
  121. might be an adult, but | #define JANITOR "Network Administrator"| fore I | 
  122. I'm a minor at heart." |    JANITOR, NovAtel Communications Ltd.|   AM.  |
  123.