src/java.base/unix/native/libnet/PlainDatagramSocketImpl.c

Print this page




  51 #endif
  52 /**
  53  * IP_MULTICAST_ALL has been supported since kernel version 2.6.31
  54  * but we may be building on a machine that is older than that.
  55  */
  56 #ifndef IP_MULTICAST_ALL
  57 #define IP_MULTICAST_ALL      49
  58 #endif
  59 #endif  //  __linux__
  60 
  61 #include <sys/ioctl.h>
  62 
  63 #ifndef IPTOS_TOS_MASK
  64 #define IPTOS_TOS_MASK 0x1e
  65 #endif
  66 #ifndef IPTOS_PREC_MASK
  67 #define IPTOS_PREC_MASK 0xe0
  68 #endif
  69 
  70 #include "jvm.h"

  71 #include "jni_util.h"
  72 #include "net_util.h"
  73 #include "java_net_SocketOptions.h"
  74 #include "java_net_PlainDatagramSocketImpl.h"
  75 #include "java_net_NetworkInterface.h"
  76 /************************************************************************
  77  * PlainDatagramSocketImpl
  78  */
  79 
  80 static jfieldID IO_fd_fdID;
  81 
  82 static jfieldID pdsi_fdID;
  83 static jfieldID pdsi_timeoutID;
  84 static jfieldID pdsi_trafficClassID;
  85 static jfieldID pdsi_localPortID;
  86 static jfieldID pdsi_connected;
  87 static jfieldID pdsi_connectedAddress;
  88 static jfieldID pdsi_connectedPort;
  89 
  90 extern void setDefaultScopeID(JNIEnv *env, struct sockaddr *him);




  51 #endif
  52 /**
  53  * IP_MULTICAST_ALL has been supported since kernel version 2.6.31
  54  * but we may be building on a machine that is older than that.
  55  */
  56 #ifndef IP_MULTICAST_ALL
  57 #define IP_MULTICAST_ALL      49
  58 #endif
  59 #endif  //  __linux__
  60 
  61 #include <sys/ioctl.h>
  62 
  63 #ifndef IPTOS_TOS_MASK
  64 #define IPTOS_TOS_MASK 0x1e
  65 #endif
  66 #ifndef IPTOS_PREC_MASK
  67 #define IPTOS_PREC_MASK 0xe0
  68 #endif
  69 
  70 #include "jvm.h"
  71 #include "jdk_strerror.h"
  72 #include "jni_util.h"
  73 #include "net_util.h"
  74 #include "java_net_SocketOptions.h"
  75 #include "java_net_PlainDatagramSocketImpl.h"
  76 #include "java_net_NetworkInterface.h"
  77 /************************************************************************
  78  * PlainDatagramSocketImpl
  79  */
  80 
  81 static jfieldID IO_fd_fdID;
  82 
  83 static jfieldID pdsi_fdID;
  84 static jfieldID pdsi_timeoutID;
  85 static jfieldID pdsi_trafficClassID;
  86 static jfieldID pdsi_localPortID;
  87 static jfieldID pdsi_connected;
  88 static jfieldID pdsi_connectedAddress;
  89 static jfieldID pdsi_connectedPort;
  90 
  91 extern void setDefaultScopeID(JNIEnv *env, struct sockaddr *him);