XXX ip free
| 1957 | |
| 1958 | // XXX ip free |
| 1959 | int |
| 1960 | GetDeltaSeqOut(u_long seq, struct alias_link *lnk) |
| 1961 | { |
| 1962 | /* |
| 1963 | Find out how much the sequence number has been altered for an outgoing |
| 1964 | TCP packet. To do this, a circular list of ACK numbers where the TCP |
| 1965 | packet size was altered is searched. |
| 1966 | */ |
| 1967 | |
| 1968 | int i; |
| 1969 | int delta, seq_diff_min; |
| 1970 | |
| 1971 | delta = 0; |
| 1972 | seq_diff_min = -1; |
| 1973 | for (i = 0; i < N_LINK_TCP_DATA; i++) { |
| 1974 | struct ack_data_record x; |
| 1975 | |
| 1976 | x = lnk->data.tcp->ack[i]; |
| 1977 | if (x.active == 1) { |
| 1978 | int seq_diff; |
| 1979 | |
| 1980 | seq_diff = SeqDiff(x.ack_old, seq); |
| 1981 | if (seq_diff >= 0) { |
| 1982 | if (seq_diff_min >= 0) { |
| 1983 | if (seq_diff < seq_diff_min) { |
| 1984 | delta = x.delta; |
| 1985 | seq_diff_min = seq_diff; |
| 1986 | } |
| 1987 | } else { |
| 1988 | delta = x.delta; |
| 1989 | seq_diff_min = seq_diff; |
| 1990 | } |
| 1991 | } |
| 1992 | } |
| 1993 | } |
| 1994 | return (delta); |
| 1995 | } |
| 1996 | |
| 1997 | // XXX ip free |
| 1998 | void |
no test coverage detected