178afed13SJohn Baldwin /*- 2*4d846d26SWarner Losh * SPDX-License-Identifier: BSD-2-Clause 378afed13SJohn Baldwin * 478afed13SJohn Baldwin * Copyright (c) 2012 Chelsio Communications, Inc. 578afed13SJohn Baldwin * All rights reserved. 678afed13SJohn Baldwin * Written by: Navdeep Parhar <np@FreeBSD.org> 778afed13SJohn Baldwin * 878afed13SJohn Baldwin * Redistribution and use in source and binary forms, with or without 978afed13SJohn Baldwin * modification, are permitted provided that the following conditions 1078afed13SJohn Baldwin * are met: 1178afed13SJohn Baldwin * 1. Redistributions of source code must retain the above copyright 1278afed13SJohn Baldwin * notice, this list of conditions and the following disclaimer. 1378afed13SJohn Baldwin * 2. Redistributions in binary form must reproduce the above copyright 1478afed13SJohn Baldwin * notice, this list of conditions and the following disclaimer in the 1578afed13SJohn Baldwin * documentation and/or other materials provided with the distribution. 1678afed13SJohn Baldwin * 1778afed13SJohn Baldwin * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 1878afed13SJohn Baldwin * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 1978afed13SJohn Baldwin * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 2078afed13SJohn Baldwin * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 2178afed13SJohn Baldwin * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 2278afed13SJohn Baldwin * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 2378afed13SJohn Baldwin * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 2478afed13SJohn Baldwin * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 2578afed13SJohn Baldwin * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 2678afed13SJohn Baldwin * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 2778afed13SJohn Baldwin * SUCH DAMAGE. 2878afed13SJohn Baldwin */ 2978afed13SJohn Baldwin 3078afed13SJohn Baldwin #ifndef __T4_CLIP_H 3178afed13SJohn Baldwin #define __T4_CLIP_H 3278afed13SJohn Baldwin 3324b98f28SNavdeep Parhar #define CLIP_HASH_SIZE 32 3424b98f28SNavdeep Parhar struct clip_entry; 3524b98f28SNavdeep Parhar struct in6_addr; 3678afed13SJohn Baldwin 3778afed13SJohn Baldwin void t4_clip_modload(void); 3878afed13SJohn Baldwin void t4_clip_modunload(void); 3978afed13SJohn Baldwin void t4_init_clip_table(struct adapter *); 4078afed13SJohn Baldwin void t4_destroy_clip_table(struct adapter *); 4124b98f28SNavdeep Parhar struct clip_entry *t4_get_clip_entry(struct adapter *, struct in6_addr *, bool); 4224b98f28SNavdeep Parhar void t4_hold_clip_entry(struct adapter *, struct clip_entry *); 4324b98f28SNavdeep Parhar void t4_release_clip_entry(struct adapter *, struct clip_entry *); 4424b98f28SNavdeep Parhar int t4_release_clip_addr(struct adapter *, struct in6_addr *); 4578afed13SJohn Baldwin 4678afed13SJohn Baldwin int sysctl_clip(SYSCTL_HANDLER_ARGS); 4778afed13SJohn Baldwin 4878afed13SJohn Baldwin #endif /* __T4_CLIP_H */ 49