33 #include "nio.h" 34 #include "nio_util.h" 35 #include "net_util.h" 36 37 #include "sun_nio_ch_Net.h" 38 #include "sun_nio_ch_PollArrayWrapper.h" 39 40 /** 41 * Definitions to allow for building with older SDK include files. 42 */ 43 44 #ifndef MCAST_BLOCK_SOURCE 45 46 #define MCAST_BLOCK_SOURCE 43 47 #define MCAST_UNBLOCK_SOURCE 44 48 #define MCAST_JOIN_SOURCE_GROUP 45 49 #define MCAST_LEAVE_SOURCE_GROUP 46 50 51 #endif /* MCAST_BLOCK_SOURCE */ 52 53 typedef struct my_ip_mreq_source { 54 IN_ADDR imr_multiaddr; 55 IN_ADDR imr_sourceaddr; 56 IN_ADDR imr_interface; 57 }; 58 59 typedef struct my_group_source_req { 60 ULONG gsr_interface; 61 SOCKADDR_STORAGE gsr_group; 62 SOCKADDR_STORAGE gsr_source; 63 }; 64 65 /** 66 * Copy IPv6 address as jbytearray to target 67 */ 68 #define COPY_INET6_ADDRESS(env, source, target) \ 69 (*env)->GetByteArrayRegion(env, source, 0, 16, target) 70 71 /** 72 * Enable or disable receipt of WSAECONNRESET errors. | 33 #include "nio.h" 34 #include "nio_util.h" 35 #include "net_util.h" 36 37 #include "sun_nio_ch_Net.h" 38 #include "sun_nio_ch_PollArrayWrapper.h" 39 40 /** 41 * Definitions to allow for building with older SDK include files. 42 */ 43 44 #ifndef MCAST_BLOCK_SOURCE 45 46 #define MCAST_BLOCK_SOURCE 43 47 #define MCAST_UNBLOCK_SOURCE 44 48 #define MCAST_JOIN_SOURCE_GROUP 45 49 #define MCAST_LEAVE_SOURCE_GROUP 46 50 51 #endif /* MCAST_BLOCK_SOURCE */ 52 53 #if _MSC_VER >= 1900 54 #pragma warning(disable: 4091) // typedef ignored on left when no variable is declared 55 #endif 56 57 typedef struct my_ip_mreq_source { 58 IN_ADDR imr_multiaddr; 59 IN_ADDR imr_sourceaddr; 60 IN_ADDR imr_interface; 61 }; 62 63 typedef struct my_group_source_req { 64 ULONG gsr_interface; 65 SOCKADDR_STORAGE gsr_group; 66 SOCKADDR_STORAGE gsr_source; 67 }; 68 69 /** 70 * Copy IPv6 address as jbytearray to target 71 */ 72 #define COPY_INET6_ADDRESS(env, source, target) \ 73 (*env)->GetByteArrayRegion(env, source, 0, 16, target) 74 75 /** 76 * Enable or disable receipt of WSAECONNRESET errors. |