Deleted Added
full compact
ip.c (134833) ip.c (134875)
1/*-
2 * Copyright (c) 1996 - 2001 Brian Somers <brian@Awfulhak.org>
3 * based on work by Toshiharu OHNO <tony-o@iij.ad.jp>
4 * Internet Initiative Japan, Inc (IIJ)
5 * All rights reserved.
6 *
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions

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

20 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
21 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
22 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
23 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
24 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
25 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
26 * SUCH DAMAGE.
27 *
1/*-
2 * Copyright (c) 1996 - 2001 Brian Somers <brian@Awfulhak.org>
3 * based on work by Toshiharu OHNO <tony-o@iij.ad.jp>
4 * Internet Initiative Japan, Inc (IIJ)
5 * All rights reserved.
6 *
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions

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

20 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
21 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
22 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
23 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
24 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
25 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
26 * SUCH DAMAGE.
27 *
28 * $FreeBSD: head/usr.sbin/ppp/ip.c 134833 2004-09-06 00:07:58Z marcel $
28 * $FreeBSD: head/usr.sbin/ppp/ip.c 134875 2004-09-06 23:54:54Z brian $
29 */
30
31#include <sys/param.h>
32#include <sys/socket.h>
33#include <netinet/in.h>
34#include <netinet/in_systm.h>
35#include <netinet/ip.h>
36#ifndef NOINET6

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

201 *
202 * If filtering is enabled, the initial fragment of a datagram must
203 * contain the complete protocol header, and subsequent fragments
204 * must not attempt to over-write it.
205 *
206 * One (and only one) of pip or pip6 must be set.
207 */
208int
29 */
30
31#include <sys/param.h>
32#include <sys/socket.h>
33#include <netinet/in.h>
34#include <netinet/in_systm.h>
35#include <netinet/ip.h>
36#ifndef NOINET6

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

201 *
202 * If filtering is enabled, the initial fragment of a datagram must
203 * contain the complete protocol header, and subsequent fragments
204 * must not attempt to over-write it.
205 *
206 * One (and only one) of pip or pip6 must be set.
207 */
208int
209FilterCheck(const unsigned char *packet, u_int32_t family,
209FilterCheck(const unsigned char *packet,
210#ifdef NOINET6
211 u_int32_t family __unused,
212#else
213 u_int32_t family,
214#endif
210 const struct filter *filter, unsigned *psecs)
211{
212 int gotinfo; /* true if IP payload decoded */
213 int cproto; /* IPPROTO_* protocol number if (gotinfo) */
214 int estab, syn, finrst; /* TCP state flags if (gotinfo) */
215 u_short sport, dport; /* src, dest port from packet if (gotinfo) */
216 int n; /* filter rule to process */
217 int len; /* bytes used in dbuff */

--- 771 unchanged lines hidden ---
215 const struct filter *filter, unsigned *psecs)
216{
217 int gotinfo; /* true if IP payload decoded */
218 int cproto; /* IPPROTO_* protocol number if (gotinfo) */
219 int estab, syn, finrst; /* TCP state flags if (gotinfo) */
220 u_short sport, dport; /* src, dest port from packet if (gotinfo) */
221 int n; /* filter rule to process */
222 int len; /* bytes used in dbuff */

--- 771 unchanged lines hidden ---