Deleted Added
full compact
ip_encap.c (83188) ip_encap.c (92723)
1/* $FreeBSD: head/sys/netinet/ip_encap.c 83188 2001-09-07 07:24:28Z julian $ */
1/* $FreeBSD: head/sys/netinet/ip_encap.c 92723 2002-03-19 21:25:46Z alfred $ */
2/* $KAME: ip_encap.c,v 1.41 2001/03/15 08:35:08 itojun Exp $ */
3
4/*
5 * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
6 * All rights reserved.
7 *
8 * Redistribution and use in source and binary forms, with or without
9 * modification, are permitted provided that the following conditions

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

87#include <machine/stdarg.h>
88
89#include <net/net_osdep.h>
90
91#include <sys/kernel.h>
92#include <sys/malloc.h>
93static MALLOC_DEFINE(M_NETADDR, "Export Host", "Export host address structure");
94
2/* $KAME: ip_encap.c,v 1.41 2001/03/15 08:35:08 itojun Exp $ */
3
4/*
5 * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
6 * All rights reserved.
7 *
8 * Redistribution and use in source and binary forms, with or without
9 * modification, are permitted provided that the following conditions

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

87#include <machine/stdarg.h>
88
89#include <net/net_osdep.h>
90
91#include <sys/kernel.h>
92#include <sys/malloc.h>
93static MALLOC_DEFINE(M_NETADDR, "Export Host", "Export host address structure");
94
95static void encap_add __P((struct encaptab *));
96static int mask_match __P((const struct encaptab *, const struct sockaddr *,
97 const struct sockaddr *));
98static void encap_fillarg __P((struct mbuf *, const struct encaptab *));
95static void encap_add(struct encaptab *);
96static int mask_match(const struct encaptab *, const struct sockaddr *,
97 const struct sockaddr *);
98static void encap_fillarg(struct mbuf *, const struct encaptab *);
99
100#ifndef LIST_HEAD_INITIALIZER
101/* rely upon BSS initialization */
102LIST_HEAD(, encaptab) encaptab;
103#else
104LIST_HEAD(, encaptab) encaptab = LIST_HEAD_INITIALIZER(&encaptab);
105#endif
106

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

364 splx(s);
365 return NULL;
366}
367
368const struct encaptab *
369encap_attach_func(af, proto, func, psw, arg)
370 int af;
371 int proto;
99
100#ifndef LIST_HEAD_INITIALIZER
101/* rely upon BSS initialization */
102LIST_HEAD(, encaptab) encaptab;
103#else
104LIST_HEAD(, encaptab) encaptab = LIST_HEAD_INITIALIZER(&encaptab);
105#endif
106

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

364 splx(s);
365 return NULL;
366}
367
368const struct encaptab *
369encap_attach_func(af, proto, func, psw, arg)
370 int af;
371 int proto;
372 int (*func) __P((const struct mbuf *, int, int, void *));
372 int (*func)(const struct mbuf *, int, int, void *);
373 const struct protosw *psw;
374 void *arg;
375{
376 struct encaptab *ep;
377 int error;
378 int s;
379
380 s = splnet();

--- 141 unchanged lines hidden ---
373 const struct protosw *psw;
374 void *arg;
375{
376 struct encaptab *ep;
377 int error;
378 int s;
379
380 s = splnet();

--- 141 unchanged lines hidden ---