Re: PPPoE and PPPoA as Modem Driver
Re: PPPoE and PPPoA as Modem Driver
- Subject: Re: PPPoE and PPPoA as Modem Driver
- From: Quinn <email@hidden>
- Date: Tue, 12 Feb 2002 16:59:38 +0000
At 10:25 -0500 12/2/02, email@hidden wrote:
However, I still need to know how to interpret T_OPTMGMT_REQ? The TPI
spec says that it is up to the modules to define the format of the
option data. The one I get says its length is 0x8C and the MGMT_flags
are set at 0x04. How do I interpret the option data and the MGMT_flags?
In this case your TPI driver is a serial driver, and thus you have to
support the options for serial drivers. These options are described
in IM:NWOT.
<
http://developer.apple.com/techpubs/mac/NetworkingOT/NetworkingWOT-78.html>
<
http://developer.apple.com/techpubs/mac/NetworkingOT/NetworkingWOT-461.html>
When you get a T_OPTMGMT_REQ, you'll see one M_PROTO message block,
which contains a T_optmgmt_req structure. The content of this
structure is defined in section 2.1.1.4 of the TPI spec, which you
can download from the following URL.
<
http://developer.apple.com/macos/opentransport/docs_dev.html>
The MGMT_flags field you're seeing ($04) is the value of the
T_NEGOTIATE flag, ie someone is trying to set options.
The OPT_length and OPT_offset fields describe an option buffer. The
option buffer contains one or more options. Each option is a
TOptionHeader structure, followed by the option value. The length of
the option is defined by the len field of the TOptionHeader, which
includes the length of the option header itself. You can skip from
one option to the next using either the OTNextOption function or the
OPT_NEXTHDR macro, both defined in "OpenTransport.h".
When looking at TPI it's often very helpful to look at the
corresponding OT API. For example, the MGMT_flags field of the
T_optmgmt_req structure is equivalent to the flags field of the
TOptMgmt structure you would pass to the req parameter of
OTOptionManagement, and the option buffer described by OPT_length and
OPT_offset is equivalent to the option buffer you would set via the
opt TNetBuf field of the same TOptMgmt structure. So you can look at
the client documentation for a request and determine the behaviour
the client is expecting of your kernel module.
For example, there's a whole bunch of information about options in
section 5.2 of the XTI specification, downloadable from the web page
referenced above.
S+E
--
Quinn "The Eskimo!" <
http://www.apple.com/developer/>
Apple Developer Technical Support * Networking, Communications, Hardware
_______________________________________________
macnetworkprog mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/macnetworkprog
Do not post admin requests to the list. They will be ignored.