This is a smaller diff, combined from the two patches currently in the qpolicy subtree. -- Documentation/networking/dccp.txt | 3 +++ include/linux/dccp.h | 1 + net/dccp/proto.c | 3 +++ 3 files changed, 7 insertions(+) --- a/Documentation/networking/dccp.txt +++ b/Documentation/networking/dccp.txt @@ -45,6 +45,9 @@ http://linux-net.osdl.org/index.php/DCCP Socket options ============== +DCCP_SOCKOPT_QPOLICY_AVAILABLE returns the highest supported policy number. The +policy IDs start with 0 (default policy) and are consecutively numbered. + DCCP_SOCKOPT_QPOLICY_ID sets the dequeuing policy for outgoing packets. It takes a policy ID as argument and can only be set before the connection (i.e. changes during an established connection are not supported). Currently, two policies are --- a/include/linux/dccp.h +++ b/include/linux/dccp.h @@ -223,6 +223,7 @@ enum dccp_packet_dequeueing_policy { #define DCCP_SOCKOPT_RX_CCID 15 #define DCCP_SOCKOPT_QPOLICY_ID 16 #define DCCP_SOCKOPT_QPOLICY_TXQLEN 17 +#define DCCP_SOCKOPT_QPOLICY_AVAILABLE 18 #define DCCP_SOCKOPT_CCID_RX_INFO 128 #define DCCP_SOCKOPT_CCID_TX_INFO 192 --- a/net/dccp/proto.c +++ b/net/dccp/proto.c @@ -666,6 +666,9 @@ static int do_dccp_getsockopt(struct soc case DCCP_SOCKOPT_QPOLICY_TXQLEN: val = dp->dccps_tx_qlen; break; + case DCCP_SOCKOPT_QPOLICY_AVAILABLE: + val = DCCPQ_POLICY_MAX - 1; + break; case 128 ... 191: return ccid_hc_rx_getsockopt(dp->dccps_hc_rx_ccid, sk, optname, len, (u32 __user *)optval, optlen);