The Design and Implementation of the FreeBSD Operating System, Second Edition
Now available: The Design and Implementation of the FreeBSD Operating System (Second Edition)


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]

FreeBSD/Linux Kernel Cross Reference
sys/netinet/ip_pool.h

Version: -  FREEBSD  -  FREEBSD-13-STABLE  -  FREEBSD-13-0  -  FREEBSD-12-STABLE  -  FREEBSD-12-0  -  FREEBSD-11-STABLE  -  FREEBSD-11-0  -  FREEBSD-10-STABLE  -  FREEBSD-10-0  -  FREEBSD-9-STABLE  -  FREEBSD-9-0  -  FREEBSD-8-STABLE  -  FREEBSD-8-0  -  FREEBSD-7-STABLE  -  FREEBSD-7-0  -  FREEBSD-6-STABLE  -  FREEBSD-6-0  -  FREEBSD-5-STABLE  -  FREEBSD-5-0  -  FREEBSD-4-STABLE  -  FREEBSD-3-STABLE  -  FREEBSD22  -  l41  -  OPENBSD  -  linux-2.6  -  MK84  -  PLAN9  -  xnu-8792 
SearchContext: -  none  -  3  -  10 

    1 /*      $NetBSD: ip_pool.h,v 1.1.1.1 2004/03/28 08:56:47 martti Exp $   */
    2 
    3 /*
    4  * Copyright (C) 1993-2001, 2003 by Darren Reed.
    5  *
    6  * See the IPFILTER.LICENCE file for details on licencing.
    7  *
    8  * Id: ip_pool.h,v 2.26.2.2 2004/03/23 12:44:34 darrenr Exp
    9  */
   10 
   11 #ifndef __IP_POOL_H__
   12 #define __IP_POOL_H__
   13 
   14 #if defined(_KERNEL) && !defined(__osf__) && !defined(__hpux) && \
   15     !defined(linux) && !defined(sun)
   16 # include <net/radix.h>
   17 extern void rn_freehead __P((struct radix_node_head *));
   18 # define FreeS(p, z)            KFREES(p, z)
   19 extern int max_keylen;
   20 #else
   21 # if defined(__osf__) || defined(__hpux)
   22 #  include "radix_ipf_local.h"
   23 #  define radix_mask ipf_radix_mask
   24 #  define radix_node ipf_radix_node
   25 #  define radix_node_head ipf_radix_node_head
   26 # else
   27 #  include "radix_ipf.h"
   28 # endif
   29 #endif
   30 #include "netinet/ip_lookup.h"
   31 
   32 #define IP_POOL_NOMATCH         0
   33 #define IP_POOL_POSITIVE        1
   34 
   35 typedef struct ip_pool_node {
   36         struct  radix_node      ipn_nodes[2];
   37         addrfamily_t            ipn_addr;
   38         addrfamily_t            ipn_mask;
   39         int                     ipn_info;
   40         char                    ipn_name[FR_GROUPLEN];
   41         u_long                  ipn_hits;
   42         struct ip_pool_node     *ipn_next, **ipn_pnext;
   43 } ip_pool_node_t;
   44 
   45 
   46 typedef struct ip_pool_s {
   47         struct ip_pool_s        *ipo_next;
   48         struct ip_pool_s        **ipo_pnext;
   49         struct radix_node_head  *ipo_head;
   50         ip_pool_node_t  *ipo_list;
   51         u_long          ipo_hits;
   52         int             ipo_unit;
   53         int             ipo_flags;
   54         int             ipo_ref;
   55         char            ipo_name[FR_GROUPLEN];
   56 } ip_pool_t;
   57 
   58 #define IPOOL_ANON      0x80000000
   59 
   60 
   61 typedef struct  ip_pool_stat    {
   62         u_long          ipls_pools;
   63         u_long          ipls_tables;
   64         u_long          ipls_nodes;
   65         ip_pool_t       *ipls_list[IPL_LOGSIZE];
   66 } ip_pool_stat_t;
   67 
   68 
   69 extern  ip_pool_stat_t  ipoolstat;
   70 extern  ip_pool_t       *ip_pool_list[IPL_LOGSIZE];
   71 
   72 extern  int     ip_pool_search __P((void *, int, void *));
   73 extern  int     ip_pool_init __P((void));
   74 extern  void    ip_pool_fini __P((void));
   75 extern  int     ip_pool_create __P((iplookupop_t *));
   76 extern  int     ip_pool_insert __P((ip_pool_t *, i6addr_t *, i6addr_t *, int));
   77 extern  int     ip_pool_remove __P((ip_pool_t *, ip_pool_node_t *));
   78 extern  int     ip_pool_destroy __P((iplookupop_t *));
   79 extern  void    ip_pool_free __P((ip_pool_t *));
   80 extern  void    ip_pool_deref __P((ip_pool_t *));
   81 extern  void    *ip_pool_find __P((int, char *));
   82 extern  ip_pool_node_t *ip_pool_findeq __P((ip_pool_t *,
   83                                           addrfamily_t *, addrfamily_t *));
   84 extern  int     ip_pool_flush __P((iplookupflush_t *));
   85 extern  int     ip_pool_statistics __P((iplookupop_t *));
   86 
   87 #endif /* __IP_POOL_H__ */

Cache object: 0789f8ddea0af3f406d9c86ae2170c71


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]


This page is part of the FreeBSD/Linux Linux Kernel Cross-Reference, and was automatically generated using a modified version of the LXR engine.