1 /* $NetBSD: rpz.c,v 1.7 2014/12/10 04:37:54 christos Exp $ */ 2 3 /* 4 * Copyright (C) 2011-2013 Internet Systems Consortium, Inc. ("ISC") 5 * 6 * Permission to use, copy, modify, and/or distribute this software for any 7 * purpose with or without fee is hereby granted, provided that the above 8 * copyright notice and this permission notice appear in all copies. 9 * 10 * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH 11 * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY 12 * AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT, 13 * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM 14 * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE 15 * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR 16 * PERFORMANCE OF THIS SOFTWARE. 17 */ 18 19 /* Id */ 20 21 22 #include <config.h> 23 24 #include <stdlib.h> 25 #include <stdio.h> 26 #include <string.h> 27 28 29 #define USAGE "usage: nsip | nsdname\n" 30 31 int 32 main(int argc, char **argv) 33 { 34 if (argc != 2) { 35 fputs(USAGE, stderr); 36 return (1); 37 } 38 39 if (!strcasecmp(argv[1], "nsip")) { 40 #ifdef ENABLE_RPZ_NSIP 41 return (0); 42 #else 43 return (1); 44 #endif 45 } 46 47 if (!strcasecmp(argv[1], "nsdname")) { 48 #ifdef ENABLE_RPZ_NSDNAME 49 return (0); 50 #else 51 return (1); 52 #endif 53 } 54 55 fputs(USAGE, stderr); 56 return (1); 57 } 58