Skip to content

Commit

Permalink
DCCP_TFRC option enables/disables TFRC code which includes floating p…
Browse files Browse the repository at this point in the history
…oint expression
  • Loading branch information
ono committed Oct 17, 2003
1 parent df5fe40 commit 38e5bb2
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 4 deletions.
2 changes: 1 addition & 1 deletion freebsd5/sys/conf/files
Original file line number Diff line number Diff line change
Expand Up @@ -1419,7 +1419,7 @@ netinet/tcp_usrreq.c optional inet
netinet/udp_usrreq.c optional inet
netinet/dccp_usrreq.c optional inet dccp
netinet/dccp_cc_sw.c optional inet dccp
netinet/dccp_tfrc.c optional inet dccp
netinet/dccp_tfrc.c optional inet dccp_tfrc
netinet/dccp_tcplike.c optional inet dccp
netinet6/ah_aesxcbcmac.c optional ipsec
netinet6/ah_core.c optional ipsec
Expand Down
1 change: 1 addition & 0 deletions freebsd5/sys/conf/options
Original file line number Diff line number Diff line change
Expand Up @@ -398,6 +398,7 @@ SCTP_USE_ADLER32 opt_sctp.h
SCTP_ALTERNATE_ROUTE opt_sctp.h
SLIP_IFF_OPTS opt_slip.h
DCCP opt_dccp.h
DCCP_TFRC opt_dccp.h
TCPDEBUG
TCP_DROP_SYNFIN opt_tcp_input.h
TCP_ECN opt_global.h
Expand Down
10 changes: 9 additions & 1 deletion kame/sys/netinet/dccp_cc_sw.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,11 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* $Id: dccp_cc_sw.c,v 1.1 2003/10/17 07:27:26 ono Exp $
* $Id: dccp_cc_sw.c,v 1.2 2003/10/17 11:34:27 ono Exp $
*/

#include "opt_dccp.h"

#include <sys/param.h>
#include <sys/systm.h>
#include <sys/domain.h>
Expand All @@ -40,7 +42,9 @@
#include <sys/signalvar.h>
#include <sys/socket.h>
#include <sys/socketvar.h>
#if defined(__FreeBSD__) && __FreeBSD_version >= 500000
#include <sys/sx.h>
#endif
#include <sys/sysctl.h>
#include <sys/syslog.h>
#include <sys/queue.h>
Expand All @@ -60,7 +64,9 @@

#include <netinet/dccp.h>
#include <netinet/dccp_var.h>
#ifdef DCCP_TFRC
#include <netinet/dccp_tfrc.h>
#endif
#include <netinet/dccp_tcplike.h>
#include <netinet/dccp_cc_sw.h>

Expand All @@ -72,7 +78,9 @@ struct dccp_cc_sw cc_sw[] = {
{tcplike_send_init,tcplike_send_free,tcplike_send_packet,tcplike_send_packet_sent,
tcplike_send_packet_recv,
tcplike_recv_init,tcplike_recv_free,tcplike_recv_packet_recv},
#ifdef DCCP_TFRC
{tfrc_send_init,tfrc_send_free,tfrc_send_packet,tfrc_send_packet_sent,
tfrc_send_packet_recv,
tfrc_recv_init,tfrc_recv_free,tfrc_recv_packet_recv}
#endif
};
6 changes: 5 additions & 1 deletion kame/sys/netinet/dccp_cc_sw.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* $Id: dccp_cc_sw.h,v 1.1 2003/10/17 07:27:26 ono Exp $
* $Id: dccp_cc_sw.h,v 1.2 2003/10/17 11:34:27 ono Exp $
*/

#ifndef _NETINET_DCCP_CC_SW_H_
Expand Down Expand Up @@ -94,6 +94,10 @@ struct dccp_cc_sw {
};

/* Max ccid (i.e. cc_sw has DCCP_CC_MAX_CCID+2 elements) */
#ifdef DCCP_TFRC
#define DCCP_CC_MAX_CCID 3
#else
#define DCCP_CC_MAX_CCID 2
#endif

#endif
6 changes: 5 additions & 1 deletion kame/sys/netinet/dccp_usrreq.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* * $Id: dccp_usrreq.c,v 1.1 2003/10/17 07:27:26 ono Exp $
* * $Id: dccp_usrreq.c,v 1.2 2003/10/17 11:34:27 ono Exp $
*/

/*
Expand Down Expand Up @@ -125,7 +125,11 @@
#define ACK_DEBUG(args)
#endif

#ifdef DCCP_TFRC
#define DEFAULT_CCID 2
#else
#define DEFAULT_CCID 1
#endif

/* Congestion control switch table */
extern struct dccp_cc_sw cc_sw[];
Expand Down

0 comments on commit 38e5bb2

Please sign in to comment.