next up previous contents index
Next: Standard Control Operations Up: x-kernel Programmer's Manual Previous: ROM file parsing

Control Operations

                       

Control operations are used to perform arbitrary operations on protocols and sessions, via the xControlProtl and

xControlSessn operations described in Sections 2.2.9 and 2.2.15. xControlProtl and

xControlSessn return an integer that indicates the length in bytes of the information which was written into the buffer, or -1 to indicate an error.

All implementations of control operations should check the length field before reading or writing the buffer, returning -1 if the buffer is too small. The checkLen( actualLength,

expectedLength) macro can be used for this.

The opcode field in the control operations specifies the operation to be performed on the protocol or session. There are two ``classes'' of operations: standard ones that may be implemented by more than one protocol, and protocol-specific ones.





Larry Peterson
Wed Jan 10 10:40:08 MST 1996