Opened 8 years ago

Closed 8 years ago

#1963 closed enhancement (fixed)

QoS for IPv6 for platform that supports IPV6_TCLASS

Reported by: riza Owned by: bennylp
Priority: normal Milestone: release-2.6
Component: pjlib Version: trunk
Keywords: Cc:
Backport to 1.x milestone: Backported: no


This patch changes the BSD sockets implementation of QoS to use IPV6_TCLASS for IPv6 sockets instead of IP_TOS.

Summary of changes:

  • new constant PJ_IPV6_TCLASS, wrapper of IPV6_TCLASS (if defined) or 0xFFFF, because there is no sane default - all operating systems that implement the IPV6_TCLASS option assign a different value to it, and no RFC standardizes it
  • pj_IPV6_TCLASS() wrapper for PJ_IPV6_TCLASS constant
  • pj_sock_set_qos_params and pj_sock_get_qos_params now check for the socket address family before trying to set or get the socket's QoS: if the socket is IPv4, they will use pj_IP_TOS() as before, if the socket is IPv6 they will use pj_IPV6_TCLASS() instead. Before, using QoS on an IPv6 socket would unconditionally fail with PJ_STATUS_FROM_OS(EINVAL), now it will succeed if the OS supports IPV6_TCLASS (or fail with PJ_STATUS_FROM_OS(ENOPROTOOPT) if it doesn't)

Thanks to Michele Cicciotti for the patch.

Change History (2)

comment:1 Changed 8 years ago by riza

In 5444:

Re #1963: Implement QoS for IPv6 for platform that supports IPV6_TCLASS.

comment:2 Changed 8 years ago by riza

  • Resolution set to fixed
  • Status changed from new to closed
Note: See TracTickets for help on using tickets.