From c84878c894b93a322029625f0d16b00a4e66dcb0 Mon Sep 17 00:00:00 2001 From: Riza Sulistyo Date: Wed, 5 Oct 2016 09:52:39 +0000 Subject: Re #1964: Implement QoS for darwin OS which supports SO_NET_SERVICE_TYPE. git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@5445 74dad513-b988-da41-8d7b-12977e46ad98 --- pjlib/include/pj/compat/socket.h | 3 +++ pjlib/include/pj/config.h | 3 +++ pjlib/include/pj/sock_qos.h | 11 +++++++---- 3 files changed, 13 insertions(+), 4 deletions(-) (limited to 'pjlib/include') diff --git a/pjlib/include/pj/compat/socket.h b/pjlib/include/pj/compat/socket.h index 26e47b54..025d141f 100644 --- a/pjlib/include/pj/compat/socket.h +++ b/pjlib/include/pj/compat/socket.h @@ -159,18 +159,21 @@ # define OSERR_ECONNRESET WSAECONNRESET # define OSERR_ENOTCONN WSAENOTCONN # define OSERR_EAFNOSUPPORT WSAEAFNOSUPPORT +# define OSERR_ENOPROTOOPT WSAENOPROTOOPT #elif defined(PJ_SYMBIAN) && PJ_SYMBIAN!=0 # define OSERR_EWOULDBLOCK -1 # define OSERR_EINPROGRESS -1 # define OSERR_ECONNRESET -1 # define OSERR_ENOTCONN -1 # define OSERR_EAFNOSUPPORT -1 +# define OSERR_ENOPROTOOPT -1 #else # define OSERR_EWOULDBLOCK EWOULDBLOCK # define OSERR_EINPROGRESS EINPROGRESS # define OSERR_ECONNRESET ECONNRESET # define OSERR_ENOTCONN ENOTCONN # define OSERR_EAFNOSUPPORT EAFNOSUPPORT +# define OSERR_ENOPROTOOPT ENOPROTOOPT #endif diff --git a/pjlib/include/pj/config.h b/pjlib/include/pj/config.h index ca55ff30..80ae59d2 100644 --- a/pjlib/include/pj/config.h +++ b/pjlib/include/pj/config.h @@ -842,6 +842,9 @@ /** QoS backend for Symbian */ #define PJ_QOS_SYMBIAN 4 +/** QoS backend for Darwin */ +#define PJ_QOS_DARWIN 5 + /** * Force the use of some QoS backend API for some platforms. */ diff --git a/pjlib/include/pj/sock_qos.h b/pjlib/include/pj/sock_qos.h index c23204be..7e8d439a 100644 --- a/pjlib/include/pj/sock_qos.h +++ b/pjlib/include/pj/sock_qos.h @@ -121,10 +121,11 @@ PJ_BEGIN_DECL typedef enum pj_qos_type { PJ_QOS_TYPE_BEST_EFFORT, - PJ_QOS_TYPE_BACKGROUND, + PJ_QOS_TYPE_BACKGROUND, PJ_QOS_TYPE_VIDEO, PJ_QOS_TYPE_VOICE, - PJ_QOS_TYPE_CONTROL + PJ_QOS_TYPE_CONTROL, + PJ_QOS_TYPE_SIGNALLING } pj_qos_type; \endcode @@ -141,6 +142,7 @@ PJ_BEGIN_DECL VIDEO 0x28 VI (Video) 5 VOICE 0x30 VO (Voice) 6 CONTROL 0x38 VO (Voice) 7 + SIGNALLING 0x28 VI (Video) 5 ================================================================= \endcode @@ -235,10 +237,11 @@ typedef enum pj_qos_type PJ_QOS_TYPE_BEST_EFFORT, /**< Best effort traffic (default value). Any QoS function calls with specifying this value are effectively no-op */ - PJ_QOS_TYPE_BACKGROUND, /**< Background traffic. */ + PJ_QOS_TYPE_BACKGROUND, /**< Background traffic. */ PJ_QOS_TYPE_VIDEO, /**< Video traffic. */ PJ_QOS_TYPE_VOICE, /**< Voice traffic. */ - PJ_QOS_TYPE_CONTROL /**< Control traffic. */ + PJ_QOS_TYPE_CONTROL, /**< Control traffic. */ + PJ_QOS_TYPE_SIGNALLING /**< Signalling traffic. */ } pj_qos_type; /** -- cgit v1.2.3