Developer

API Reference

AEESockCMsgHdr

Brew Release
Brew MP 1.0.2
See Also
ISockPort_RecvMsg(), AEESockMsgHdr
Description
This data type is used for ancillary data returned by ISockPort_RecvMsg().
Members
  • uLen  : data byte count, including header.
  • nLevel: originating protocol.
  • nType : protocol-specific type.
Definition
   typedef struct AEESockCMsgHdr {
      uint32         uLen;
      int            nLevel;
      int            nType;
   } AEESockCMsgHdr;
Comment
The data section of the ancillary data must be accessed using the following macros:
AEESOCKCMSG_FIRSTHDR(AEESockMsgHdr msg) returns a pointer to the first AEESockCMsgHdr in the ancillary data buffer associated with the passed msg.
AEESOCKCMSG_NXTHDR(AEESockMsgHdr msg, AEESockCMsgHdr cmsg) returns the next valid AEESockCMsgHdr after the passed cmsg. It returns NULL when there isn't enough space left in the buffer.
AEESOCKCMSG_ALIGN(int len), given a length, returns it including the required alignment. This is a constant expression.
AEESOCKCMSG_SPACE(int len) returns the number of bytes an ancillary element with payload of the passed data length occupies. This is a constant expression.
AEESOCKCMSG_DATA(AEESockCMsgHdr cmsg) returns a pointer to the data portion of a cmsg.
AEESOCKCMSG_LEN(int len) returns the value to store in the uLen member of the AEESockCMsgHdr structure, taking into account any necessary alignment. It takes the data length as an argument. This is a constant expression.
Specified by Posix.1g.
  • Follow