ip_fil_solaris.c (e6c6c1fa) ip_fil_solaris.c (c793af95)
1/*
2 * Copyright (C) 1993-2001, 2003 by Darren Reed.
3 *
4 * See the IPFILTER.LICENCE file for details on licencing.
5 *
6 * Copyright 2006 Sun Microsystems, Inc. All rights reserved.
7 * Use is subject to license terms.
8 */
9
10#pragma ident "%Z%%M% %I% %E% SMI"
11
12#if !defined(lint)
1/*
2 * Copyright (C) 1993-2001, 2003 by Darren Reed.
3 *
4 * See the IPFILTER.LICENCE file for details on licencing.
5 *
6 * Copyright 2006 Sun Microsystems, Inc. All rights reserved.
7 * Use is subject to license terms.
8 */
9
10#pragma ident "%Z%%M% %I% %E% SMI"
11
12#if !defined(lint)
13static const char sccsid[] = "%W% %G% (C) 1993-2000 Darren Reed";
13static const char sccsid[] = "@(#)ip_fil_solaris.c 1.7 07/22/06 (C) 1993-2000 Darren Reed";
14static const char rcsid[] = "@(#)$Id: ip_fil_solaris.c,v 2.62.2.19 2005/07/13 21:40:46 darrenr Exp $";
15#endif
16
17#include <sys/types.h>
18#include <sys/errno.h>
19#include <sys/param.h>
20#include <sys/cpuvar.h>
21#include <sys/open.h>

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

1384# endif
1385#else
1386 dir = ire_lookup(dst.s_addr);
1387#endif
1388#if SOLARIS2 < 8
1389 if (dir != NULL)
1390 if (dir->ire_ll_hdr_mp == NULL || dir->ire_ll_hdr_length == 0)
1391 dir = NULL;
14static const char rcsid[] = "@(#)$Id: ip_fil_solaris.c,v 2.62.2.19 2005/07/13 21:40:46 darrenr Exp $";
15#endif
16
17#include <sys/types.h>
18#include <sys/errno.h>
19#include <sys/param.h>
20#include <sys/cpuvar.h>
21#include <sys/open.h>

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

1384# endif
1385#else
1386 dir = ire_lookup(dst.s_addr);
1387#endif
1388#if SOLARIS2 < 8
1389 if (dir != NULL)
1390 if (dir->ire_ll_hdr_mp == NULL || dir->ire_ll_hdr_length == 0)
1391 dir = NULL;
1392
1393#elif (SOLARIS2 >= 8) && (SOLARIS2 <= 10)
1394 if (dir != NULL) {
1395 if (dir->ire_fp_mp == NULL || dir->ire_dlureq_mp == NULL) {
1396 ire_refrele(dir);
1397 dir = NULL;
1398 }
1399 }
1392#else
1400#else
1401
1393 if (dir != NULL)
1402 if (dir != NULL)
1394 if (dir->ire_fp_mp == NULL || dir->ire_dlureq_mp == NULL) {
1403 if (dir->ire_nce && dir->ire_nce->nce_state != ND_REACHABLE) {
1395 ire_refrele(dir);
1396 dir = NULL;
1397 }
1398#endif
1399#else /* IRE_ILL_CN */
1400 if (fdp && fdp->fd_ifname[0] != 0)
1401 ifname = fdp->fd_ifname;
1402

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

1411
1412#ifdef IRE_ILL_CN
1413 if (mp != NULL) {
1414#else
1415 if (dir != NULL) {
1416#if SOLARIS2 < 8
1417 mp = dir->ire_ll_hdr_mp;
1418 hlen = dir->ire_ll_hdr_length;
1404 ire_refrele(dir);
1405 dir = NULL;
1406 }
1407#endif
1408#else /* IRE_ILL_CN */
1409 if (fdp && fdp->fd_ifname[0] != 0)
1410 ifname = fdp->fd_ifname;
1411

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

1420
1421#ifdef IRE_ILL_CN
1422 if (mp != NULL) {
1423#else
1424 if (dir != NULL) {
1425#if SOLARIS2 < 8
1426 mp = dir->ire_ll_hdr_mp;
1427 hlen = dir->ire_ll_hdr_length;
1419#else
1428#elif (SOLARIS2 >= 8) && (SOLARIS2 <= 10)
1420 mp = dir->ire_fp_mp;
1421 hlen = mp ? mp->b_wptr - mp->b_rptr : 0;
1422 if (mp == NULL)
1423 mp = dir->ire_dlureq_mp;
1429 mp = dir->ire_fp_mp;
1430 hlen = mp ? mp->b_wptr - mp->b_rptr : 0;
1431 if (mp == NULL)
1432 mp = dir->ire_dlureq_mp;
1433#else
1434 mp = dir->ire_nce->nce_fp_mp;
1435 hlen = mp ? mp->b_wptr - mp->b_rptr : 0;
1436 if (mp == NULL)
1437 mp = dir->ire_nce->nce_res_mp;
1424#endif
1425#endif
1426 if (fin->fin_out == 0) {
1427 void *saveqif;
1428 u_32_t pass;
1429
1430 saveqif = fin->fin_ifp;
1431 fin->fin_ifp = qif;

--- 188 unchanged lines hidden ---
1438#endif
1439#endif
1440 if (fin->fin_out == 0) {
1441 void *saveqif;
1442 u_32_t pass;
1443
1444 saveqif = fin->fin_ifp;
1445 fin->fin_ifp = qif;

--- 188 unchanged lines hidden ---