Deleted Added
full compact
tcp_syncache.c (105199) tcp_syncache.c (106696)
1/*-
2 * Copyright (c) 2001 Networks Associates Technology, Inc.
3 * All rights reserved.
4 *
5 * This software was developed for the FreeBSD Project by Jonathan Lemon
6 * and NAI Labs, the Security Research Division of Network Associates, Inc.
7 * under DARPA/SPAWAR contract N66001-01-C-8035 ("CBOSS"), as part of the
8 * DARPA CHATS research program.

--- 17 unchanged lines hidden (view full) ---

26 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
27 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
28 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
29 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
30 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
31 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
32 * SUCH DAMAGE.
33 *
1/*-
2 * Copyright (c) 2001 Networks Associates Technology, Inc.
3 * All rights reserved.
4 *
5 * This software was developed for the FreeBSD Project by Jonathan Lemon
6 * and NAI Labs, the Security Research Division of Network Associates, Inc.
7 * under DARPA/SPAWAR contract N66001-01-C-8035 ("CBOSS"), as part of the
8 * DARPA CHATS research program.

--- 17 unchanged lines hidden (view full) ---

26 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
27 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
28 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
29 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
30 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
31 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
32 * SUCH DAMAGE.
33 *
34 * $FreeBSD: head/sys/netinet/tcp_syncache.c 105199 2002-10-16 02:25:05Z sam $
34 * $FreeBSD: head/sys/netinet/tcp_syncache.c 106696 2002-11-09 12:55:07Z alfred $
35 */
36
37#include "opt_inet6.h"
38#include "opt_ipsec.h"
39#include "opt_mac.h"
40
41#include <sys/param.h>
42#include <sys/systm.h>

--- 131 unchanged lines hidden (view full) ---

174 (a)->ie_fport == (b)->ie_fport && \
175 (a)->ie_lport == (b)->ie_lport && \
176 (a)->ie_faddr.s_addr == (b)->ie_faddr.s_addr && \
177 (a)->ie_laddr.s_addr == (b)->ie_laddr.s_addr \
178)
179
180#define ENDPTS6_EQ(a, b) (memcmp(a, b, sizeof(*a)) == 0)
181
35 */
36
37#include "opt_inet6.h"
38#include "opt_ipsec.h"
39#include "opt_mac.h"
40
41#include <sys/param.h>
42#include <sys/systm.h>

--- 131 unchanged lines hidden (view full) ---

174 (a)->ie_fport == (b)->ie_fport && \
175 (a)->ie_lport == (b)->ie_lport && \
176 (a)->ie_faddr.s_addr == (b)->ie_faddr.s_addr && \
177 (a)->ie_laddr.s_addr == (b)->ie_laddr.s_addr \
178)
179
180#define ENDPTS6_EQ(a, b) (memcmp(a, b, sizeof(*a)) == 0)
181
182#define SYNCACHE_TIMEOUT(sc, slot) do { \
183 sc->sc_rxtslot = slot; \
184 sc->sc_rxttime = ticks + TCPTV_RTOBASE * tcp_backoff[slot]; \
185 TAILQ_INSERT_TAIL(&tcp_syncache.timerq[slot], sc, sc_timerq); \
186 if (!callout_active(&tcp_syncache.tt_timerq[slot])) \
187 callout_reset(&tcp_syncache.tt_timerq[slot], \
188 TCPTV_RTOBASE * tcp_backoff[slot], \
189 syncache_timer, (void *)((intptr_t)slot)); \
182#define SYNCACHE_TIMEOUT(sc, slot) do { \
183 sc->sc_rxtslot = (slot); \
184 sc->sc_rxttime = ticks + TCPTV_RTOBASE * tcp_backoff[(slot)]; \
185 TAILQ_INSERT_TAIL(&tcp_syncache.timerq[(slot)], sc, sc_timerq); \
186 if (!callout_active(&tcp_syncache.tt_timerq[(slot)])) \
187 callout_reset(&tcp_syncache.tt_timerq[(slot)], \
188 TCPTV_RTOBASE * tcp_backoff[(slot)], \
189 syncache_timer, (void *)((intptr_t)(slot))); \
190} while (0)
191
192static void
193syncache_free(struct syncache *sc)
194{
195 struct rtentry *rt;
196
197 if (sc->sc_ipopts)

--- 1188 unchanged lines hidden ---
190} while (0)
191
192static void
193syncache_free(struct syncache *sc)
194{
195 struct rtentry *rt;
196
197 if (sc->sc_ipopts)

--- 1188 unchanged lines hidden ---