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 Option Management Structure

The option management structure is used for the req and ret parameters of the OTOptionManagement function. The req parameter is used to verify or negotiate option values. The ret parameter returns information about an endpoint's default, current, or negotiated values.

The option management structure is defined by the TOptMgmt data type.

struct TOptMgmt
{  
   TNetbuf  opt;
   OTFlags  flags;
};

typedef struct TOptMgmt TOptMgmt
Field Description
opt
A TNetbuf structure describing the buffer containing option information. The opt.maxlen field specifies the maximum size of the buffer. The opt.len field specifies the actual size of the buffer, and the opt.buf field contains the address of the buffer.

On input, as part of the req parameter, the buffer contains TOption structures describing the options to be negotiated or verified, or contains the names of options whose default or current values you are interested in. You must allocate this buffer, place in it the structures describing the options of interest, and set the opt.len field to the size of the buffer.

On output, as part of the ret parameter, the buffer contains the actual values of the options you described in the req parameter. You must allocate a buffer to hold the option information when the function returns and set the opt.maxlen field to the maximum length of this buffer. When the function returns, the opt.len field is set to the actual length of the buffer.

flags
For the req parameter, the flags field indicates the action to be taken as defined by the action flags enumeration. For the ret parameter, the flags field indicates the overall success or failure of the operation performed by the OTOptionManagement function, as defined by the status codes enumeration.

Previous Book Contents Book Index Next

© Apple Computer, Inc.
15 JAN 1998