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 #endif
111
112 #endif /* NET_UTILS_MD_H */
|
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.
123 *
124 * For now, only priority and maxbw are supported in SOCK_FLOW_PROP_VERSION1.
125 */
126 typedef struct sock_flow_props_s {
127 int sfp_version;
128 uint32_t sfp_mask;
129 int sfp_priority; /* flow priority */
130 uint64_t sfp_maxbw; /* bandwidth limit in bps */
131 int sfp_status; /* flow create status for getsockopt */
132 } sock_flow_props_t;
133
134 #define SOCK_FLOW_PROP_VERSION1 1
135
136 /* bit mask values for sfp_mask */
137 #define SFP_MAXBW 0x00000001 /* Flow Bandwidth Limit */
138 #define SFP_PRIORITY 0x00000008 /* Flow priority */
139
140 /* possible values for sfp_priority */
141 #define SFP_PRIO_NORMAL 1
142 #define SFP_PRIO_HIGH 2
143
144 #if _LONG_LONG_ALIGNMENT == 8 && _LONG_LONG_ALIGNMENT_32 == 4
145 #pragma pack()
146 #endif /* _LONG_LONG_ALIGNMENT */
147
148 #endif /* SO_FLOW_SLA */
149 #endif /* __solaris__ */
150
151 JNIEXPORT jboolean JNICALL NET_IsFlowSupported();
152
153 #endif /* NET_UTILS_MD_H */
|