Arnaldo Carvalho de Melo | ae6706f | 2005-08-27 23:03:09 -0300 | [diff] [blame] | 1 | #ifndef _DCCP_LI_HIST_ |
| 2 | #define _DCCP_LI_HIST_ |
| 3 | /* |
| 4 | * net/dccp/ccids/lib/loss_interval.h |
| 5 | * |
Ian McDonald | b2f41ff | 2007-05-28 12:23:29 -0300 | [diff] [blame] | 6 | * Copyright (c) 2005-7 The University of Waikato, Hamilton, New Zealand. |
| 7 | * Copyright (c) 2005-7 Ian McDonald <ian.mcdonald@jandi.co.nz> |
Arnaldo Carvalho de Melo | ae6706f | 2005-08-27 23:03:09 -0300 | [diff] [blame] | 8 | * Copyright (c) 2005 Arnaldo Carvalho de Melo <acme@conectiva.com.br> |
| 9 | * |
| 10 | * This program is free software; you can redistribute it and/or modify it |
| 11 | * under the terms of the GNU General Public License as published by the Free |
| 12 | * Software Foundation; either version 2 of the License, or (at your option) |
| 13 | * any later version. |
| 14 | */ |
| 15 | |
Arnaldo Carvalho de Melo | ae6706f | 2005-08-27 23:03:09 -0300 | [diff] [blame] | 16 | #include <linux/list.h> |
| 17 | #include <linux/slab.h> |
| 18 | #include <linux/time.h> |
| 19 | |
| 20 | #define DCCP_LI_HIST_IVAL_F_LENGTH 8 |
| 21 | |
Arnaldo Carvalho de Melo | ae6706f | 2005-08-27 23:03:09 -0300 | [diff] [blame] | 22 | struct dccp_li_hist_entry { |
| 23 | struct list_head dccplih_node; |
| 24 | u64 dccplih_seqno:48, |
| 25 | dccplih_win_count:4; |
| 26 | u32 dccplih_interval; |
| 27 | }; |
| 28 | |
Arnaldo Carvalho de Melo | cc4d6a3 | 2007-05-28 18:53:08 -0300 | [diff] [blame^] | 29 | extern void dccp_li_hist_purge(struct list_head *list); |
Arnaldo Carvalho de Melo | ae6706f | 2005-08-27 23:03:09 -0300 | [diff] [blame] | 30 | |
| 31 | extern u32 dccp_li_hist_calc_i_mean(struct list_head *list); |
| 32 | |
Arnaldo Carvalho de Melo | cc4d6a3 | 2007-05-28 18:53:08 -0300 | [diff] [blame^] | 33 | extern void dccp_li_update_li(struct sock *sk, |
Arnaldo Carvalho de Melo | cc0a910 | 2007-06-14 17:41:28 -0300 | [diff] [blame] | 34 | struct list_head *li_hist_list, |
| 35 | struct list_head *hist_list, |
| 36 | struct timeval *last_feedback, u16 s, |
| 37 | u32 bytes_recv, u32 previous_x_recv, |
| 38 | u64 seq_loss, u8 win_loss); |
Arnaldo Carvalho de Melo | ae6706f | 2005-08-27 23:03:09 -0300 | [diff] [blame] | 39 | #endif /* _DCCP_LI_HIST_ */ |