Legacy Documentclose button

Important: The information in this document is obsolete and should not be used for new development.

Previous Book Contents Book Index Next

Inside Macintosh: Networking With Open Transport / Part 2 - Open Transport Reference
Chapter 25 - Option Management Reference / Constants and Data Types


The TOption Structure

The TOption structure stores information about a single option in a buffer. All functions that you use to change or verify option values use a buffer containing TOption structures to store option information. For each option in the buffer, the TOption structure specifies the total length occupied by the option, the protocol level of the option, the option name, the status of a negotiated value, and the value of the option.

You use the TOption structure with the OPT_NEXTHDR macro, the OTCreateOptionString function, the OTNextOption function, and the OTFindOption function.

The TOption structure is defined by the TOption data type.

struct TOption
{
   UInt32      len;        
   OTXTILevel  level;    
   OTXTIName   name;    
   UInt32      status;  
   UInt32      value[1];
};
typedef struct TOption TOption;
Field Description
len
The size (in bytes) of the option information, including the header.
level
The protocol for which the option is defined.
name
The name of the option.
status
A status code specifying whether the negotiation has succeeded or failed. Possible values are given by the status codes enumeration.
value
The option value. To have the endpoint select an appropriate value, you can specify the constant T_UNSPEC.

Previous Book Contents Book Index Next

© Apple Computer, Inc.
15 JAN 1998