/*************************************************************************\ * Copyright (C) Michael Kerrisk, 2018. * * * * This program is free software. You may use, modify, and redistribute it * * under the terms of the GNU Lesser General Public License as published * * by the Free Software Foundation, either version 3 or (at your option) * * any later version. This program is distributed without any warranty. * * See the files COPYING.lgpl-v3 and COPYING.gpl-v3 for details. * \*************************************************************************/ /* Listing 3-1 */ /* af_unix_hdr.h Standard header file used by nearly all of our example programs. */ #ifndef AF_UNIX_HDR_H #define AF_UNIX_HDR_H /* Prevent accidental double inclusion */ #include /* Type definitions used by many programs */ #include /* Standard I/O functions */ #include /* Prototypes of commonly used library functions, plus EXIT_SUCCESS and EXIT_FAILURE constants */ #include /* Prototypes for many system calls */ #include /* Declares errno and defines error constants */ #include /* Commonly used string-handling functions */ #include "get_num.h" /* Declares our functions for handling numeric arguments (getInt(), getLong()) */ #include "error_functions.h" /* Declares our error-handling functions */ #include #include #include "unix_sockets.h" /* Declares our socket functions */ #include "scm_functions.h" /* #include "unp.h" /\* Stevens, Unix Network Programming *\/ */ #undef AF_UNIX #define AF_UNIX 31 #ifdef TRUE #undef TRUE #endif #ifdef FALSE #undef FALSE #endif typedef enum { FALSE, TRUE } Boolean; #define min(m,n) ((m) < (n) ? (m) : (n)) #define max(m,n) ((m) > (n) ? (m) : (n)) #endif