Retired Document
Important: This sample code may not represent best practices for current development. The project may use deprecated symbols and illustrate technologies and techniques that are no longer recommended.
ReadMe-BSDLLCTest.html
<HTML> |
<!--This file created 6/4/03 9:18 PM by Claris Home Page version 3.0--> |
<HEAD> |
<TITLE>Welcome to Adobe GoLive 6</TITLE> |
<META NAME=GENERATOR CONTENT="Claris Home Page 3.0"> |
<X-CLARIS-WINDOW TOP=50 BOTTOM=746 LEFT=401 RIGHT=931> |
<X-CLARIS-TAGVIEW MODE=minimal> |
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><meta http-equiv="content-type" content="text/html;charset=ISO-8859-1"> |
</HEAD> |
<BODY BGCOLOR="#FFFFFF"> |
<H1>Read Me About BSDLLCTest</H1> |
<P>1.2d1</P> |
<P>The BSDLLCTest sample demonstrates how to read and write Ethernet |
Link Layer Control (LLC) packets directly to the Ethernet driver |
using BSD Raw Mode (PF_NDRV) API's. This update of the sample |
implements Quinn's MoreAuthSample v1.0b3 code so that the sample |
demonstrates the use of a tool to open a PF_NDRV socket with |
supervisory privileges as well as using the MoreAuthSample to return |
the privileged socket to the application.</P> |
<P>This sample assumes an understanding of the use of the |
MoreAuthSample code. You can obtain the MoreAuthSample code from the |
<A HREF="http://developer.apple.com/samplecode/Sample_Code/Security/MoreAuthSample.htm">DTS |
Sample Code Web Site</A>.</P> |
<H2>Packing List</H2> |
<P>The sample contains the following items.</P> |
<UL> |
<LI>BSDLLCTest.app - compiled version of the sample</LI> |
<LI>BSDLLCTest.c - The BSDLLCTest Application source code.</LI> |
<LI>BSDLLCTest.nib - The user interface for the sample.</LI> |
<LI>BSDLLCTestCommon.h - Declarations common to the application |
and tool.</LI> |
<LI>EthernetSocketStuff.c - The source code for the processing the |
ethernet test</LI> |
<LI>GetEthernetAddrSample.c - Source code to obtain the Ethernet |
Address for all Ethernet ports present</LI> |
<LI>EthernetSocketTool.c - Source code for the tool which opens |
the PF_NDRV socket and returns it to the caller.</LI> |
<LI>MoreAuthSample - The MoreAuthSample module.</LI> |
</UL> |
<H2>Using the Sample</H2> |
<P>The BSDLLCTest sample is used to send or to receive Ethernet LLC |
type packets. The sample does not have a User Interface to handle |
Ethernet Type I packets (e.g normal TCP/IP packets). Launch a copy of |
the sample application on one machine designated to receive packets |
and another copy on a sender system.</P> |
<P>After launching the sample, ensure that the "Ethernet Port" popup |
button is set to the desired port to send/recieve packets. You can |
specify the Source Address or Destination address to be used for |
outgoing packets. By default, in send mode, the packet is set to be |
broadcast on the local network and the source address is set to that |
of the selected port. For receiving packets, the destination address |
is that of the selected port. You must delimit each hex word of the |
source and/or destination Ethernet address with a ':' or '-' |
character.</P> |
<P>Specify the desired Service Access Protocol (SAP) address to use. |
If you enter a SAP addreess of "0xAA", you will also need to enter |
the desired Sub Network Access Protocol (SNAP) address to use.</P> |
<P>Click the "Send/Receive" radio button to enable the desired test |
function. For the "Receive" test, the test runs until the Cancel Test |
button is clicked. For the "Send" test, the application will send |
"Num Packets" of 1500 bytes to the selected interface driver.</P> |
<P>Every time that the application is used and the "Do Test" button |
is clicked, the system will present an Authentication dialog. You |
must enter the admininistrative User Name and Password in order to |
continue with the test.</P> |
<H2>Building the Sample</H2> |
<P>You can build the sample using Project Builder from the Mac OS X |
10.2 developer tools. Open the project file (BSDLLCTest.pbproj), make |
sure that the "BSDLLCTest" target is selected, and choose Build from |
the Build menu. This will automatically build the application and the |
helper tool.</P> |
<H2>Caveats</H2> |
<P>The BSDLLCTest code requires the presence of Mac OS X 10.1.x or |
greater to run.</P> |
<P>You can build the sample with Project Builder from the December |
2002 Developer Tools.</P> |
<P>The BSDLLCTest sample demonstrates what happens when an |
application floods an Ethernet driver with too many packets at once - |
the outgoing packets are dropped. The default setting for outbound |
packets is 10000. If the Receiver side is active, you will find that |
less than 20% of the outbound packets are received. This is not a |
problem with the receive portion of the test, but with the sender. |
You can verify this using an Ethernet sniffer to watch the Ethernet |
traffic between the sender and receiver.</P> |
<P>Under Mac OS X 10.1.x, you cannot send an Ethernet packet with the |
size field set to 1500 via a PF_NDRV socket. (This is an issue with |
PF_NDRV sockets only). The application will change the value of 1500 |
to 1499 for all outbound packets when running under 10.1.X.</P> |
<P>If you have run a previous version of this sample and the program |
fails to use the tool to open a PFNDRV socket, you may be using an |
outdated version of the GetPFNDRSocketTool. Trash the |
"~user/Library/Application Support/BSDLLCTest" folder and launch the |
application again.</P> |
<H2>Credits and Version History</H2> |
<P>If you find any problems with this sample, mail |
<DTS@apple.com> and I’ll try to fix them up.</P> |
<P>1.2d1 (June 2003)</P> |
<P>Apple Developer Technical Support<BR> |
Networking, Communications, Hardware</P> |
<P>1 Jun 2003</P> |
<P><!-- |
$Log: ReadMeAboutMoreAuthSample.html,v $ |
Revision 1.1 2002/12/13 00:49:15 eskimo1 |
First checked in. |
--></P> |
</BODY> |
</HTML> |
Copyright © 2003 Apple Computer, Inc. All Rights Reserved. Terms of Use | Privacy Policy | Updated: 2003-06-12