+#define SO_TRAFFIC_MGT_BACKGROUND 0x1105 /* Background traffic management */
+
+#define SO_FLOW_DIVERT_TOKEN 0x1106 /* flow divert token */
+
+#define SO_DELEGATED 0x1107 /* set socket as delegate (pid_t) */
+#define SO_DELEGATED_UUID 0x1108 /* set socket as delegate (uuid_t) */
+#define SO_NECP_ATTRIBUTES 0x1109 /* NECP socket attributes (domain, account, etc.) */
+#define SO_CFIL_SOCK_ID 0x1110 /* get content filter socket ID (cfil_sock_id_t) */
+#define SO_NECP_CLIENTUUID 0x1111 /* NECP Client uuid */
+#endif /* PRIVATE */
+#define SO_NUMRCVPKT 0x1112 /* number of datagrams in receive socket buffer */
+#ifdef PRIVATE
+#define SO_AWDL_UNRESTRICTED 0x1113 /* try to use AWDL in restricted mode */
+#define SO_EXTENDED_BK_IDLE 0x1114 /* extended time to keep socket idle after app is suspended (int) */
+#define SO_MARK_CELLFALLBACK 0x1115 /* Mark as initiated by cell fallback */
+#endif /* PRIVATE */
+
+/*
+ * Network Service Type for option SO_NET_SERVICE_TYPE
+ *
+ * The vast majority of sockets should use Best Effort that is the default
+ * Network Service Type. Other Network Service Types have to be used only if
+ * the traffic actually matches the description of the Network Service Type.
+ *
+ * Network Service Types do not represent priorities but rather describe
+ * different categories of delay, jitter and loss parameters.
+ * Those parameters may influence protocols from layer 4 protocols like TCP
+ * to layer 2 protocols like Wi-Fi. The Network Service Type can determine
+ * how the traffic is queued and scheduled by the host networking stack and
+ * by other entities on the network like switches and routers. For example
+ * for Wi-Fi, the Network Service Type can select the marking of the
+ * layer 2 packet with the appropriate WMM Access Category.
+ *
+ * There is no point in attempting to game the system and use
+ * a Network Service Type that does not correspond to the actual
+ * traffic characteristic but one that seems to have a higher precedence.
+ * The reason is that for service classes that have lower tolerance
+ * for delay and jitter, the queues size is lower than for service
+ * classes that are more tolerant to delay and jitter.
+ *
+ * For example using a voice service type for bulk data transfer will lead
+ * to disastrous results as soon as congestion happens because the voice
+ * queue overflows and packets get dropped. This is not only bad for the bulk
+ * data transfer but it is also bad for VoIP apps that legitimately are using
+ * the voice service type.
+ *
+ * The characteristics of the Network Service Types are based on the service
+ * classes defined in RFC 4594 "Configuration Guidelines for DiffServ Service
+ * Classes"
+ *
+ * When system detects the outgoing interface belongs to a DiffServ domain
+ * that follows the recommendation of the IETF draft "Guidelines for DiffServ to
+ * IEEE 802.11 Mapping", the packet will marked at layer 3 with a DSCP value
+ * that corresponds to Network Service Type.
+ *
+ * NET_SERVICE_TYPE_BE
+ * "Best Effort", unclassified/standard. This is the default service
+ * class and cover the majority of the traffic.
+ *
+ * NET_SERVICE_TYPE_BK
+ * "Background", high delay tolerant, loss tolerant. elastic flow,
+ * variable size & long-lived. E.g: non-interactive network bulk transfer
+ * like synching or backup.
+ *
+ * NET_SERVICE_TYPE_RD
+ * "Responsive Data", a notch higher than "Best Effort", medium delay
+ * tolerant, elastic & inelastic flow, bursty, long-lived. E.g. email,
+ * instant messaging, for which there is a sense of interactivity and
+ * urgency (user waiting for output).
+ *
+ * NET_SERVICE_TYPE_OAM
+ * "Operations, Administration, and Management", medium delay tolerant,
+ * low-medium loss tolerant, elastic & inelastic flows, variable size.
+ * E.g. VPN tunnels.
+ *
+ * NET_SERVICE_TYPE_AV
+ * "Multimedia Audio/Video Streaming", medium delay tolerant, low-medium
+ * loss tolerant, elastic flow, constant packet interval, variable rate
+ * and size. E.g. video and audio playback with buffering.
+ *
+ * NET_SERVICE_TYPE_RV
+ * "Responsive Multimedia Audio/Video", low delay tolerant, low-medium
+ * loss tolerant, elastic flow, variable packet interval, rate and size.
+ * E.g. screen sharing.
+ *
+ * NET_SERVICE_TYPE_VI
+ * "Interactive Video", low delay tolerant, low-medium loss tolerant,
+ * elastic flow, constant packet interval, variable rate & size. E.g.
+ * video telephony.
+ *
+ * NET_SERVICE_TYPE_SIG
+ * "Signaling", low delay tolerant, low loss tolerant, inelastic flow,
+ * jitter tolerant, rate is bursty but short, variable size. E.g. SIP.
+ *
+ * NET_SERVICE_TYPE_VO
+ * "Interactive Voice", very low delay tolerant, very low loss tolerant,
+ * inelastic flow, constant packet rate, somewhat fixed size.
+ * E.g. VoIP.
+ */
+#define SO_NET_SERVICE_TYPE 0x1116 /* Network service type */
+
+#define NET_SERVICE_TYPE_BE 0 /* Best effort */
+#define NET_SERVICE_TYPE_BK 1 /* Background system initiated */
+#define NET_SERVICE_TYPE_SIG 2 /* Signaling */
+#define NET_SERVICE_TYPE_VI 3 /* Interactive Video */
+#define NET_SERVICE_TYPE_VO 4 /* Interactive Voice */
+#define NET_SERVICE_TYPE_RV 5 /* Responsive Multimedia Audio/Video */
+#define NET_SERVICE_TYPE_AV 6 /* Multimedia Audio/Video Streaming */
+#define NET_SERVICE_TYPE_OAM 7 /* Operations, Administration, and Management */
+#define NET_SERVICE_TYPE_RD 8 /* Responsive Data */
+
+#if PRIVATE
+#define SO_QOSMARKING_POLICY_OVERRIDE 0x1117 /* int */
+#define SO_INTCOPROC_ALLOW 0x1118 /* Try to use internal co-processor interfaces. */
+
+#define _NET_SERVICE_TYPE_COUNT 9
+#define _NET_SERVICE_TYPE_UNSPEC ((int)-1)
+
+#define IS_VALID_NET_SERVICE_TYPE(c) \
+ (c >= NET_SERVICE_TYPE_BE && c <= NET_SERVICE_TYPE_RD)
+
+extern const int sotc_by_netservicetype[_NET_SERVICE_TYPE_COUNT];
+
+/*
+ * Facility to pass Network Service Type values using SO_TRAFFIC_CLASS
+ * Mostly useful to simplify implementation of frameworks to adopt the new
+ * Network Service Type values for Signaling.
+ */
+#define SO_TC_NET_SERVICE_OFFSET 10000
+#define SO_TC_NETSVC_SIG (SO_TC_NET_SERVICE_OFFSET + NET_SERVICE_TYPE_SIG)