Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-02-22 10:47:25

0001 /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */
0002 /*
0003  * Copyright (c) 2010-2013 Cisco Systems, Inc.  All rights reserved.
0004  * Copyright (c) 2015      Los Alamos National Security, LLC. All rights
0005  *                         reserved.
0006  * Copyright (c) 2016-2019 Intel, Inc.  All rights reserved.
0007  * Copyright (c) 2021-2022 Nanook Consulting.  All rights reserved.
0008  * $COPYRIGHT$
0009  *
0010  * Additional copyrights may follow
0011  *
0012  * $HEADER$
0013  */
0014 
0015 #ifndef PMIX_MCA_PIF_PIF_H
0016 #define PMIX_MCA_PIF_PIF_H
0017 
0018 #include "src/include/pmix_config.h"
0019 
0020 #include <string.h>
0021 #ifdef HAVE_UNISTD_H
0022 #    include <unistd.h>
0023 #endif
0024 #include <errno.h>
0025 #ifdef HAVE_SYS_TYPES_H
0026 #    include <sys/types.h>
0027 #endif
0028 #ifdef HAVE_SYS_SOCKET_H
0029 #    include <sys/socket.h>
0030 #endif
0031 #ifdef HAVE_SYS_SOCKIO_H
0032 #    include <sys/sockio.h>
0033 #endif
0034 #ifdef HAVE_SYS_IOCTL_H
0035 #    include <sys/ioctl.h>
0036 #endif
0037 #ifdef HAVE_NETINET_IN_H
0038 #    include <netinet/in.h>
0039 #endif
0040 #ifdef HAVE_ARPA_INET_H
0041 #    include <arpa/inet.h>
0042 #endif
0043 #ifdef HAVE_NET_IF_H
0044 #    include <net/if.h>
0045 #endif
0046 #ifdef HAVE_NETDB_H
0047 #    include <netdb.h>
0048 #endif
0049 #ifdef HAVE_IFADDRS_H
0050 #    include <ifaddrs.h>
0051 #endif
0052 
0053 #include "src/mca/base/pmix_base.h"
0054 #include "src/mca/mca.h"
0055 #include "src/util/pmix_if.h"
0056 
0057 BEGIN_C_DECLS
0058 
0059 /*
0060  * Define INADDR_NONE if we don't have it.  Solaris is the only system
0061  * where I have found that it does not exist, and the man page for
0062  * inet_addr() says that it returns -1 upon failure.  On Linux and
0063  * other systems with INADDR_NONE, it's just a #define to -1 anyway.
0064  * So just #define it to -1 here if it doesn't already exist.
0065  */
0066 
0067 #if !defined(INADDR_NONE)
0068 #    define INADDR_NONE -1
0069 #endif
0070 
0071 #define DEFAULT_NUMBER_INTERFACES 10
0072 #define MAX_PIFCONF_SIZE          10 * 1024 * 1024
0073 
0074 /* "global" list of available interfaces */
0075 extern pmix_list_t pmix_if_list;
0076 
0077 /* global flags */
0078 extern bool pmix_if_do_not_resolve;
0079 extern bool pmix_if_retain_loopback;
0080 
0081 /**
0082  * Structure for if components.
0083  */
0084 typedef pmix_mca_base_component_t pmix_pif_base_component_t;
0085 
0086 /*
0087  * Macro for use in components that are of type pif
0088  */
0089 #define PMIX_PIF_BASE_VERSION_2_0_0 PMIX_MCA_BASE_VERSION_1_0_0("pif", 2, 0, 0)
0090 
0091 END_C_DECLS
0092 
0093 #endif /* PMIX_MCA_PIF_PIF_H */