< prev index next >

src/java.base/unix/native/libnet/net_util_md.h

Print this page


   1 /*
   2  * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
   3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4  *
   5  * This code is free software; you can redistribute it and/or modify it
   6  * under the terms of the GNU General Public License version 2 only, as
   7  * published by the Free Software Foundation.  Oracle designates this
   8  * particular file as subject to the "Classpath" exception as provided
   9  * by Oracle in the LICENSE file that accompanied this code.
  10  *
  11  * This code is distributed in the hope that it will be useful, but WITHOUT
  12  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  13  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  14  * version 2 for more details (a copy is included in the LICENSE file that
  15  * accompanied this code).
  16  *
  17  * You should have received a copy of the GNU General Public License version
  18  * 2 along with this work; if not, write to the Free Software Foundation,
  19  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  20  *
  21  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22  * or visit www.oracle.com if you need additional information or have any


  83                             struct sockaddr_in him4; \
  84                             struct sockaddr_in6 him6; \
  85                         }
  86 
  87 #define SOCKADDR_LEN    (ipv6_available() ? sizeof(SOCKADDR) : \
  88                          sizeof(struct sockaddr_in))
  89 
  90 #else
  91 
  92 #define SOCKADDR        union { struct sockaddr_in him4; }
  93 #define SOCKADDR_LEN    sizeof(SOCKADDR)
  94 
  95 #endif
  96 
  97 /************************************************************************
  98  *  Utilities
  99  */
 100 
 101 #ifdef __linux__
 102 int kernelIsV24();

 103 #ifdef AF_INET6
 104 int getDefaultIPv6Interface(struct in6_addr *target_addr);
 105 #endif
 106 #endif
 107 
 108 #ifdef __solaris__
 109 int net_getParam(char *driver, char *param);
 110 
 111 #ifndef SO_FLOW_SLA
 112 #define SO_FLOW_SLA 0x1018
 113 
 114 #if _LONG_LONG_ALIGNMENT == 8 && _LONG_LONG_ALIGNMENT_32 == 4
 115 #pragma pack(4)
 116 #endif
 117 
 118 /*
 119  * Used with the setsockopt(SO_FLOW_SLA, ...) call to set
 120  * per socket service level properties.
 121  * When the application uses per-socket API, we will enforce the properties
 122  * on both outbound and inbound packets.


   1 /*
   2  * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved.
   3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4  *
   5  * This code is free software; you can redistribute it and/or modify it
   6  * under the terms of the GNU General Public License version 2 only, as
   7  * published by the Free Software Foundation.  Oracle designates this
   8  * particular file as subject to the "Classpath" exception as provided
   9  * by Oracle in the LICENSE file that accompanied this code.
  10  *
  11  * This code is distributed in the hope that it will be useful, but WITHOUT
  12  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  13  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  14  * version 2 for more details (a copy is included in the LICENSE file that
  15  * accompanied this code).
  16  *
  17  * You should have received a copy of the GNU General Public License version
  18  * 2 along with this work; if not, write to the Free Software Foundation,
  19  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  20  *
  21  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22  * or visit www.oracle.com if you need additional information or have any


  83                             struct sockaddr_in him4; \
  84                             struct sockaddr_in6 him6; \
  85                         }
  86 
  87 #define SOCKADDR_LEN    (ipv6_available() ? sizeof(SOCKADDR) : \
  88                          sizeof(struct sockaddr_in))
  89 
  90 #else
  91 
  92 #define SOCKADDR        union { struct sockaddr_in him4; }
  93 #define SOCKADDR_LEN    sizeof(SOCKADDR)
  94 
  95 #endif
  96 
  97 /************************************************************************
  98  *  Utilities
  99  */
 100 
 101 #ifdef __linux__
 102 int kernelIsV24();
 103 #define SO_QUICKACK 0x0C
 104 #ifdef AF_INET6
 105 int getDefaultIPv6Interface(struct in6_addr *target_addr);
 106 #endif
 107 #endif
 108 
 109 #ifdef __solaris__
 110 int net_getParam(char *driver, char *param);
 111 
 112 #ifndef SO_FLOW_SLA
 113 #define SO_FLOW_SLA 0x1018
 114 
 115 #if _LONG_LONG_ALIGNMENT == 8 && _LONG_LONG_ALIGNMENT_32 == 4
 116 #pragma pack(4)
 117 #endif
 118 
 119 /*
 120  * Used with the setsockopt(SO_FLOW_SLA, ...) call to set
 121  * per socket service level properties.
 122  * When the application uses per-socket API, we will enforce the properties
 123  * on both outbound and inbound packets.


< prev index next >