1262743Sglebius/*- 2262743Sglebius * Copyright (c) 2014 Gleb Smirnoff <glebius@FreeBSD.org> 3262743Sglebius * Copyright (c) 2008-2010, BitGravity Inc. 4262743Sglebius * All rights reserved. 5262743Sglebius * 6262743Sglebius * Redistribution and use in source and binary forms, with or without 7262743Sglebius * modification, are permitted provided that the following conditions are met: 8262743Sglebius * 9262743Sglebius * 1. Redistributions of source code must retain the above copyright notice, 10262743Sglebius * this list of conditions and the following disclaimer. 11262743Sglebius * 12262743Sglebius * 2. Neither the name of the BitGravity Corporation nor the names of its 13262743Sglebius * contributors may be used to endorse or promote products derived from 14262743Sglebius * this software without specific prior written permission. 15262743Sglebius * 16262743Sglebius * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 17262743Sglebius * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 18262743Sglebius * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 19262743Sglebius * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 20262743Sglebius * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 21262743Sglebius * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 22262743Sglebius * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 23262743Sglebius * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 24262743Sglebius * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 25262743Sglebius * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 26262743Sglebius * POSSIBILITY OF SUCH DAMAGE. 27262743Sglebius * 28262743Sglebius * $FreeBSD$ 29262743Sglebius * 30262743Sglebius */ 31191255Skmacy 32191255Skmacy#ifndef _NET_FLOWTABLE_H_ 33191255Skmacy#define _NET_FLOWTABLE_H_ 34191255Skmacy 35262743Sglebiusstruct flowtable_stat { 36262743Sglebius uint64_t ft_collisions; 37262743Sglebius uint64_t ft_misses; 38262743Sglebius uint64_t ft_free_checks; 39262743Sglebius uint64_t ft_frees; 40262743Sglebius uint64_t ft_hits; 41262743Sglebius uint64_t ft_lookups; 42262743Sglebius uint64_t ft_fail_lle_invalid; 43262743Sglebius uint64_t ft_inserts; 44262743Sglebius}; 45262743Sglebius 46191255Skmacy#ifdef _KERNEL 47191255Skmacy 48191255Skmacy/* 49262743Sglebius * Given a flow table, look up the L3 and L2 information 50262743Sglebius * and return it in the route. 51191255Skmacy */ 52262743Sglebiusint flowtable_lookup(sa_family_t, struct mbuf *, struct route *); 53262743Sglebiusvoid flowtable_route_flush(sa_family_t, struct rtentry *); 54191255Skmacy 55194077Sbz#endif /* _KERNEL */ 56262743Sglebius#endif /* !_NET_FLOWTABLE_H_ */ 57