⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ndis_6.0_miniport__driver.aspx.htm

📁 实现一个千兆以太网卡的NDIS的miniport驱动实例源代码 对于那些希望写一个NDIS 6.0的miniport设备驱动的开发人员来说
💻 HTM
📖 第 1 页 / 共 5 页
字号:
<span class="code-preprocessor">#define</span> NIC_MAX_XMIT_FRAME_SIZE <span class="code-digit">7040</span> <span class="code-comment">//</span><span class="code-comment"> multiple 0f 64</span>
<span class="code-preprocessor">#else</span>
<span class="code-preprocessor">#define</span> NIC_MAX_XMIT_FRAME_SIZE <span class="code-digit">1664</span>
<span class="code-preprocessor">#endif</span></pre></div>

<h4><br>Power Managment Capabilities added</h4>

<p>Nothing done to the H/W at D0 &amp; D3 transition time. We simply indicate to the NDIS we are capable.</p>

<div class="no-vmads"><pre>pPower_Management_Capabilities-<span class="code-keyword">&gt;</span>Flags = NDIS_DEVICE_WAKE_UP_ENABLE ;
pPower_Management_Capabilities-<span class="code-keyword">&gt;</span>WakeUpCapabilities.MinMagicPacketWakeUp = NdisDeviceStateD3;
pPower_Management_Capabilities-<span class="code-keyword">&gt;</span>WakeUpCapabilities.MinPatternWakeUp = NdisDeviceStateUnspecified;
pPower_Management_Capabilities-<span class="code-keyword">&gt;</span>WakeUpCapabilities.MinLinkChangeWakeUp = NdisDeviceStateUnspecified ;
*pulInfoLen = <span class="code-keyword">sizeof</span> (*pPower_Management_Capabilities);
*pStatus = NDIS_STATUS_SUCCESS;
}</pre></div>

<p>

</p><p>TEST : MAGIC packet WOL worked fine with this code</p>

<h3>About Copyright</h3>

<p>* Though this program is copyLEFT and free to be used anywhere, I
retained the copyright notices of INTEL and MICROSOFT found in the
original source code. Anyway, since e100 is part of the DDK sample for
public use, the copyright may not be stringent. Please refer to the
original e100bex DDK sample code for copyright issues. I am not
responsible</p>

<p>* Thanks to the linux developer community, i borrowed the initial
chip MAC/PHY configuration code from the realtek linux driver and to
fairly credit them, I named those files linux_init.c and linux_h.h. I
am not sure how GNU licensing will affect this project FREE license, as
i meant it to be.</p>

<h3>Finally</h3>

<p>Any form of comments and suggestions are welcome to this forum or to <a href="mailto:alex_@esdsinc.com">alex_@esdsinc.com</a><br>remove underscore. <br>Cheers &amp; good luck</p>

<p>

</p><h2>History</h2>

<p>first release dated 14 march 2008. version 6.0.6000.31308</p>

<p>second release dated 1 May 2008. Version 6.0.6000.050108. LSO and jumbo support added</p>

<p>Third release dated 2 May 2008. Version 6.0.6000.050208. Power managment capabilities added</p>

<p>



<!-- Article Ends -->


			<!-- Main Page Contents End -->
			
			</p></div>
			</span>
			
			<form name="aspnetForm" method="post" action="NDIS_6.0_miniport__driver.aspx" id="aspnetForm" style="margin: 0pt; padding: 0pt;">
		<div>
		<input name="__VIEWSTATE" id="__VIEWSTATE" value="/wEPDwULLTEwMDUyNjYzMjhkZOQVwesABsXi7zAvxfYBduUT567q" type="hidden">
		</div>
		

			
			<h2>License</h2>
			<div id="ctl00_LicenseTerms"><p>This article, along with any associated source code and files, is licensed under <a href="http://www.codeproject.com/info/cpol10.aspx">The Code Project Open License (CPOL)</a></p></div>
			
			<h2>About the Author</h2>
			
					
            
<table border="0" cellpadding="0" cellspacing="5" width="100%">
<tbody><tr valign="top">
<td id="ctl00_AboutAuthorRptr_ctl00_AboutAuthor_memberPhotoTable" style="width: 155px;" valign="top">
	<b><a id="ctl00_AboutAuthorRptr_ctl00_AboutAuthor_memberProfileLink" href="http://www.codeproject.com/script/Membership/Profiles.aspx?mid=4971904">alexander suresh</a></b><br><br>
	<center></center><br>
	<span id="ctl00_AboutAuthorRptr_ctl00_AboutAuthor_memberType" class="SmallText"></span>
		
</td>
		
<td>
	passionate windows device driver developer<br>	

	<table>
	<tbody><tr id="ctl00_AboutAuthorRptr_ctl00_AboutAuthor_jobTitleRow">
			<td class="SmallText" nowrap="nowrap">Occupation: </td>
			<td width="100%"><span id="ctl00_AboutAuthorRptr_ctl00_AboutAuthor_memberJobTitle" class="SmallText">Software Developer (Senior)</span></td>
		</tr>
		

	

	<tr id="ctl00_AboutAuthorRptr_ctl00_AboutAuthor_locationRow">
			<td class="SmallText">Location: </td>
			<td width="100%"><span id="ctl00_AboutAuthorRptr_ctl00_AboutAuthor_memberLocation" class="SmallText"><img src="NDIS_6.0_miniport__driver.aspx_files/US.gif" alt="United States" height="11" width="16"> United States</span></td>
		</tr>
		
	</tbody></table>
	
</td>
</tr>
</tbody></table>

					<br>
				
			
			<table id="ctl00_PopularArticlesRow" border="0" cellpadding="0" cellspacing="0" width="100%">
			<tbody><tr valign="top">
				<td style="width: 100%;">
					<h2>Other popular Hardware &amp; System articles:</h2><ul><li><a href="http://www.codeproject.com/KB/system/xyntservice.aspx">Start Your Windows Programs From An NT Service</a><div class="SmallText">Make your MFC, VB and other Windows programs behave like NT services.</div></li><li><a href="http://www.codeproject.com/KB/system/serial.aspx">Serial library for C++</a><div class="SmallText">A high-performance, complete and compact serial library for C++</div></li><li><a href="http://www.codeproject.com/KB/system/hooksys.aspx">API hooking revealed</a><div class="SmallText">The article demonstrates how to build a user mode Win32 API spying system</div></li><li><a href="http://www.codeproject.com/KB/system/driverdev.aspx">Driver Development Part 1: Introduction to Drivers</a><div class="SmallText">This article will go into the basics of creating a simple driver.</div></li><li><a href="http://www.codeproject.com/KB/system/NoDeleteDelay.aspx">Eliminating Explorer's delay when deleting an in-use file</a><div class="SmallText">How to track down and patch an annoyance in Windows Explorer's code.</div></li></ul>
					<h2></h2>				
				</td>
				<td>
					<iframe src="NDIS_6.0_miniport__driver.aspx_files/ServeThirdParty_004.htm" frameborder="0" height="250" scrolling="no" width="300"></iframe>
				</td>
			</tr>
		</tbody></table>
		
		
			<div id="ctl00_AddTo_AddTo" style="margin: 10px;">
