Print this page
OS-4018 lxbrand support TCP SO_REUSEPORT
Reviewed by: Robert Mustacchi <rm@joyent.com>
Reviewed by: Jerry Jelinek <jerry.jelinek@joyent.com>
Reviewed by: Cody Mello <cody.mello@joyent.com>
OS-3752 Increase IOV_MAX to at least 1024
OS-2952 lx brand needs to support or emulate rtnetlink(7)
Reviewed by: Robert Mustacchi <rm@joyent.com>
Reviewed by: Jerry Jelinek <jerry.jelinek@joyent.com>

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/common/sys/socket.h
          +++ new/usr/src/uts/common/sys/socket.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   * Copyright 2014 Garrett D'Amore <garrett@damore.org>
  23   23   *
  24   24   * Copyright (c) 1989, 2010, Oracle and/or its affiliates. All rights reserved.
       25 + * Copyright 2015, Joyent, Inc. All rights reserved.
  25   26   */
  26   27  
  27   28  /*      Copyright (c) 1983, 1984, 1985, 1986, 1987, 1988, 1989 AT&T     */
  28   29  /*        All Rights Reserved   */
  29   30  
  30   31  /*
  31   32   * University Copyright- Copyright (c) 1982, 1986, 1988
  32   33   * The Regents of the University of California
  33   34   * All Rights Reserved
  34   35   *
  35   36   * University Acknowledgment- Portions of this document are derived from
  36   37   * software developed by the University of California, Berkeley, and its
  37   38   * contributors.
  38   39   */
  39   40  
  40   41  /* Copyright (c) 2013, OmniTI Computer Consulting, Inc. All rights reserved. */
  41   42  
       43 +/*
       44 + * Copyright (c) 2014, Joyent, Inc. All rights reserved.
       45 + */
  42   46  #ifndef _SYS_SOCKET_H
  43   47  #define _SYS_SOCKET_H
  44   48  
  45   49  #include <sys/types.h>
  46   50  #include <sys/uio.h>
  47   51  #include <sys/feature_tests.h>
  48   52  #include <sys/socket_impl.h>
  49   53  #if !defined(_XPG4_2) || defined(__EXTENSIONS__)
  50   54  #ifndef _KERNEL
  51   55  #include <sys/netconfig.h>
↓ open down ↓ 135 lines elided ↑ open up ↑
 187  191  #define SCM_TIMESTAMP   SO_TIMESTAMP    /* socket control message timestamp */
 188  192  #define SO_ALLZONES     0x1014          /* bind in all zones */
 189  193  #define SO_EXCLBIND     0x1015          /* exclusive binding */
 190  194  #define SO_MAC_IMPLICIT 0x1016          /* hide mac labels on wire */
 191  195  #define SO_VRRP         0x1017          /* VRRP control socket */
 192  196  
 193  197  #ifdef  _KERNEL
 194  198  #define SO_SRCADDR      0x2001          /* Internal: AF_UNIX source address */
 195  199  #define SO_FILEP        0x2002          /* Internal: AF_UNIX file pointer */
 196  200  #define SO_UNIX_CLOSE   0x2003          /* Internal: AF_UNIX peer closed */
      201 +#define SO_REUSEPORT    0x2004          /* allow simultaneous port reuse */
 197  202  #endif  /* _KERNEL */
 198  203  
 199  204  /*
 200  205   * Socket filter options
 201  206   */
 202  207  #define FIL_ATTACH      0x1             /* attach filter */
 203  208  #define FIL_DETACH      0x2             /* detach filter */
 204  209  #define FIL_LIST        0x3             /* list attached filters */
 205  210  
 206  211  #define FILNAME_MAX     32
↓ open down ↓ 79 lines elided ↑ open up ↑
 286  291  #define AF_IPX          23              /* Novell Internet Protocol */
 287  292  #define AF_ROUTE        24              /* Internal Routing Protocol */
 288  293  #define AF_LINK         25              /* Link-layer interface */
 289  294  #define AF_INET6        26              /* Internet Protocol, Version 6 */
 290  295  #define AF_KEY          27              /* Security Association DB socket */
 291  296  #define AF_NCA          28              /* NCA socket */
 292  297  #define AF_POLICY       29              /* Security Policy DB socket */
 293  298  #define AF_INET_OFFLOAD 30              /* Sun private; do not use */
 294  299  #define AF_TRILL        31              /* TRILL interface */
 295  300  #define AF_PACKET       32              /* PF_PACKET Linux socket interface */
      301 +#define AF_LX_NETLINK   33              /* Linux-compatible netlink */
 296  302  
 297      -#define AF_MAX          32
      303 +#define AF_MAX          33
 298  304  
 299  305  /*
 300  306   * Protocol families, same as address families for now.
 301  307   */
 302  308  #define PF_UNSPEC       AF_UNSPEC
 303  309  #define PF_UNIX         AF_UNIX
 304  310  #define PF_LOCAL        PF_UNIX
 305  311  #define PF_FILE         PF_UNIX
 306  312  #define PF_INET         AF_INET
 307  313  #define PF_IMPLINK      AF_IMPLINK
↓ open down ↓ 19 lines elided ↑ open up ↑
 327  333  #define PF_IPX          AF_IPX
 328  334  #define PF_ROUTE        AF_ROUTE
 329  335  #define PF_LINK         AF_LINK
 330  336  #define PF_INET6        AF_INET6
 331  337  #define PF_KEY          AF_KEY
 332  338  #define PF_NCA          AF_NCA
 333  339  #define PF_POLICY       AF_POLICY
 334  340  #define PF_INET_OFFLOAD AF_INET_OFFLOAD /* Sun private; do not use */
 335  341  #define PF_TRILL        AF_TRILL
 336  342  #define PF_PACKET       AF_PACKET
      343 +#define PF_LX_NETLINK   AF_LX_NETLINK
 337  344  
 338  345  #define PF_MAX          AF_MAX
 339  346  
 340  347  /*
 341  348   * Maximum queue length specifiable by listen.
 342  349   */
 343  350  #define SOMAXCONN       128
 344  351  
 345  352  /*
 346  353   * Message header for recvmsg and sendmsg calls.
↓ open down ↓ 66 lines elided ↑ open up ↑
 413  420  #define MSG_CTRUNC      0x10            /* Control data truncated */
 414  421  #define MSG_TRUNC       0x20            /* Normal data truncated */
 415  422  #define MSG_WAITALL     0x40            /* Wait for complete recv or error */
 416  423  #define MSG_DUPCTRL     0x800           /* Save control message for use with */
 417  424                                          /* with left over data */
 418  425  /* End of XPGv2 compliance */
 419  426  #define MSG_DONTWAIT    0x80            /* Don't block for this recv */
 420  427  #define MSG_NOTIFICATION 0x100          /* Notification, not data */
 421  428  #define MSG_XPG4_2      0x8000          /* Private: XPG4.2 flag */
 422  429  
      430 +/* Obsolete but kept for compilation compatability. Use IOV_MAX. */
 423  431  #define MSG_MAXIOVLEN   16
 424  432  
 425  433  #ifdef _KERNEL
 426  434  
 427  435  /*
 428  436   * for kernel socket only
 429  437   */
 430  438  #define MSG_MBLK_QUICKRELE      0x10000000      /* free mblk chain */
 431  439                                                  /* in timely manner */
 432  440  #define MSG_USERSPACE           0x20000000      /* buffer from user space */
↓ open down ↓ 125 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX