< prev index next >

src/java.base/share/classes/sun/nio/ch/SocketOptionRegistry.java.template

Print this page
rev 59105 : imported patch corelibs


  26  */
  27 @@END_COPYRIGHT@@
  28 
  29 #include <stdio.h>
  30 #ifdef _WIN32
  31 #include <winsock2.h>
  32 #include <ws2tcpip.h>
  33 #else
  34 #include <sys/types.h>
  35 #include <sys/socket.h>
  36 #include <netinet/in.h>
  37 #include <netinet/tcp.h>
  38 #endif
  39 
  40 /* Defines SO_REUSEPORT */
  41 #if !defined(SO_REUSEPORT)
  42 #ifdef _WIN32
  43 #define SO_REUSEPORT 0
  44 #elif defined(__linux__)
  45 #define SO_REUSEPORT 15
  46 #elif defined(__solaris__)
  47 #define SO_REUSEPORT 0x100e
  48 #elif defined(AIX) || defined(MACOSX)
  49 #define SO_REUSEPORT 0x0200
  50 #else
  51 #define SO_REUSEPORT 0
  52 #endif
  53 #endif
  54 
  55 /* On Solaris, "sun" is defined as a macro. Undefine to make package
  56    declaration valid */
  57 #undef sun
  58 
  59 /* To be able to name the Java constants the same as the C constants without
  60    having the preprocessor rewrite those identifiers, add PREFIX_ to all
  61    identifiers matching a C constant. The PREFIX_ is filtered out in the
  62    makefile. */
  63 
  64 @@START_HERE@@
  65 
  66 package sun.nio.ch;
  67 import java.net.SocketOption;
  68 import java.net.StandardSocketOptions;
  69 import java.net.ProtocolFamily;
  70 import java.net.StandardProtocolFamily;
  71 import java.util.Map;
  72 import java.util.HashMap;
  73 class SocketOptionRegistry {
  74 
  75     private SocketOptionRegistry() { }
  76 
  77     private static class RegistryKey {




  26  */
  27 @@END_COPYRIGHT@@
  28 
  29 #include <stdio.h>
  30 #ifdef _WIN32
  31 #include <winsock2.h>
  32 #include <ws2tcpip.h>
  33 #else
  34 #include <sys/types.h>
  35 #include <sys/socket.h>
  36 #include <netinet/in.h>
  37 #include <netinet/tcp.h>
  38 #endif
  39 
  40 /* Defines SO_REUSEPORT */
  41 #if !defined(SO_REUSEPORT)
  42 #ifdef _WIN32
  43 #define SO_REUSEPORT 0
  44 #elif defined(__linux__)
  45 #define SO_REUSEPORT 15


  46 #elif defined(AIX) || defined(MACOSX)
  47 #define SO_REUSEPORT 0x0200
  48 #else
  49 #define SO_REUSEPORT 0
  50 #endif
  51 #endif




  52 
  53 /* To be able to name the Java constants the same as the C constants without
  54    having the preprocessor rewrite those identifiers, add PREFIX_ to all
  55    identifiers matching a C constant. The PREFIX_ is filtered out in the
  56    makefile. */
  57 
  58 @@START_HERE@@
  59 
  60 package sun.nio.ch;
  61 import java.net.SocketOption;
  62 import java.net.StandardSocketOptions;
  63 import java.net.ProtocolFamily;
  64 import java.net.StandardProtocolFamily;
  65 import java.util.Map;
  66 import java.util.HashMap;
  67 class SocketOptionRegistry {
  68 
  69     private SocketOptionRegistry() { }
  70 
  71     private static class RegistryKey {


< prev index next >