Print this page
*** NO COMMENTS ***

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/common/rpc/svc_clts.c
          +++ new/usr/src/uts/common/rpc/svc_clts.c
↓ open down ↓ 18 lines elided ↑ open up ↑
  19   19   * CDDL HEADER END
  20   20   */
  21   21  /*
  22   22   *  Copyright (c) 1989, 2010, Oracle and/or its affiliates. All rights reserved.
  23   23   */
  24   24  
  25   25  /*      Copyright (c) 1983, 1984, 1985, 1986, 1987, 1988, 1989 AT&T     */
  26   26  /*        All Rights Reserved   */
  27   27  
  28   28  /*
       29 + * Copyright 2012 Nexenta Systems, Inc.  All rights reserved.
       30 + */
       31 +
       32 +/*
  29   33   * Portions of this source code were derived from Berkeley 4.3 BSD
  30   34   * under license from the Regents of the University of California.
  31   35   */
  32   36  
  33   37  /*
  34   38   * svc_clts.c
  35   39   * Server side for RPC in the kernel.
  36   40   *
  37   41   */
  38   42  
↓ open down ↓ 62 lines elided ↑ open up ↑
 101  105          svc_clts_ktattrs        /* Transport specific attributes. */
 102  106  };
 103  107  
 104  108  /*
 105  109   * Transport private data.
 106  110   * Kept in xprt->xp_p2buf.
 107  111   */
 108  112  struct udp_data {
 109  113          mblk_t  *ud_resp;                       /* buffer for response */
 110  114          mblk_t  *ud_inmp;                       /* mblk chain of request */
      115 +        sin6_t  ud_local;                       /* local address */
 111  116  };
 112  117  
 113  118  #define UD_MAXSIZE      8800
 114  119  #define UD_INITSIZE     2048
 115  120  
 116  121  /*
 117  122   * Connectionless server statistics
 118  123   */
 119  124  static const struct rpc_clts_server {
 120  125          kstat_named_t   rscalls;
↓ open down ↓ 193 lines elided ↑ open up ↑
 314  319                  goto bad;
 315  320          }
 316  321          /*
 317  322           * Point the remote transport address in the service_transport
 318  323           * handle at the address in the request.
 319  324           */
 320  325          clone_xprt->xp_rtaddr.buf = (char *)mp->b_rptr +
 321  326              pptr->unitdata_ind.SRC_offset;
 322  327          clone_xprt->xp_rtaddr.len = pptr->unitdata_ind.SRC_length;
 323  328  
      329 +        clone_xprt->xp_lcladdr.buf = (char *)&ud->ud_local;
      330 +
 324  331          /*
 325  332           * Copy the local transport address in the service_transport
 326  333           * handle at the address in the request. We will have only
 327  334           * the local IP address in options.
 328  335           */
 329  336          ((sin_t *)(clone_xprt->xp_lcladdr.buf))->sin_family = AF_UNSPEC;
 330  337          if (pptr->unitdata_ind.OPT_length && pptr->unitdata_ind.OPT_offset) {
 331  338                  char *dstopt = (char *)mp->b_rptr +
 332  339                      pptr->unitdata_ind.OPT_offset;
 333  340                  struct T_opthdr *toh = (struct T_opthdr *)dstopt;
↓ open down ↓ 665 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX