Print this page
    
    
      
        | Split | 
	Close | 
      
      | Expand all | 
      | Collapse all | 
    
    
          --- old/usr/src/uts/common/sys/netconfig.h
          +++ new/usr/src/uts/common/sys/netconfig.h
   1    1  /*
   2    2   * CDDL HEADER START
   3    3   *
   4    4   * The contents of this file are subject to the terms of the
   5    5   * Common Development and Distribution License, Version 1.0 only
   6    6   * (the "License").  You may not use this file except in compliance
   7    7   * with the License.
   8    8   *
   9    9   * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
  10   10   * or http://www.opensolaris.org/os/licensing.
  11   11   * See the License for the specific language governing permissions
  12   12   * and limitations under the License.
  13   13   *
  14   14   * When distributing Covered Code, include this CDDL HEADER in each
  15   15   * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  16   16   * If applicable, add the following below this CDDL HEADER, with the
  17   17   * fields enclosed by brackets "[]" replaced with your own identifying
  18   18   * information: Portions Copyright [yyyy] [name of copyright owner]
  19   19   *
  20   20   * CDDL HEADER END
  21   21   */
  22   22  /*      Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
  23   23  /*        All Rights Reserved   */
  24   24  
  25   25  
  26   26  /*
  27   27   * Copyright 2014 Garrett D'Amore <garrett@damore.org>
  28   28   *
  29   29   * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
  30   30   * Use is subject to license terms.
  31   31   * Copyright 2015 Joyent, Inc.
  32   32   */
  33   33  
  34   34  #ifndef _SYS_NETCONFIG_H
  35   35  #define _SYS_NETCONFIG_H
  36   36  
  37   37  #ifdef  __cplusplus
  38   38  extern "C" {
  39   39  #endif
  40   40  
  41   41  #define NETCONFIG "/etc/netconfig"
  42   42  #define NETPATH   "NETPATH"
  43   43  
  44   44  struct  netconfig {
  45   45          char            *nc_netid;      /* network identifier           */
  46   46          unsigned int    nc_semantics;   /* defined below                */
  47   47          unsigned int    nc_flag;        /* defined below                */
  48   48          char            *nc_protofmly;  /* protocol family name         */
  49   49          char            *nc_proto;      /* protocol name                */
  50   50          char            *nc_device;     /* device name for network id   */
  51   51          unsigned int    nc_nlookups;    /* # of entries in nc_lookups   */
  52   52          char            **nc_lookups;   /* list of lookup directories   */
  53   53          unsigned int    nc_unused[8];   /* borrowed for lockd etc.      */
  54   54  };
  55   55  
  56   56  typedef struct {
  57   57          struct netconfig **nc_head;
  58   58          struct netconfig **nc_curr;
  59   59  } NCONF_HANDLE;
  60   60  
  61   61  /*
  62   62   *      Values of nc_semantics
  63   63   */
  64   64  
  65   65  #define NC_TPI_CLTS     1
  66   66  #define NC_TPI_COTS     2
  67   67  #define NC_TPI_COTS_ORD 3
  68   68  #define NC_TPI_RAW      4
  69   69  /*
  70   70   * NOT FOR PUBLIC USE, Solaris internal only.
  71   71   * This value of nc_semantics is strictly for use of Remote Direct
  72   72   * Memory Access provider interfaces in Solaris only and not for
  73   73   * general use. Do not use this value for general purpose user or
  74   74   * kernel programming. If used the behavior is undefined.
  75   75   * This is a PRIVATE interface to be used by Solaris kRPC only.
  76   76   */
  77   77  #define NC_TPI_RDMA     5
  78   78  
  79   79  /*
  80   80   *      Values of nc_flag
  81   81   */
  82   82  
  83   83  #define NC_NOFLAG       00
  84   84  #define NC_VISIBLE      01
  85   85  #define NC_BROADCAST    02
  86   86  
  87   87  /*
  88   88   *      Values of nc_protofmly
  89   89   */
  90   90  
  91   91  #define NC_NOPROTOFMLY  "-"
  92   92  #define NC_LOOPBACK     "loopback"
  93   93  #define NC_INET         "inet"
  94   94  #define NC_INET6        "inet6"
  95   95  #define NC_IMPLINK      "implink"
  96   96  #define NC_PUP          "pup"
  97   97  #define NC_CHAOS        "chaos"
  98   98  #define NC_NS           "ns"
  99   99  #define NC_NBS          "nbs"
 100  100  #define NC_ECMA         "ecma"
 101  101  #define NC_DATAKIT      "datakit"
 102  102  #define NC_CCITT        "ccitt"
 103  103  #define NC_SNA          "sna"
 104  104  #define NC_DECNET       "decnet"
 105  105  #define NC_DLI          "dli"
 106  106  #define NC_LAT          "lat"
 107  107  #define NC_HYLINK       "hylink"
 108  108  #define NC_APPLETALK    "appletalk"
 109  109  #define NC_NIT          "nit"
 110  110  #define NC_IEEE802      "ieee802"
 111  111  #define NC_OSI          "osi"
 112  112  #define NC_X25          "x25"
 113  113  #define NC_OSINET       "osinet"
 114  114  #define NC_GOSIP        "gosip"
 115  115  /*
 116  116   * NOT FOR PUBLIC USE, Solaris internal only.
 117  117   * This value of nc_semantics is strictly for use of Remote Direct
 118  118   * Memory Access provider interfaces in Solaris only and not for
 119  119   * general use. Do not use this value for general purpose user or
 120  120   * kernel programming. If used the behavior is undefined.
 121  121   * This is a PRIVATE interface to be used by Solaris kRPC only.
 122  122   */
 123  123  #define NC_RDMA         "rdma"
 124  124  
 125  125  /*
 126  126   *      Values for nc_proto
 127  127   */
 128  128  
 129  129  #define NC_NOPROTO      "-"
 130  130  #define NC_TCP          "tcp"
 131  131  #define NC_UDP          "udp"
 132  132  #define NC_ICMP         "icmp"
 133  133  
 134  134  /*
 135  135   *      Values for nc_proto for "rdma" protofmly
 136  136   */
 137  137  #define NC_KVIPL        "kvipl"
 138  138  #define NC_IBTF         "ibtf"
 139  139  #define NC_KDAPL        "kdapl"
 140  140  
 141  141  extern void             *setnetconfig(void);
 142  142  extern int              endnetconfig(void *);
 143  143  extern struct netconfig *getnetconfig(void *);
 144  144  extern struct netconfig *getnetconfigent(const char *);
 145  145  extern void             freenetconfigent(struct netconfig *);
 146  146  extern void             *setnetpath(void);
 147  147  extern int              endnetpath(void *);
 148  148  extern struct netconfig *getnetpath(void *);
 149  149  extern void             nc_perror(const char *);
 150  150  extern char             *nc_sperror(void);
 151  151  extern void             _nsl_brand_set_hooks(int (*)(void),
 152  152                              struct netconfig *(*)(int));
 153  153  
 154  154  #ifdef  __cplusplus
 155  155  }
 156  156  #endif
 157  157  
 158  158  #endif  /* _SYS_NETCONFIG_H */
  
    | 
      ↓ open down ↓ | 
    158 lines elided | 
    
      ↑ open up ↑ | 
  
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX