The sendmsg() function is used to send data, ancillary data, or a combination of these through a connected or unconnected socket.
The sendmsg() API allows for quality of service (QoS) classification data. QoS policies use this function to define a more granular classification level for outgoing or incoming TCP/IP traffic. They specifically use ancillary data types that apply to the IP layer. The message type used is IP_QOS_CLASSIFICATION_DATA. This ancillary data can be used by the application to define attributes for traffic in a particular TCP connection. If the attributes passed by the application match the attributes defined in the QoS policy, then the TCP traffic is restricted by the policy.
Use the following information to initialize the IP_QOS_CLASSIFICATION_DATA structure:
Connection level scope indicates that the QoS service-level obtained through classification of this message will remain in effect for all subsequent messages sent until the next sendmsg() with QoS classification data. Message level scope indicates that the QoS service level assigned will only be used for the message data included in this sendmsg() call. Future data sent without QoS classification data will inherit the previous connection level QoS assignment (from last Connection Level classification through sendmsg() or from the original TCP connection classification during connection establishment).