lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Date:	Mon, 5 Jan 2009 15:42:27 +0100
From:	Gerrit Renker <gerrit@....abdn.ac.uk>
To:	dccp@...r.kernel.org, netdev@...r.kernel.org
Subject: dccp test tree [RFC/RFT] [Patch 3/3] dccp: dccp_probe hook for
	CCID-2

dccp: Add dccp_probe support for CCID-2

This adds dccp_probe support for CCID-2.

Signed-off-by: Gerrit Renker <gerrit@....abdn.ac.uk>
---
 net/dccp/ccids/ccid2.c |   14 ++++++++++++++
 1 file changed, 14 insertions(+)

--- a/net/dccp/ccids/ccid2.c
+++ b/net/dccp/ccids/ccid2.c
@@ -248,6 +248,19 @@ static void ccid2_hc_tx_packet_sent(stru
 #endif
 }
 
+static size_t ccid2_hc_tx_probe(struct sock *sk, char *buf, const size_t maxlen)
+{
+	struct ccid2_hc_tx_sock *hctx = ccid2_hc_tx_sk(sk);
+
+	/* Specific field numbering:
+			5     6    7      8        9      10     11
+			rto   rtt  mdev   rttvar   cwnd   pipe   ssthresh  */
+	return snprintf(buf, maxlen, " %u %u %u %u %u %u %u", hctx->rto,
+			hctx->srtt >> 3, hctx->mdev >> 2, hctx->rttvar >> 2,
+			hctx->cwnd, hctx->pipe, hctx->ssthresh);
+
+}
+
 /**
  * ccid2_rtt_estimator - Sample RTT and compute RTO using RFC2988 algorithm
  * This code is almost identical with TCP's tcp_rtt_estimator(), since
@@ -650,6 +663,7 @@ struct ccid_operations ccid2_ops = {
 	.ccid_hc_tx_exit	  = ccid2_hc_tx_exit,
 	.ccid_hc_tx_send_packet	  = ccid2_hc_tx_send_packet,
 	.ccid_hc_tx_packet_sent	  = ccid2_hc_tx_packet_sent,
+	.ccid_hc_tx_probe	  = ccid2_hc_tx_probe,
 	.ccid_hc_tx_parse_options = ccid2_hc_tx_parse_options,
 	.ccid_hc_tx_packet_recv	  = ccid2_hc_tx_packet_recv,
 	.ccid_hc_rx_obj_size	  = sizeof(struct ccid2_hc_rx_sock),
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