<script language="JavaScript" type="text/javascript">
var addtoMethod=1;
var AddURL = document.location.href;
var AddTitle = escape(document.title);
DrawLinks(100, 0, "SmallText Bold", "AddTo") 
</script><span class="SmallText Bold">Add this article to: </span> <a class="AddTo" title="Add this page to Digg" onclick="return addto(0);" href="#"><img src="NDIS_6.0_miniport__driver.aspx_files/AddTo_Digg.png" align="absmiddle" border="0" height="16" width="16"></a>  <a class="AddTo" title="Add this page to Del.icio.us" onclick="return addto(1);" href="#"><img src="NDIS_6.0_miniport__driver.aspx_files/AddTo_Delicious.png" align="absmiddle" border="0" height="16" width="16"></a>  <a class="AddTo" title="Add this page to Google" onclick="return addto(2);" href="#"><img src="NDIS_6.0_miniport__driver.aspx_files/AddTo_Google.png" align="absmiddle" border="0" height="16" width="16"></a>  <a class="AddTo" title="Add this page to Windows Live" onclick="return addto(3);" href="#"><img src="NDIS_6.0_miniport__driver.aspx_files/AddTo_Live.png" align="absmiddle" border="0" height="16" width="16"></a>  <a class="AddTo" title="Add this page to Yahoo! MyWeb" onclick="return addto(4);" href="#"><img src="NDIS_6.0_miniport__driver.aspx_files/AddTo_Yahoo.png" align="absmiddle" border="0" height="16" width="16"></a>  <a class="AddTo" title="Add this page to Technorati" onclick="return addto(5);" href="#"><img src="NDIS_6.0_miniport__driver.aspx_files/AddTo_Technorati.png" align="absmiddle" border="0" height="16" width="16"></a>  <a class="AddTo" title="Add this page to Blink" onclick="return addto(6);" href="#"><img src="NDIS_6.0_miniport__driver.aspx_files/AddTo_Blink.png" align="absmiddle" border="0" height="16" width="16"></a>  <a class="AddTo" title="Add this page to Facebook" onclick="return addto(7);" href="#"><img src="NDIS_6.0_miniport__driver.aspx_files/AddTo_Facebook.png" align="absmiddle" border="0" height="16" width="16"></a>  <a class="AddTo" title="Add this page to Furl" onclick="return addto(8);" href="#"><img src="NDIS_6.0_miniport__driver.aspx_files/AddTo_Furl.png" align="absmiddle" border="0" height="16" width="16"></a>  <a class="AddTo" title="Add this page to Simpy" onclick="return addto(9);" href="#"><img src="NDIS_6.0_miniport__driver.aspx_files/AddTo_Simpy.png" align="absmiddle" border="0" height="16" width="16"></a>  <a class="AddTo" title="Add this page to Reddit" onclick="return addto(10);" href="#"><img src="NDIS_6.0_miniport__driver.aspx_files/AddTo_Reddit.png" align="absmiddle" border="0" height="16" width="16"></a>  <a class="AddTo" title="Add this page to Newsvine" onclick="return addto(11);" href="#"><img src="NDIS_6.0_miniport__driver.aspx_files/AddTo_Newsvine.png" align="absmiddle" border="0" height="16" width="16"></a>  <a class="AddTo" title="Add this page to Stumbleupon" onclick="return addto(12);" href="#"><img src="NDIS_6.0_miniport__driver.aspx_files/AddTo_stumbleupon.png" align="absmiddle" border="0" height="16" width="16"></a>  <a class="AddTo" title="Add this page to Mr. Wong" onclick="return addto(13);" href="#"><img src="NDIS_6.0_miniport__driver.aspx_files/AddTo_MrWong.png" align="absmiddle" border="0" height="16" width="16"></a>  
</div>
			
			<table id="ctl00_RateArticleRow" class="ArticleUneditedHeader" border="0" cellpadding="0" cellspacing="0" width="100%">
			<tbody><tr>
				<td><a href="#_top">Article Top</a></td>
				<td align="right">            
<table cellpadding="0" cellspacing="0" width="100%"><tbody><tr>

	
	
	<td id="voteTbl" style="white-space: nowrap;" class="SmallText" align="right">
	
		<table><tbody><tr>
		
		<td id="ctl00_RateArticle_RateText" style="padding-right: 5px;"><i><b>Rate this Article for us!</b></i></td>
				
		<td id="ctl00_RateArticle_StartForm" align="right"><i>&nbsp;&nbsp;Poor</i></td>
				
		<td id="ctl00_RateArticle_VoteFormDiv" style="white-space: nowrap;" align="left">
		<table id="ctl00_RateArticle_VoteRBL" border="0">
					<tbody><tr>
						<td><input id="ctl00_RateArticle_VoteRBL_0" name="ctl00$RateArticle$VoteRBL" value="1" type="radio"></td><td><input id="ctl00_RateArticle_VoteRBL_1" name="ctl00$RateArticle$VoteRBL" value="2" type="radio"></td><td><input id="ctl00_RateArticle_VoteRBL_2" name="ctl00$RateArticle$VoteRBL" value="3" type="radio"></td><td><input id="ctl00_RateArticle_VoteRBL_3" name="ctl00$RateArticle$VoteRBL" value="4" type="radio"></td><td><input id="ctl00_RateArticle_VoteRBL_4" name="ctl00$RateArticle$VoteRBL" value="5" type="radio"></td>
					</tr>
				</tbody></table> 
		</td>
				
		<td id="ctl00_RateArticle_EndForm" align="left" nowrap="nowrap"><i>Excellent</i>
			<input name="ctl00$RateArticle$SubmitRateBtn" value="Vote" onclick="return rateItem(24384,2);" id="ctl00_RateArticle_SubmitRateBtn" class="FormButton" type="submit"> 
		</td>
				
		<td><span id="ctl00_RateArticle_ErrorMessage"></span></td>
		</tr></tbody></table>
	</td>
</tr></tbody></table>



</td>
			</tr>
		</tbody></table>
		
			
		<div>

			<input name="__EVENTVALIDATION" id="__EVENTVALIDATION" value="/wEWCAKT8bPADQLAlMXDBwLBlMXDBwLClMXDBwLDlMXDBwLElMXDBwLP+++tCwK5upDkC4CJ7IZ4cGBVOx26Xf/H80Eh+MMR" type="hidden">
		</div></form>
			
			<div style="padding: 10px; overflow: hidden; text-align: center; white-space: nowrap;">
				<iframe src="NDIS_6.0_miniport__driver.aspx_files/ServeThirdParty_005.htm" frameborder="0" height="60" scrolling="no" width="468"></iframe>
									  
			</div>

			<a name="_comments"></a><!-- Forum Start -->
<div id="_MessageBoard" onclick="return SwitchMessage(event, null)">
	<table id="ForumTable" class="Frm_MainTable" cellpadding="0" cellspacing="0">
		<tbody><tr>
			<td><form action="/script/Forums/SetOptions.aspx?floc=%2fKB%2fsystem%2fNDIS_6.0_miniport__driver.aspx&amp;fid=1111439&amp;df=90&amp;mpp=25&amp;noise=3&amp;sort=Position&amp;view=Quick" method="get" style="margin: 0pt; padding: 0pt;">
				<input name="fid" value="1111439" type="hidden"><input name="currentQS" value="?floc=%2fKB%2fsystem%2fNDIS_6.0_miniport__driver.aspx&amp;fid=1111439&amp;df=90&amp;mpp=25&amp;noise=3&amp;sort=Position&amp;view=Quick" type="hidden"><input name="floc" value="/KB/system/NDIS_6.0_miniport__driver.aspx" type="hidden"><table border="0" cellpadding="3" cellspacing="0" width="100%">
					<tbody><tr class="Frm_HeaderRow1">
						<td style="white-space: nowrap;"><img src="NDIS_6.0_miniport__driver.aspx_files/forum_faq.gif" alt="FAQ" align="middle" border="0" height="16" width="16">&nbsp;<a href="http://www.codeproject.com/script/Forums/FAQ.aspx"><b>FAQ</b></a>&nbsp;</td><td style="white-space: nowrap; text-align: right;">Noise Tolerance<select size="1" class="Frm_DropDown" name="noise">
							<option value="1">Very High</option><option value="2">High</option><option selected="selected" value="3">Medium</option><option value="4">Low</option><option value="5">Very Low</option>
						</select></td><td colspan="2" style="white-space: nowrap; text-align: right;"><img src="NDIS_6.0_miniport__driver.aspx_files/forum_search.gif" alt="Search" align="top" border="0" height="15" width="16">&nbsp;<a href="http://www.codeproject.com/script/Forums/Search.aspx?fid=1111439">Search Messages</a>&nbsp;</td><td style="text-align: right;"><input value="Set Options" name="submit" class="Frm_Button" type="submit"></td>
					</tr><tr class="Frm_HeaderRow2">
						<td style="width: 100%;">&nbsp;</td><td style="white-space: nowrap; text-align: right;">Layout<select size="1" class="Frm_DropDown" name="view">
							<option selected="selected" value="Quick">Normal</option><option value="Topic">Expand Root Messages</option><option value="Expanded">Expand All Messages</option><option value="Thread">Thread View</option><option value="Normal">No Javascript (slow)</option><option value="Preview">No Javascript Preview</option>
						</select>&nbsp;&nbsp;</td><td style="white-space: nowrap;">Per page<select size="1" class="Frm_DropDown" name="mpp">
							<option value="10">10</option><option selected="selected" value="25">25</option><option value="50">50</option>
						</select>&nbsp;&nbsp;</td><td colspan="2">&nbsp;</td>
					</tr>
				</tbody></table>
			</form></td>
		</tr><tr>
			<td><a name="xx0xx"></a><table border="0" cellpadding="2" cellspacing="0" width="100%">

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -