Print this page
usr/src/cmd/dlmgmtd/dlmgmt_door.c

Split Close
Expand all
Collapse all
          --- old/usr/src/cmd/dlmgmtd/dlmgmt_impl.h
          +++ new/usr/src/cmd/dlmgmtd/dlmgmt_impl.h
↓ open down ↓ 14 lines elided ↑ open up ↑
  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) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
  24   24   * Copyright 2017 Joyent, Inc.
       25 + * Copyright 2023 Oxide Computer Company
  25   26   */
  26   27  
  27   28  /*
  28   29   * Functions to maintain a table of datalink configuration information.
  29   30   */
  30   31  
  31   32  #ifndef _DLMGMT_IMPL_H
  32   33  #define _DLMGMT_IMPL_H
  33   34  
  34   35  #ifdef  __cplusplus
↓ open down ↓ 28 lines elided ↑ open up ↑
  63   64          datalink_id_t           ll_linkid;
  64   65  
  65   66          /*
  66   67           * The zone that owns the link. If this is set to the id of
  67   68           * an NGZ and ll_onloan is set then the link was created and
  68   69           * is owned by the GZ but is currently being loaned out to an
  69   70           * NGZ. E.g., when the GZ admin creates a VNIC for exclusive
  70   71           * use by an NGZ. If ll_onloan is set then ll_zoneid cannot be 0.
  71   72           *
  72   73           * If ll_zoneid is set to the id of an NGZ but ll_onloan is
  73      -         * not set then the link was created and is owned by the NGZ.
       74 +         * not set then the link was created by, and is owned by, the NGZ.
  74   75           */
  75   76          zoneid_t                ll_zoneid;
  76   77          boolean_t               ll_onloan;
  77   78          avl_node_t              ll_name_node;
  78   79          avl_node_t              ll_id_node;
  79   80          uint32_t                ll_flags;
  80   81          uint32_t                ll_gen;         /* generation number */
  81      -        boolean_t               ll_trans;       /* transient link */
       82 +        /*
       83 +         * A transient link is one that is created and destroyed along with the
       84 +         * lifetime of a zone. It is a non-persistent link that is owned by the
       85 +         * zone (ll_zoneid is set to the id of the NGZ). It is specifically not
       86 +         * on-loan from the GZ.
       87 +         */
       88 +        boolean_t               ll_transient;
  82   89  } dlmgmt_link_t;
  83   90  
  84   91  /*
  85   92   * datalink configuration request structure
  86   93   */
  87   94  typedef struct dlmgmt_dlconf_s {
  88   95          dlmgmt_linkattr_t       *ld_head;
  89   96          char                    ld_link[MAXLINKNAMELEN];
  90   97          datalink_id_t           ld_linkid;
  91   98          datalink_class_t        ld_class;
↓ open down ↓ 50 lines elided ↑ open up ↑
 142  149  void            dlmgmt_linktable_init(void);
 143  150  void            dlmgmt_linktable_fini(void);
 144  151  
 145  152  int             dlmgmt_zone_init(zoneid_t);
 146  153  int             dlmgmt_elevate_privileges(void);
 147  154  int             dlmgmt_drop_privileges();
 148  155  void            dlmgmt_handler(void *, char *, size_t, door_desc_t *, uint_t);
 149  156  void            dlmgmt_log(int, const char *, ...);
 150  157  int             dlmgmt_write_db_entry(const char *, dlmgmt_link_t *, uint32_t);
 151  158  int             dlmgmt_delete_db_entry(dlmgmt_link_t *, uint32_t);
 152      -int             dlmgmt_db_init(zoneid_t, char *);
      159 +int             dlmgmt_db_init(zoneid_t, char *);
 153  160  void            dlmgmt_db_fini(zoneid_t);
 154  161  
 155  162  #ifdef  __cplusplus
 156  163  }
 157  164  #endif
 158  165  
 159  166  #endif  /* _DLMGMT_IMPL_H */
    
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX