Subject: Ethernet MAC Cloning
To: None <tech-net@netbsd.org>
From: Benson <peachokay@hotmail.com>
List: port-i386
Date: 02/27/2002 12:41:57
This is a multi-part message in MIME format.

------=_NextPart_000_001B_01C1BF8C.24B31F90
Content-Type: text/plain;
	charset="us-ascii"
Content-Transfer-Encoding: 7bit

Hi dear folks,
I am looking for one simple way (.to use it is easy, to implement it is
not easy at all~~)
to change the MAC address of a network card in NetBSD (since some ISPs
would use 
the NIC's MAC address to authenticate a service), let's say card i82557
of Intel. 
I tried to study the source code for i82557 to know the location of the
register on 
the NIC to write, but I am not that good enough to understand those
codes, 
especially to write with ioctl. I also have an idea of modifying the
command 'ifconfig' 
so that it can set the hardware address as the linux's version of
ifconfig does. 
But again, I was knocked down with ioctl.
I am not sure how much effort it would take to write a patch for
ifconfig 
with -H option to set MAC address or any other possible way one can
provide me with.
 
Thanks.
 
Benson
 

------=_NextPart_000_001B_01C1BF8C.24B31F90
Content-Type: text/html;
	charset="us-ascii"
Content-Transfer-Encoding: quoted-printable

<html xmlns:o=3D"urn:schemas-microsoft-com:office:office" =
xmlns:w=3D"urn:schemas-microsoft-com:office:word" =
xmlns=3D"http://www.w3.org/TR/REC-html40">

<head>
<META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; =
charset=3Dus-ascii">


<meta name=3DProgId content=3DWord.Document>
<meta name=3DGenerator content=3D"Microsoft Word 10">
<meta name=3DOriginator content=3D"Microsoft Word 10">
<link rel=3DFile-List href=3D"cid:filelist.xml@01C1BF8C.23E34C70">
<!--[if gte mso 9]><xml>
 <o:OfficeDocumentSettings>
  <o:DoNotRelyOnCSS/>
 </o:OfficeDocumentSettings>
</xml><![endif]--><!--[if gte mso 9]><xml>
 <w:WordDocument>
  <w:GrammarState>Clean</w:GrammarState>
  <w:DocumentKind>DocumentEmail</w:DocumentKind>
  <w:EnvelopeVis/>
  <w:PunctuationKerning/>
  =
<w:DisplayHorizontalDrawingGridEvery>0</w:DisplayHorizontalDrawingGridEve=
ry>
  =
<w:DisplayVerticalDrawingGridEvery>2</w:DisplayVerticalDrawingGridEvery>
  <w:Compatibility>
   <w:SpaceForUL/>
   <w:BalanceSingleByteDoubleByteWidth/>
   <w:DoNotLeaveBackslashAlone/>
   <w:ULTrailSpace/>
   <w:DoNotExpandShiftReturn/>
   <w:AdjustLineHeightInTable/>
   <w:BreakWrappedTables/>
   <w:SnapToGridInCell/>
   <w:WrapTextWithPunct/>
   <w:UseAsianBreakRules/>
   <w:UseFELayout/>
  </w:Compatibility>
  <w:BrowserLevel>MicrosoftInternetExplorer4</w:BrowserLevel>
 </w:WordDocument>
</xml><![endif]-->
<style>
<!--
 /* Font Definitions */
 @font-face
	{font-family:PMingLiU;
	panose-1:2 2 3 0 0 0 0 0 0 0;
	mso-font-alt:PMingLiU;
	mso-font-charset:136;
	mso-generic-font-family:roman;
	mso-font-pitch:variable;
	mso-font-signature:3 137232384 22 0 1048577 0;}
@font-face
	{font-family:PMingLiU;
	panose-1:2 2 3 0 0 0 0 0 0 0;
	mso-font-charset:136;
	mso-generic-font-family:roman;
	mso-font-pitch:variable;
	mso-font-signature:3 137232384 22 0 1048577 0;}
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
	{mso-style-parent:"";
	margin:0cm;
	margin-bottom:.0001pt;
	mso-pagination:none;
	font-size:12.0pt;
	font-family:"Times New Roman";
	mso-fareast-font-family:PMingLiU;
	mso-font-kerning:1.0pt;}
a:link, span.MsoHyperlink
	{color:blue;
	text-decoration:underline;
	text-underline:single;}
a:visited, span.MsoHyperlinkFollowed
	{color:purple;
	text-decoration:underline;
	text-underline:single;}
p.MsoAutoSig, li.MsoAutoSig, div.MsoAutoSig
	{margin:0cm;
	margin-bottom:.0001pt;
	mso-pagination:none;
	font-size:12.0pt;
	font-family:"Times New Roman";
	mso-fareast-font-family:PMingLiU;
	mso-font-kerning:1.0pt;}
span.EmailStyle17
	{mso-style-type:personal-compose;
	mso-style-noshow:yes;
	mso-ansi-font-size:9.0pt;
	mso-bidi-font-size:10.0pt;
	font-family:Arial;
	mso-ascii-font-family:Arial;
	mso-fareast-font-family:PMingLiU;
	mso-hansi-font-family:Arial;
	mso-bidi-font-family:Arial;
	color:windowtext;}
span.GramE
	{mso-style-name:"";
	mso-gram-e:yes;}
 /* Page Definitions */
 @page
	{mso-page-border-surround-header:no;
	mso-page-border-surround-footer:no;}
@page Section1
	{size:595.3pt 841.9pt;
	margin:72.0pt 90.0pt 72.0pt 90.0pt;
	mso-header-margin:42.55pt;
	mso-footer-margin:49.6pt;
	mso-paper-source:0;
	layout-grid:18.0pt;}
div.Section1
	{page:Section1;}
-->
</style>
<!--[if gte mso 10]>
<style>
 /* Style Definitions */=20
 table.MsoNormalTable
	{mso-style-name:\8868\683C\5167\6587;
	mso-tstyle-rowband-size:0;
	mso-tstyle-colband-size:0;
	mso-style-noshow:yes;
	mso-style-parent:"";
	mso-padding-alt:0cm 5.4pt 0cm 5.4pt;
	mso-para-margin:0cm;
	mso-para-margin-bottom:.0001pt;
	mso-pagination:widow-orphan;
	font-size:10.0pt;
	font-family:"Times New Roman";}
</style>
<![endif]-->
</head>

<body lang=3DZH-TW link=3Dblue vlink=3Dpurple =
style=3D'tab-interval:24.0pt;text-justify-trim:
punctuation'>

<div class=3DSection1 style=3D'layout-grid:18.0pt'>

<p class=3DMsoNormal =
style=3D'mso-layout-grid-align:none;text-autospace:none'><font
size=3D1 face=3DArial><span lang=3DEN-US =
style=3D'font-size:9.0pt;font-family:Arial;
mso-font-kerning:0pt'>Hi dear folks,<o:p></o:p></span></font></p>

<p class=3DMsoNormal =
style=3D'text-indent:24.0pt;mso-layout-grid-align:none;
text-autospace:none'><font size=3D1 face=3DArial><span lang=3DEN-US =
style=3D'font-size:
9.0pt;font-family:Arial;mso-font-kerning:0pt'>I am looking for one =
simple way (&#8230;to
use it is easy, to implement it is not easy at =
all~~)<o:p></o:p></span></font></p>

<p class=3DMsoNormal =
style=3D'mso-layout-grid-align:none;text-autospace:none'><span
class=3DGramE><font size=3D1 face=3DArial><span lang=3DEN-US =
style=3D'font-size:9.0pt;
font-family:Arial;mso-font-kerning:0pt'>to</span></font></span><font =
size=3D1
face=3DArial><span lang=3DEN-US =
style=3D'font-size:9.0pt;font-family:Arial;
mso-font-kerning:0pt'> change the MAC address of a network card in =
NetBSD
(since some ISPs would use <o:p></o:p></span></font></p>

<p class=3DMsoNormal =
style=3D'mso-layout-grid-align:none;text-autospace:none'><span
class=3DGramE><font size=3D1 face=3DArial><span lang=3DEN-US =
style=3D'font-size:9.0pt;
font-family:Arial;mso-font-kerning:0pt'>the</span></font></span><font =
size=3D1
face=3DArial><span lang=3DEN-US =
style=3D'font-size:9.0pt;font-family:Arial;
mso-font-kerning:0pt'> NIC's MAC address to authenticate a service), =
let's say card
i82557 of Intel. <o:p></o:p></span></font></p>

<p class=3DMsoNormal =
style=3D'mso-layout-grid-align:none;text-autospace:none'><font
size=3D1 face=3DArial><span lang=3DEN-US =
style=3D'font-size:9.0pt;font-family:Arial;
mso-font-kerning:0pt'>I tried to study the source code for i82557 to =
know the
location of the register on <o:p></o:p></span></font></p>

<p class=3DMsoNormal =
style=3D'mso-layout-grid-align:none;text-autospace:none'><span
class=3DGramE><font size=3D1 face=3DArial><span lang=3DEN-US =
style=3D'font-size:9.0pt;
font-family:Arial;mso-font-kerning:0pt'>the</span></font></span><font =
size=3D1
face=3DArial><span lang=3DEN-US =
style=3D'font-size:9.0pt;font-family:Arial;
mso-font-kerning:0pt'> NIC to write, but I am not that good enough to
understand those codes, <o:p></o:p></span></font></p>

<p class=3DMsoNormal =
style=3D'mso-layout-grid-align:none;text-autospace:none'><span
class=3DGramE><font size=3D1 face=3DArial><span lang=3DEN-US =
style=3D'font-size:9.0pt;
font-family:Arial;mso-font-kerning:0pt'>especially</span></font></span><f=
ont
size=3D1 face=3DArial><span lang=3DEN-US =
style=3D'font-size:9.0pt;font-family:Arial;
mso-font-kerning:0pt'> to write with ioctl. I also have an idea of =
modifying the
command &#8216;ifconfig&#8217; <o:p></o:p></span></font></p>

<p class=3DMsoNormal =
style=3D'mso-layout-grid-align:none;text-autospace:none'><span
class=3DGramE><font size=3D1 face=3DArial><span lang=3DEN-US =
style=3D'font-size:9.0pt;
font-family:Arial;mso-font-kerning:0pt'>so</span></font></span><font =
size=3D1
face=3DArial><span lang=3DEN-US =
style=3D'font-size:9.0pt;font-family:Arial;
mso-font-kerning:0pt'> that it can set the hardware address as the =
linux's version
of ifconfig does. <o:p></o:p></span></font></p>

<p class=3DMsoNormal =
style=3D'mso-layout-grid-align:none;text-autospace:none'><font
size=3D1 face=3DArial><span lang=3DEN-US =
style=3D'font-size:9.0pt;font-family:Arial;
mso-font-kerning:0pt'>But again, I was knocked down with =
ioctl.<o:p></o:p></span></font></p>

<p class=3DMsoNormal =
style=3D'text-indent:24.0pt;mso-layout-grid-align:none;
text-autospace:none'><font size=3D1 face=3DArial><span lang=3DEN-US =
style=3D'font-size:
9.0pt;font-family:Arial;mso-font-kerning:0pt'>I am not sure how much =
effort it
would take to write a patch for ifconfig <o:p></o:p></span></font></p>

<p class=3DMsoNormal =
style=3D'mso-layout-grid-align:none;text-autospace:none'><span
class=3DGramE><font size=3D1 face=3DArial><span lang=3DEN-US =
style=3D'font-size:9.0pt;
font-family:Arial;mso-font-kerning:0pt'>with</span></font></span><font =
size=3D1
face=3DArial><span lang=3DEN-US =
style=3D'font-size:9.0pt;font-family:Arial;
mso-font-kerning:0pt'> -H option to set MAC address or any other =
possible way
one can provide me with.<o:p></o:p></span></font></p>

<p class=3DMsoNormal =
style=3D'mso-layout-grid-align:none;text-autospace:none'><font
size=3D1 face=3DArial><span lang=3DEN-US =
style=3D'font-size:9.0pt;font-family:Arial;
mso-font-kerning:0pt'><o:p>&nbsp;</o:p></span></font></p>

<p class=3DMsoNormal =
style=3D'mso-layout-grid-align:none;text-autospace:none'><font
size=3D1 face=3DArial><span lang=3DEN-US =
style=3D'font-size:9.0pt;font-family:Arial;
mso-font-kerning:0pt'>Thanks.<o:p></o:p></span></font></p>

<p class=3DMsoNormal =
style=3D'mso-layout-grid-align:none;text-autospace:none'><font
size=3D1 face=3DArial><span lang=3DEN-US =
style=3D'font-size:9.0pt;font-family:Arial;
mso-font-kerning:0pt'><o:p>&nbsp;</o:p></span></font></p>

<p class=3DMsoNormal =
style=3D'mso-layout-grid-align:none;text-autospace:none'><font
size=3D1 face=3DArial><span lang=3DEN-US =
style=3D'font-size:9.0pt;font-family:Arial;
mso-font-kerning:0pt'>Benson<o:p></o:p></span></font></p>

<p class=3DMsoNormal><font size=3D3 face=3D"Times New Roman"><span =
lang=3DEN-US
style=3D'font-size:12.0pt'><o:p>&nbsp;</o:p></span></font></p>

</div>

</body>

</html>

------=_NextPart_000_001B_01C1BF8C.24B31F90--