Print this page
dccp: starting module template

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/common/inet/tunables.c
          +++ new/usr/src/uts/common/inet/tunables.c
↓ open down ↓ 26 lines elided ↑ open up ↑
  27   27  #include <sys/md5.h>
  28   28  #include <inet/common.h>
  29   29  #include <inet/ip.h>
  30   30  #include <inet/ip6.h>
  31   31  #include <netinet/icmp6.h>
  32   32  #include <inet/ip_stack.h>
  33   33  #include <inet/rawip_impl.h>
  34   34  #include <inet/tcp_stack.h>
  35   35  #include <inet/tcp_impl.h>
  36   36  #include <inet/udp_impl.h>
       37 +#include <inet/dccp_stack.h>
       38 +#include <inet/dccp_impl.h>
  37   39  #include <inet/sctp/sctp_stack.h>
  38   40  #include <inet/sctp/sctp_impl.h>
  39   41  #include <inet/tunables.h>
  40   42  
  41   43  static int
  42   44  prop_perm2const(mod_prop_info_t *pinfo)
  43   45  {
  44   46          if (pinfo->mpi_setf == NULL)
  45   47                  return (MOD_PROP_PERM_READ);
  46   48          if (pinfo->mpi_getf == NULL)
↓ open down ↓ 151 lines elided ↑ open up ↑
 198  200  /* ARGSUSED */
 199  201  int
 200  202  mod_get_allprop(void *cbarg, mod_prop_info_t *pinfo, const char *ifname,
 201  203      void *val, uint_t psize, uint_t flags)
 202  204  {
 203  205          char            *pval = val;
 204  206          mod_prop_info_t *ptbl, *prop;
 205  207          ip_stack_t      *ipst;
 206  208          tcp_stack_t     *tcps;
 207  209          sctp_stack_t    *sctps;
      210 +        dccp_stack_t    *dccps;
 208  211          udp_stack_t     *us;
 209  212          icmp_stack_t    *is;
 210  213          uint_t          size;
 211  214          size_t          nbytes = 0, tbytes = 0;
 212  215  
 213  216          bzero(pval, psize);
 214  217          size = psize;
 215  218  
 216  219          switch (pinfo->mpi_proto) {
 217  220          case MOD_PROTO_IP:
↓ open down ↓ 11 lines elided ↑ open up ↑
 229  232                  ptbl = tcps->tcps_propinfo_tbl;
 230  233                  break;
 231  234          case MOD_PROTO_UDP:
 232  235                  us = (udp_stack_t *)cbarg;
 233  236                  ptbl = us->us_propinfo_tbl;
 234  237                  break;
 235  238          case MOD_PROTO_SCTP:
 236  239                  sctps = (sctp_stack_t *)cbarg;
 237  240                  ptbl = sctps->sctps_propinfo_tbl;
 238  241                  break;
      242 +        case MOD_PROTO_DCCP:
      243 +                dccps = (dccp_stack_t *)cbarg;
      244 +                ptbl = dccps->dccps_propinfo_tbl;
      245 +                break;
 239  246          default:
 240  247                  return (EINVAL);
 241  248          }
 242  249  
 243  250          for (prop = ptbl; prop->mpi_name != NULL; prop++) {
 244  251                  if (prop->mpi_name[0] == '\0' ||
 245  252                      strcmp(prop->mpi_name, "?") == 0) {
 246  253                          continue;
 247  254                  }
 248  255                  nbytes = snprintf(pval, size, "%s %d %d", prop->mpi_name,
↓ open down ↓ 208 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX