Print this page
7388 Support DHCP Client FQDN. Allow IAID/DUID for all v4.

Split Close
Expand all
Collapse all
          --- old/usr/src/cmd/cmd-inet/lib/ipmgmtd/ipmgmt_impl.h
          +++ new/usr/src/cmd/cmd-inet/lib/ipmgmtd/ipmgmt_impl.h
↓ open down ↓ 13 lines elided ↑ open up ↑
  14   14   * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  15   15   * If applicable, add the following below this CDDL HEADER, with the
  16   16   * fields enclosed by brackets "[]" replaced with your own identifying
  17   17   * information: Portions Copyright [yyyy] [name of copyright owner]
  18   18   *
  19   19   * CDDL HEADER END
  20   20   */
  21   21  
  22   22  /*
  23   23   * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
       24 + * Copyright (c) 2016, Chris Fraire <cfraire@me.com>.
  24   25   */
  25   26  
  26   27  #ifndef _IPMGMT_IMPL_H
  27   28  #define _IPMGMT_IMPL_H
  28   29  
  29   30  #ifdef  __cplusplus
  30   31  extern "C" {
  31   32  #endif
  32   33  
  33   34  #include <net/if.h>
↓ open down ↓ 62 lines elided ↑ open up ↑
  96   97  /*
  97   98   * A linked list of address object nodes. Each node in the list tracks
  98   99   * following information for the address object identified by `am_aobjname'.
  99  100   *      - interface on which the address is created
 100  101   *      - logical interface number on which the address is created
 101  102   *      - address family
 102  103   *      - `am_nextnum' identifies the next number to use to generate user part
 103  104   *        of `aobjname'.
 104  105   *      - address type (static, dhcp or addrconf)
 105  106   *      - `am_flags' indicates if this addrobj in active and/or persist config
 106      - *      - if `am_atype' is IPADM_ADDR_IPV6_ADDRCONF then `am_ifid' holds the
 107      - *        interface-id used to configure auto-configured addresses
      107 + *      - other, ipadm_addr_type_t-specific values are cached in
      108 + *        am_addr_cache (see type ipmgmt_addr_cache_u):
      109 + *        -     ipv6: ipmgmt_am_linklocal (macro)
      110 + *        -     ipv6: ipmgmt_am_ifid (macro)
      111 + *        -     dhcp: ipmgmt_am_primary (macro)
      112 + *        -     dhcp: ipmgmt_am_reqhost (macro)
 108  113   */
 109  114  typedef struct ipmgmt_aobjmap_s {
 110  115          struct ipmgmt_aobjmap_s *am_next;
 111  116          char                    am_aobjname[IPADM_AOBJSIZ];
 112  117          char                    am_ifname[LIFNAMSIZ];
 113  118          int32_t                 am_lnum;
 114  119          sa_family_t             am_family;
 115  120          ipadm_addr_type_t       am_atype;
 116  121          uint32_t                am_nextnum;
 117  122          uint32_t                am_flags;
 118      -        boolean_t               am_linklocal;
 119      -        struct sockaddr_storage am_ifid;
      123 +        ipmgmt_addr_type_cache_u        am_atype_cache;
 120  124  } ipmgmt_aobjmap_t;
 121  125  
      126 +#define ipmgmt_am_linklocal     am_atype_cache.ipmgmt_ipv6_cache_s.ipmgmt_linklocal
      127 +#define ipmgmt_am_ifid          am_atype_cache.ipmgmt_ipv6_cache_s.ipmgmt_ifid
      128 +#define ipmgmt_am_primary       am_atype_cache.ipmgmt_dhcp_cache_s.ipmgmt_primary
      129 +#define ipmgmt_am_reqhost       am_atype_cache.ipmgmt_dhcp_cache_s.ipmgmt_reqhost
      130 +
 122  131  /* linked list of `aobjmap' nodes, protected by RW lock */
 123  132  typedef struct ipmgmt_aobjmap_list_s {
 124  133          ipmgmt_aobjmap_t        *aobjmap_head;
 125  134          pthread_rwlock_t        aobjmap_rwlock;
 126  135  } ipmgmt_aobjmap_list_t;
 127  136  
 128  137  /* global `aobjmap' defined in ipmgmt_main.c */
 129  138  extern ipmgmt_aobjmap_list_t aobjmap;
 130  139  
 131  140  /* operations on the `aobjmap' linked list */
↓ open down ↓ 64 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX