root/opal/mca/btl/tcp/btl_tcp_addr.h

/* [<][>][^][v][top][bottom][index][help] */

INCLUDED FROM


   1 /*
   2  * Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
   3  *                         University Research and Technology
   4  *                         Corporation.  All rights reserved.
   5  * Copyright (c) 2004-2007 The University of Tennessee and The University
   6  *                         of Tennessee Research Foundation.  All rights
   7  *                         reserved.
   8  * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
   9  *                         University of Stuttgart.  All rights reserved.
  10  * Copyright (c) 2004-2005 The Regents of the University of California.
  11  *                         All rights reserved.
  12  * $COPYRIGHT$
  13  *
  14  * Additional copyrights may follow
  15  *
  16  * $HEADER$
  17  */
  18 /**
  19  * @file
  20  */
  21 #ifndef MCA_BTL_TCP_ADDR_H
  22 #define MCA_BTL_TCP_ADDR_H
  23 
  24 #ifdef HAVE_SYS_TYPES_H
  25 #include <sys/types.h>
  26 #endif
  27 #ifdef HAVE_SYS_SOCKET_H
  28 #include <sys/socket.h>
  29 #endif
  30 #ifdef HAVE_NETINET_IN_H
  31 #include <netinet/in.h>
  32 #endif
  33 
  34 
  35 /**
  36  * Modex address structure.
  37  *
  38  * One of these structures will be sent for every btl module in use by
  39  * the local BTL TCP component.
  40  */
  41 struct mca_btl_tcp_modex_addr_t {
  42     uint8_t     addr[16];       /* endpoint address.  for addr_family
  43                                    of MCA_BTL_TCP_AF_INET, only the
  44                                    first 4 bytes have meaning. */
  45     uint32_t    addr_ifkindex;  /* endpoint kernel index */
  46     uint16_t    addr_port;      /* endpoint listen port */
  47     uint8_t     addr_family;    /* endpoint address family.  Note that
  48                                    this is
  49                                    MCA_BTL_TCP_AF_{INET,INET6}, not
  50                                    the traditional
  51                                    AF_INET/AF_INET6. */
  52     uint8_t     padding[1];     /* padd out to an 8-byte word */
  53 };
  54 typedef struct mca_btl_tcp_modex_addr_t mca_btl_tcp_modex_addr_t;
  55 
  56 
  57 /**
  58  * Remote peer address structure
  59  *
  60  * One of these structures will be allocated for every remote endpoint
  61  * associated with a remote proc.  The data is pulled from the
  62  * mca_btl_tcp_modex_addr_t structure, except for the addr_inuse
  63  * field, which is local.
  64  */
  65 struct mca_btl_tcp_addr_t {
  66     union {
  67         struct in_addr  addr_inet;      /* IPv6 listen address */
  68 #if OPAL_ENABLE_IPV6
  69         struct in6_addr addr_inet6;     /* IPv6 listen address */
  70 #endif
  71     };
  72     in_port_t   addr_port;     /**< listen port */
  73     int         addr_ifkindex; /**< remote interface index assigned with
  74                                     this address */
  75     uint8_t     addr_family;   /**< AF_INET or AF_INET6 */
  76     bool        addr_inuse;    /**< local meaning only */
  77 };
  78 typedef struct mca_btl_tcp_addr_t mca_btl_tcp_addr_t;
  79 
  80 #define MCA_BTL_TCP_AF_INET     0
  81 #define MCA_BTL_TCP_AF_INET6    1
  82 
  83 #endif
  84 

/* [<][>][^][v][top][bottom][index][help] */