in reply to Setting IP Precedence(TOS) on UDP traffic

To do this you will need to construct the packet manually - The XS portion of the Socket module does not define the SO_PRIORITY macro which is used to set the protocol-defined priority for packets sent on a socket.

The existing modules NetPacket and Net::RawIP may be of use in constructing UDP packets - Alternatively, an example of UDP packet construction from raw values using the pack function can be found in the Net::DHCPClient module.

 

perl -le 'print+unpack("N",pack("B32","00000000000000000000001000010000"))'