1b2af61ecSKurt Lidl /*- 2b2af61ecSKurt Lidl * Copyright (c) 2015 The NetBSD Foundation, Inc. 3*dab59af3SLi-Wen Hsu * Copyright (c) 2016 The FreeBSD Foundation 4b2af61ecSKurt Lidl * All rights reserved. 5b2af61ecSKurt Lidl * 6b2af61ecSKurt Lidl * Portions of this software were developed by Kurt Lidl 7b2af61ecSKurt Lidl * under sponsorship from the FreeBSD Foundation. 8b2af61ecSKurt Lidl * 9b2af61ecSKurt Lidl * This code is derived from software contributed to The NetBSD Foundation 10b2af61ecSKurt Lidl * by Christos Zoulas. 11b2af61ecSKurt Lidl * 12b2af61ecSKurt Lidl * Redistribution and use in source and binary forms, with or without 13b2af61ecSKurt Lidl * modification, are permitted provided that the following conditions 14b2af61ecSKurt Lidl * are met: 15b2af61ecSKurt Lidl * 1. Redistributions of source code must retain the above copyright 16b2af61ecSKurt Lidl * notice, this list of conditions and the following disclaimer. 17b2af61ecSKurt Lidl * 2. Redistributions in binary form must reproduce the above copyright 18b2af61ecSKurt Lidl * notice, this list of conditions and the following disclaimer in the 19b2af61ecSKurt Lidl * documentation and/or other materials provided with the distribution. 20b2af61ecSKurt Lidl * 21b2af61ecSKurt Lidl * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS 22b2af61ecSKurt Lidl * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 23b2af61ecSKurt Lidl * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 24b2af61ecSKurt Lidl * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS 25b2af61ecSKurt Lidl * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 26b2af61ecSKurt Lidl * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 27b2af61ecSKurt Lidl * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 28b2af61ecSKurt Lidl * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 29b2af61ecSKurt Lidl * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 30b2af61ecSKurt Lidl * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 31b2af61ecSKurt Lidl * POSSIBILITY OF SUCH DAMAGE. 32b2af61ecSKurt Lidl */ 33b2af61ecSKurt Lidl 34b2af61ecSKurt Lidl #ifndef BLACKLIST_CLIENT_H 35b2af61ecSKurt Lidl #define BLACKLIST_CLIENT_H 36b2af61ecSKurt Lidl 37342b8b88SKurt Lidl #ifndef BLACKLIST_API_ENUM 38b2af61ecSKurt Lidl enum { 39b2af61ecSKurt Lidl BLACKLIST_AUTH_OK = 0, 40342b8b88SKurt Lidl BLACKLIST_AUTH_FAIL, 41342b8b88SKurt Lidl BLACKLIST_ABUSIVE_BEHAVIOR, 42342b8b88SKurt Lidl BLACKLIST_BAD_USER 43b2af61ecSKurt Lidl }; 44342b8b88SKurt Lidl #endif 45b2af61ecSKurt Lidl 46b2af61ecSKurt Lidl #ifdef USE_BLACKLIST 47b2af61ecSKurt Lidl void blacklist_init(void); 480f9bafdfSEd Maste void blacklist_notify(struct ssh *, int, const char *); 49b2af61ecSKurt Lidl 50b2af61ecSKurt Lidl #define BLACKLIST_INIT() blacklist_init() 510f9bafdfSEd Maste #define BLACKLIST_NOTIFY(ssh,x,msg) blacklist_notify(ssh,x,msg) 52b2af61ecSKurt Lidl 53b2af61ecSKurt Lidl #else 54b2af61ecSKurt Lidl 55b2af61ecSKurt Lidl #define BLACKLIST_INIT() 560f9bafdfSEd Maste #define BLACKLIST_NOTIFY(ssh,x,msg) 57b2af61ecSKurt Lidl 58b2af61ecSKurt Lidl #endif 59b2af61ecSKurt Lidl 60b2af61ecSKurt Lidl 61b2af61ecSKurt Lidl #endif /* BLACKLIST_CLIENT_H */ 62