1 /* 2 * Copyright (c) 1998,1999,2000 3 * Traakan, Inc., Los Altos, CA 4 * All rights reserved. 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions 8 * are met: 9 * 1. Redistributions of source code must retain the above copyright 10 * notice unmodified, this list of conditions, and the following 11 * disclaimer. 12 * 2. Redistributions in binary form must reproduce the above copyright 13 * notice, this list of conditions and the following disclaimer in the 14 * documentation and/or other materials provided with the distribution. 15 * 16 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 17 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 18 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 19 * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 20 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 21 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 22 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 23 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 24 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 25 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 26 * SUCH DAMAGE. 27 */ 28 29 /* 30 * Project: NDMJOB 31 * Ident: $Id: $ 32 * 33 * Description: 34 * This establishes the environment and options 35 * for the FreeBSD platform. This, combined with 36 * the O/S generic ndmos.h, are the foundation 37 * for NDMJOBLIB. 38 * 39 * This file is #include'd by ndmos.h when 40 * selected by #ifdef's of NDMOS_ID. 41 * 42 * Refer to ndmos.h for explanations of the 43 * macros thar are or can be #define'd here. 44 */ 45 46 #define NDMOS_ID_FREEBSD NDMOS_IDENT('F', 'B', 's', 'd') 47 48 #ifndef NDMOS_ID 49 #ifdef __FreeBSD__ 50 #define NDMOS_ID NDMOS_ID_FREEBSD 51 #endif /* __FreeBSD__ */ 52 #endif /* !NDMOS_ID */ 53 54 55 #if NDMOS_ID == NDMOS_ID_FREEBSD /* probably redundant */ 56 57 #include <stdio.h> 58 #include <stdlib.h> 59 #include <stdarg.h> 60 #include <unistd.h> 61 #include <sys/types.h> 62 #include <sys/stat.h> 63 #include <sys/socket.h> 64 #include <sys/fcntl.h> 65 #include <signal.h> 66 #include <netinet/in.h> 67 #include <arpa/inet.h> 68 #include <rpc/rpc.h> 69 #include <assert.h> 70 #include <errno.h> 71 #include <string.h> 72 #include <netdb.h> 73 #include <ctype.h> 74 75 #define NDMOS_OPTION_HAVE_SIN_LEN 76 77 #define NDMOS_API_STRTOLL(P, PP, BASE) strtoq(P, PP, BASE) 78 79 /* 80 * #ifndef'ed so they can be set from the Makefile command line 81 */ 82 #ifndef NDMOS_CONST_NDMJOBLIB_REVISION 83 #define NDMOS_CONST_NDMJOBLIB_REVISION "0" 84 #endif /* !NDMOS_CONST_NDMJOBLIB_REVISION */ 85 86 #ifndef NDMOS_CONST_VENDOR_NAME 87 #define NDMOS_CONST_VENDOR_NAME "PublicDomain" 88 #endif /* !NDMOS_CONST_VENDOR_NAME */ 89 90 #ifndef NDMOS_CONST_PRODUCT_NAME 91 #define NDMOS_CONST_PRODUCT_NAME "NDMJOB" 92 #endif /* !NDMOS_CONST_PRODUCT_NAME */ 93 94 #ifndef NDMOS_CONST_PRODUCT_REVISION 95 #define NDMOS_CONST_PRODUCT_REVISION "0.0" 96 #endif /* !NDMOS_CONST_PRODUCT_REVISION */ 97 98 #define NDMOS_CONST_NDMOS_REVISION "FreeBSD-04xx" 99 100 #define NDMOS_MACRO_ROBOT_AGENT_ADDITIONS struct cam_device* camdev; 101 102 #endif /* NDMOS_ID == NDMOS_ID_FREEBSD */ 103