WDP_UNITDATA (Compact 2013)

3/26/2014

This structure represents unit data and is used to transmit data as unreliable datagrams. If a client is not listening on the incoming port or if the packet is too large, a Wireless Control Message Protocol (WCMP) message will be generated. For more information, see the "Remarks" section of this topic.

Syntax

typedef struct wdp_unitdata_tag{
  WAP_PRIMITIVE_ID wpiPrimitiveID;
  WAP_PRIMITIVE_TYPE wptPrimitiveType;
  DWORD dwValidFields;
  WAP_ADDRESS waSourceAddress;
  DWORD dwSourcePort;
  WAP_ADDRESS waDestinationAddress;
  DWORD dwDestinationPort;
  const BYTE* pbUserData;
  DWORD dwUserDataSize;
} WDP_UNITDATA;

Members

  • wpiPrimitiveID
    The primitive identifier. The only possible value is WAP_PRIMITIVE_ID_T_DUNITDATA, as defined by the WAP_PRIMITIVE_ID enumeration. Applications will cast the base structure according to this identifier. It is always present and valid.
  • wptPrimitiveType
    The primitive type. Possible values are any of the values defined for the WAP_PRIMITIVE_TYPE enumeration.
  • dwValidFields
    The bitmask that indicates the valid fields in the primitive, dependent on the value of wpiPrimitiveID. For possible values, see WAP_PRIMITIVE_BASE.
  • waSourceAddress
    A WAP_ADDRESS structure that contains the sender's unique address. This member is optional and ignored on a Wireless Datagram Protocol (WDP) request over IP and Short Message Service (SMS) bearers. The appropriate source address will be filled in when the WDP indication is sent.
  • dwSourcePort
    The port used by the sender. For primitives of type WAP_PRIMITIVE_TYPE_REQUEST, this member is ignored. The source port is filled in with the value specified in the dwLocalPort parameter in WapOpen calls.
  • waDestinationAddress
    A WAP_ADDRESS structure that contains the destination address of the user data that is being sent.
  • dwDestinationPort
    The destination port of the user data that is being sent.
  • pbUserData
    Pointer to the datagram that is being sent.
  • dwUserDataSize
    The number of bytes in the datagram indicated by pbUserData.

Remarks

Different bearers, such as IP and Global System for Mobile Communications (GSM) SMS, can have different behaviors when handling requests to send 0 bytes of user data. In particular, callers should not rely on being able to send 0-byte datagrams.

Requirements

Header

wap.h

See Also

Reference

WAP Structures
WAP_ADDRESS
WapOpen
WAP_PRIMITIVE_ID
WAP_PRIMITIVE_TYPE
WAP_PRIMITIVE_BASE