4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License (the "License").
6 * You may not use this file except in compliance with the License.
8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 * or http://www.opensolaris.org/os/licensing.
10 * See the License for the specific language governing permissions
11 * and limitations under the License.
13 * When distributing Covered Code, include this CDDL HEADER in each
14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 * If applicable, add the following below this CDDL HEADER, with the
16 * fields enclosed by brackets "[]" replaced with your own identifying
17 * information: Portions Copyright [yyyy] [name of copyright owner]
23 * Copyright 2009 Sun Microsystems, Inc. All rights reserved.
24 * Use is subject to license terms.
27 #
pragma D depends_on library ip
.d
28 #
pragma D depends_on library net
.d
/* conninfo_t */
29 #
pragma D depends_on library scsi
.d
/* scsicmd_t and iscsiinfo_t */
30 #
pragma D depends_on
module genunix
31 #
pragma D depends_on
module iscsit
32 #
pragma D depends_on
module idm
34 #
pragma D binding
"1.5" translator
35 translator conninfo_t
< idm_conn_t
*P
> {
36 ci_local
= (P
->ic_laddr
.ss_family
== AF_INET
) ?
37 inet_ntoa((ipaddr_t
*)
38 &((struct sockaddr_in
*)&P
->ic_laddr
)->sin_addr
) :
39 inet_ntoa6(&((struct sockaddr_in6
*)&P
->ic_laddr
)->sin6_addr
);
41 ci_remote
= (P
->ic_raddr
.ss_family
== AF_INET
) ?
42 inet_ntoa((ipaddr_t
*)
43 &((struct sockaddr_in
*)&P
->ic_raddr
)->sin_addr
) :
44 inet_ntoa6(&((struct sockaddr_in6
*)&P
->ic_raddr
)->sin6_addr
);
46 ci_protocol
= (P
->ic_laddr
.ss_family
== AF_INET
) ?
"ipv4" : "ipv6";
49 #
pragma D binding
"1.5" translator
50 translator iscsiinfo_t
< iscsi_async_evt_hdr_t
*P
> {
51 ii_initiator
= ((idm_conn_t
*)arg0
)->ic_initiator_name
;
52 ii_target
= ((idm_conn_t
*)arg0
)->ic_target_name
;
53 ii_isid
= ((idm_conn_t
*)arg0
)->ic_isid
;
54 ii_tsih
= ((idm_conn_t
*)arg0
)->ic_tsih
;
55 ii_transport
= (((idm_conn_t
*)arg0
)->ic_transport_type
==
56 IDM_TRANSPORT_TYPE_ISER
) ?
"iser-ib" :
57 (((idm_conn_t
*)arg0
)->ic_transport_type
==
58 IDM_TRANSPORT_TYPE_SOCKETS
) ?
"sockets" : "Unknown";
59 ii_lun
= (((uint64_t
)P
->lun
[0] << (64 - 0*8 - 8)) +
60 ((uint64_t
)P
->lun
[1] << (64 - 1*8 - 8)) +
61 ((uint64_t
)P
->lun
[2] << (64 - 2*8 - 8)) +
62 ((uint64_t
)P
->lun
[3] << (64 - 3*8 - 8)) +
63 ((uint64_t
)P
->lun
[4] << (64 - 4*8 - 8)) +
64 ((uint64_t
)P
->lun
[5] << (64 - 5*8 - 8)) +
65 ((uint64_t
)P
->lun
[6] << (64 - 6*8 - 8)) +
66 ((uint64_t
)P
->lun
[7] << (64 - 7*8 - 8)));
70 ii_statsn
= ntohl(P
->statsn
);
72 ii_datalen
= P
->dlength
[0] << 16 | P
->dlength
[1] << 8 | P
->dlength
[2];
76 #
pragma D binding
"1.5" translator
77 translator iscsiinfo_t
< iscsi_login_hdr_t
*P
> {
78 ii_initiator
= ((idm_conn_t
*)arg0
)->ic_initiator_name
;
79 ii_target
= ((idm_conn_t
*)arg0
)->ic_target_name
;
80 ii_isid
= ((idm_conn_t
*)arg0
)->ic_isid
;
81 ii_tsih
= ((idm_conn_t
*)arg0
)->ic_tsih
;
82 ii_transport
= (((idm_conn_t
*)arg0
)->ic_transport_type
==
83 IDM_TRANSPORT_TYPE_ISER
) ?
"iser-ib" :
84 (((idm_conn_t
*)arg0
)->ic_transport_type
==
85 IDM_TRANSPORT_TYPE_SOCKETS
) ?
"sockets" : "Unknown";
87 ii_itt
= ntohl(P
->itt
);
89 ii_cmdsn
= ntohl(P
->cmdsn
);
90 ii_statsn
= ntohl(P
->expstatsn
);
92 ii_datalen
= P
->dlength
[0] << 16 | P
->dlength
[1] << 8 | P
->dlength
[2];
96 #
pragma D binding
"1.5" translator
97 translator iscsiinfo_t
< iscsi_login_rsp_hdr_t
*P
> {
98 ii_initiator
= ((idm_conn_t
*)arg0
)->ic_initiator_name
;
99 ii_target
= ((idm_conn_t
*)arg0
)->ic_target_name
;
100 ii_isid
= ((idm_conn_t
*)arg0
)->ic_isid
;
101 ii_tsih
= ((idm_conn_t
*)arg0
)->ic_tsih
;
102 ii_transport
= (((idm_conn_t
*)arg0
)->ic_transport_type
==
103 IDM_TRANSPORT_TYPE_ISER
) ?
"iser-ib" :
104 (((idm_conn_t
*)arg0
)->ic_transport_type
==
105 IDM_TRANSPORT_TYPE_SOCKETS
) ?
"sockets" : "Unknown";
107 ii_itt
= ntohl(P
->itt
);
109 ii_cmdsn
= ntohl(P
->expcmdsn
);
110 ii_statsn
= ntohl(P
->statsn
);
112 ii_datalen
= P
->dlength
[0] << 16 | P
->dlength
[1] << 8 | P
->dlength
[2];
116 #
pragma D binding
"1.5" translator
117 translator iscsiinfo_t
< iscsi_logout_hdr_t
*P
> {
118 ii_initiator
= ((idm_conn_t
*)arg0
)->ic_initiator_name
;
119 ii_target
= ((idm_conn_t
*)arg0
)->ic_target_name
;
120 ii_isid
= ((idm_conn_t
*)arg0
)->ic_isid
;
121 ii_tsih
= ((idm_conn_t
*)arg0
)->ic_tsih
;
122 ii_transport
= (((idm_conn_t
*)arg0
)->ic_transport_type
==
123 IDM_TRANSPORT_TYPE_ISER
) ?
"iser-ib" :
124 (((idm_conn_t
*)arg0
)->ic_transport_type
==
125 IDM_TRANSPORT_TYPE_SOCKETS
) ?
"sockets" : "Unknown";
127 ii_itt
= ntohl(P
->itt
);
129 ii_cmdsn
= ntohl(P
->cmdsn
);
130 ii_statsn
= ntohl(P
->expstatsn
);
136 #
pragma D binding
"1.5" translator
137 translator iscsiinfo_t
< iscsi_logout_rsp_hdr_t
*P
> {
138 ii_initiator
= ((idm_conn_t
*)arg0
)->ic_initiator_name
;
139 ii_target
= ((idm_conn_t
*)arg0
)->ic_target_name
;
140 ii_isid
= ((idm_conn_t
*)arg0
)->ic_isid
;
141 ii_tsih
= ((idm_conn_t
*)arg0
)->ic_tsih
;
142 ii_transport
= (((idm_conn_t
*)arg0
)->ic_transport_type
==
143 IDM_TRANSPORT_TYPE_ISER
) ?
"iser-ib" :
144 (((idm_conn_t
*)arg0
)->ic_transport_type
==
145 IDM_TRANSPORT_TYPE_SOCKETS
) ?
"sockets" : "Unknown";
147 ii_itt
= ntohl(P
->itt
);
150 ii_statsn
= ntohl(P
->statsn
);
156 #
pragma D binding
"1.5" translator
157 translator iscsiinfo_t
< iscsi_rtt_hdr_t
*P
> {
158 ii_initiator
= ((idm_conn_t
*)arg0
)->ic_initiator_name
;
159 ii_target
= ((idm_conn_t
*)arg0
)->ic_target_name
;
160 ii_isid
= ((idm_conn_t
*)arg0
)->ic_isid
;
161 ii_tsih
= ((idm_conn_t
*)arg0
)->ic_tsih
;
162 ii_transport
= (((idm_conn_t
*)arg0
)->ic_transport_type
==
163 IDM_TRANSPORT_TYPE_ISER
) ?
"iser-ib" :
164 (((idm_conn_t
*)arg0
)->ic_transport_type
==
165 IDM_TRANSPORT_TYPE_SOCKETS
) ?
"sockets" : "Unknown";
167 ii_itt
= ntohl(P
->itt
);
168 ii_ttt
= ntohl(P
->ttt
);
169 ii_cmdsn
= ntohl(P
->expcmdsn
);
170 ii_statsn
= ntohl(P
->statsn
);
171 ii_datasn
= ntohl(P
->rttsn
);
176 #
pragma D binding
"1.5" translator
177 translator iscsiinfo_t
< iscsi_data_rsp_hdr_t
*P
> {
178 ii_initiator
= ((idm_conn_t
*)arg0
)->ic_initiator_name
;
179 ii_target
= ((idm_conn_t
*)arg0
)->ic_target_name
;
180 ii_isid
= ((idm_conn_t
*)arg0
)->ic_isid
;
181 ii_tsih
= ((idm_conn_t
*)arg0
)->ic_tsih
;
182 ii_transport
= (((idm_conn_t
*)arg0
)->ic_transport_type
==
183 IDM_TRANSPORT_TYPE_ISER
) ?
"iser-ib" :
184 (((idm_conn_t
*)arg0
)->ic_transport_type
==
185 IDM_TRANSPORT_TYPE_SOCKETS
) ?
"sockets" : "Unknown";
186 ii_lun
= (((uint64_t
)P
->lun
[0] << (64 - 0*8 - 8)) +
187 ((uint64_t
)P
->lun
[1] << (64 - 1*8 - 8)) +
188 ((uint64_t
)P
->lun
[2] << (64 - 2*8 - 8)) +
189 ((uint64_t
)P
->lun
[3] << (64 - 3*8 - 8)) +
190 ((uint64_t
)P
->lun
[4] << (64 - 4*8 - 8)) +
191 ((uint64_t
)P
->lun
[5] << (64 - 5*8 - 8)) +
192 ((uint64_t
)P
->lun
[6] << (64 - 6*8 - 8)) +
193 ((uint64_t
)P
->lun
[7] << (64 - 7*8 - 8)));
194 ii_itt
= ntohl(P
->itt
);
195 ii_ttt
= ntohl(P
->ttt
);
196 ii_cmdsn
= ntohl(P
->expcmdsn
);
197 ii_statsn
= ntohl(P
->statsn
);
198 ii_datasn
= ntohl(P
->datasn
);
199 ii_datalen
= P
->dlength
[0] << 16 | P
->dlength
[1] << 8 | P
->dlength
[2];
203 #
pragma D binding
"1.5" translator
204 translator iscsiinfo_t
< iscsi_data_hdr_t
*P
> {
205 ii_initiator
= ((idm_conn_t
*)arg0
)->ic_initiator_name
;
206 ii_target
= ((idm_conn_t
*)arg0
)->ic_target_name
;
207 ii_isid
= ((idm_conn_t
*)arg0
)->ic_isid
;
208 ii_tsih
= ((idm_conn_t
*)arg0
)->ic_tsih
;
209 ii_transport
= (((idm_conn_t
*)arg0
)->ic_transport_type
==
210 IDM_TRANSPORT_TYPE_ISER
) ?
"iser-ib" :
211 (((idm_conn_t
*)arg0
)->ic_transport_type
==
212 IDM_TRANSPORT_TYPE_SOCKETS
) ?
"sockets" : "Unknown";
213 ii_lun
= (((uint64_t
)P
->lun
[0] << (64 - 0*8 - 8)) +
214 ((uint64_t
)P
->lun
[1] << (64 - 1*8 - 8)) +
215 ((uint64_t
)P
->lun
[2] << (64 - 2*8 - 8)) +
216 ((uint64_t
)P
->lun
[3] << (64 - 3*8 - 8)) +
217 ((uint64_t
)P
->lun
[4] << (64 - 4*8 - 8)) +
218 ((uint64_t
)P
->lun
[5] << (64 - 5*8 - 8)) +
219 ((uint64_t
)P
->lun
[6] << (64 - 6*8 - 8)) +
220 ((uint64_t
)P
->lun
[7] << (64 - 7*8 - 8)));
221 ii_itt
= ntohl(P
->itt
);
222 ii_ttt
= ntohl(P
->ttt
);
224 ii_statsn
= ntohl(P
->expstatsn
);
225 ii_datasn
= ntohl(P
->datasn
);
226 ii_datalen
= P
->dlength
[0] << 16 | P
->dlength
[1] << 8 | P
->dlength
[2];
230 #
pragma D binding
"1.5" translator
231 translator iscsiinfo_t
< iscsi_nop_in_hdr_t
*P
> {
232 ii_initiator
= ((idm_conn_t
*)arg0
)->ic_initiator_name
;
233 ii_target
= ((idm_conn_t
*)arg0
)->ic_target_name
;
234 ii_isid
= ((idm_conn_t
*)arg0
)->ic_isid
;
235 ii_tsih
= ((idm_conn_t
*)arg0
)->ic_tsih
;
236 ii_transport
= (((idm_conn_t
*)arg0
)->ic_transport_type
==
237 IDM_TRANSPORT_TYPE_ISER
) ?
"iser-ib" :
238 (((idm_conn_t
*)arg0
)->ic_transport_type
==
239 IDM_TRANSPORT_TYPE_SOCKETS
) ?
"sockets" : "Unknown";
240 ii_lun
= (((uint64_t
)P
->lun
[0] << (64 - 0*8 - 8)) +
241 ((uint64_t
)P
->lun
[1] << (64 - 1*8 - 8)) +
242 ((uint64_t
)P
->lun
[2] << (64 - 2*8 - 8)) +
243 ((uint64_t
)P
->lun
[3] << (64 - 3*8 - 8)) +
244 ((uint64_t
)P
->lun
[4] << (64 - 4*8 - 8)) +
245 ((uint64_t
)P
->lun
[5] << (64 - 5*8 - 8)) +
246 ((uint64_t
)P
->lun
[6] << (64 - 6*8 - 8)) +
247 ((uint64_t
)P
->lun
[7] << (64 - 7*8 - 8)));
248 ii_itt
= ntohl(P
->itt
);
249 ii_ttt
= ntohl(P
->ttt
);
250 ii_cmdsn
= ntohl(P
->expcmdsn
);
251 ii_statsn
= ntohl(P
->statsn
);
253 ii_datalen
= P
->dlength
[0] << 16 | P
->dlength
[1] << 8 | P
->dlength
[2];
257 #
pragma D binding
"1.5" translator
258 translator iscsiinfo_t
< iscsi_nop_out_hdr_t
*P
> {
259 ii_initiator
= ((idm_conn_t
*)arg0
)->ic_initiator_name
;
260 ii_target
= ((idm_conn_t
*)arg0
)->ic_target_name
;
261 ii_isid
= ((idm_conn_t
*)arg0
)->ic_isid
;
262 ii_tsih
= ((idm_conn_t
*)arg0
)->ic_tsih
;
263 ii_transport
= (((idm_conn_t
*)arg0
)->ic_transport_type
==
264 IDM_TRANSPORT_TYPE_ISER
) ?
"iser-ib" :
265 (((idm_conn_t
*)arg0
)->ic_transport_type
==
266 IDM_TRANSPORT_TYPE_SOCKETS
) ?
"sockets" : "Unknown";
267 ii_lun
= (((uint64_t
)P
->lun
[0] << (64 - 0*8 - 8)) +
268 ((uint64_t
)P
->lun
[1] << (64 - 1*8 - 8)) +
269 ((uint64_t
)P
->lun
[2] << (64 - 2*8 - 8)) +
270 ((uint64_t
)P
->lun
[3] << (64 - 3*8 - 8)) +
271 ((uint64_t
)P
->lun
[4] << (64 - 4*8 - 8)) +
272 ((uint64_t
)P
->lun
[5] << (64 - 5*8 - 8)) +
273 ((uint64_t
)P
->lun
[6] << (64 - 6*8 - 8)) +
274 ((uint64_t
)P
->lun
[7] << (64 - 7*8 - 8)));
275 ii_itt
= ntohl(P
->itt
);
276 ii_ttt
= ntohl(P
->ttt
);
277 ii_cmdsn
= ntohl(P
->cmdsn
);
278 ii_statsn
= ntohl(P
->expstatsn
);
280 ii_datalen
= P
->dlength
[0] << 16 | P
->dlength
[1] << 8 | P
->dlength
[2];
284 #
pragma D binding
"1.5" translator
285 translator iscsiinfo_t
< iscsi_scsi_cmd_hdr_t
*P
> {
286 ii_initiator
= ((idm_conn_t
*)arg0
)->ic_initiator_name
;
287 ii_target
= ((idm_conn_t
*)arg0
)->ic_target_name
;
288 ii_isid
= ((idm_conn_t
*)arg0
)->ic_isid
;
289 ii_tsih
= ((idm_conn_t
*)arg0
)->ic_tsih
;
290 ii_transport
= (((idm_conn_t
*)arg0
)->ic_transport_type
==
291 IDM_TRANSPORT_TYPE_ISER
) ?
"iser-ib" :
292 (((idm_conn_t
*)arg0
)->ic_transport_type
==
293 IDM_TRANSPORT_TYPE_SOCKETS
) ?
"sockets" : "Unknown";
294 ii_lun
= (((uint64_t
)P
->lun
[0] << (64 - 0*8 - 8)) +
295 ((uint64_t
)P
->lun
[1] << (64 - 1*8 - 8)) +
296 ((uint64_t
)P
->lun
[2] << (64 - 2*8 - 8)) +
297 ((uint64_t
)P
->lun
[3] << (64 - 3*8 - 8)) +
298 ((uint64_t
)P
->lun
[4] << (64 - 4*8 - 8)) +
299 ((uint64_t
)P
->lun
[5] << (64 - 5*8 - 8)) +
300 ((uint64_t
)P
->lun
[6] << (64 - 6*8 - 8)) +
301 ((uint64_t
)P
->lun
[7] << (64 - 7*8 - 8)));
302 ii_itt
= ntohl(P
->itt
);
304 ii_cmdsn
= ntohl(P
->cmdsn
);
305 ii_statsn
= ntohl(P
->expstatsn
);
307 ii_datalen
= P
->dlength
[0] << 16 | P
->dlength
[1] << 8 | P
->dlength
[2];
311 #
pragma D binding
"1.5" translator
312 translator iscsiinfo_t
< iscsi_scsi_rsp_hdr_t
*P
> {
313 ii_initiator
= ((idm_conn_t
*)arg0
)->ic_initiator_name
;
314 ii_target
= ((idm_conn_t
*)arg0
)->ic_target_name
;
315 ii_isid
= ((idm_conn_t
*)arg0
)->ic_isid
;
316 ii_tsih
= ((idm_conn_t
*)arg0
)->ic_tsih
;
317 ii_transport
= (((idm_conn_t
*)arg0
)->ic_transport_type
==
318 IDM_TRANSPORT_TYPE_ISER
) ?
"iser-ib" :
319 (((idm_conn_t
*)arg0
)->ic_transport_type
==
320 IDM_TRANSPORT_TYPE_SOCKETS
) ?
"sockets" : "Unknown";
322 ii_itt
= ntohl(P
->itt
);
324 ii_cmdsn
= ntohl(P
->expcmdsn
);
325 ii_statsn
= ntohl(P
->statsn
);
326 ii_datasn
= ntohl(P
->expdatasn
);
327 ii_datalen
= P
->dlength
[0] << 16 | P
->dlength
[1] << 8 | P
->dlength
[2];
331 #
pragma D binding
"1.5" translator
332 translator iscsiinfo_t
< iscsi_scsi_task_mgt_hdr_t
*P
> {
333 ii_initiator
= ((idm_conn_t
*)arg0
)->ic_initiator_name
;
334 ii_target
= ((idm_conn_t
*)arg0
)->ic_target_name
;
335 ii_isid
= ((idm_conn_t
*)arg0
)->ic_isid
;
336 ii_tsih
= ((idm_conn_t
*)arg0
)->ic_tsih
;
337 ii_transport
= (((idm_conn_t
*)arg0
)->ic_transport_type
==
338 IDM_TRANSPORT_TYPE_ISER
) ?
"iser-ib" :
339 (((idm_conn_t
*)arg0
)->ic_transport_type
==
340 IDM_TRANSPORT_TYPE_SOCKETS
) ?
"sockets" : "Unknown";
341 ii_lun
= (((uint64_t
)P
->lun
[0] << (64 - 0*8 - 8)) +
342 ((uint64_t
)P
->lun
[1] << (64 - 1*8 - 8)) +
343 ((uint64_t
)P
->lun
[2] << (64 - 2*8 - 8)) +
344 ((uint64_t
)P
->lun
[3] << (64 - 3*8 - 8)) +
345 ((uint64_t
)P
->lun
[4] << (64 - 4*8 - 8)) +
346 ((uint64_t
)P
->lun
[5] << (64 - 5*8 - 8)) +
347 ((uint64_t
)P
->lun
[6] << (64 - 6*8 - 8)) +
348 ((uint64_t
)P
->lun
[7] << (64 - 7*8 - 8)));
349 ii_itt
= ntohl(P
->itt
);
350 ii_ttt
= ntohl(P
->rtt
);
351 ii_cmdsn
= ntohl(P
->cmdsn
);
352 ii_statsn
= ntohl(P
->expstatsn
);
358 #
pragma D binding
"1.5" translator
359 translator iscsiinfo_t
< iscsi_scsi_task_mgt_rsp_hdr_t
*P
> {
360 ii_initiator
= ((idm_conn_t
*)arg0
)->ic_initiator_name
;
361 ii_target
= ((idm_conn_t
*)arg0
)->ic_target_name
;
362 ii_isid
= ((idm_conn_t
*)arg0
)->ic_isid
;
363 ii_tsih
= ((idm_conn_t
*)arg0
)->ic_tsih
;
364 ii_transport
= (((idm_conn_t
*)arg0
)->ic_transport_type
==
365 IDM_TRANSPORT_TYPE_ISER
) ?
"iser-ib" :
366 (((idm_conn_t
*)arg0
)->ic_transport_type
==
367 IDM_TRANSPORT_TYPE_SOCKETS
) ?
"sockets" : "Unknown";
369 ii_itt
= ntohl(P
->itt
);
370 ii_ttt
= ntohl(P
->rtt
);
371 ii_cmdsn
= ntohl(P
->expcmdsn
);
372 ii_statsn
= ntohl(P
->statsn
);
374 ii_datalen
= P
->dlength
[0] << 16 | P
->dlength
[1] << 8 | P
->dlength
[2];
378 #
pragma D binding
"1.5" translator
379 translator iscsiinfo_t
< iscsi_text_hdr_t
*P
> {
380 ii_initiator
= ((idm_conn_t
*)arg0
)->ic_initiator_name
;
381 ii_target
= ((idm_conn_t
*)arg0
)->ic_target_name
;
382 ii_isid
= ((idm_conn_t
*)arg0
)->ic_isid
;
383 ii_tsih
= ((idm_conn_t
*)arg0
)->ic_tsih
;
384 ii_transport
= (((idm_conn_t
*)arg0
)->ic_transport_type
==
385 IDM_TRANSPORT_TYPE_ISER
) ?
"iser-ib" :
386 (((idm_conn_t
*)arg0
)->ic_transport_type
==
387 IDM_TRANSPORT_TYPE_SOCKETS
) ?
"sockets" : "Unknown";
389 ii_itt
= ntohl(P
->itt
);
390 ii_ttt
= ntohl(P
->ttt
);
391 ii_cmdsn
= ntohl(P
->cmdsn
);
392 ii_statsn
= ntohl(P
->expstatsn
);
394 ii_datalen
= P
->dlength
[0] << 16 | P
->dlength
[1] << 8 | P
->dlength
[2];
398 #
pragma D binding
"1.5" translator
399 translator iscsiinfo_t
< iscsi_text_rsp_hdr_t
*P
> {
400 ii_initiator
= ((idm_conn_t
*)arg0
)->ic_initiator_name
;
401 ii_target
= ((idm_conn_t
*)arg0
)->ic_target_name
;
402 ii_isid
= ((idm_conn_t
*)arg0
)->ic_isid
;
403 ii_tsih
= ((idm_conn_t
*)arg0
)->ic_tsih
;
404 ii_transport
= (((idm_conn_t
*)arg0
)->ic_transport_type
==
405 IDM_TRANSPORT_TYPE_ISER
) ?
"iser-ib" :
406 (((idm_conn_t
*)arg0
)->ic_transport_type
==
407 IDM_TRANSPORT_TYPE_SOCKETS
) ?
"sockets" : "Unknown";
409 ii_itt
= ntohl(P
->itt
);
410 ii_ttt
= ntohl(P
->ttt
);
411 ii_cmdsn
= ntohl(P
->expcmdsn
);
412 ii_statsn
= ntohl(P
->statsn
);
414 ii_datalen
= P
->dlength
[0] << 16 | P
->dlength
[1] << 8 | P
->dlength
[2];
418 #
pragma D binding
"1.5" translator
419 translator iscsiinfo_t
< idm_conn_t
*P
> {
420 ii_initiator
= P
->ic_initiator_name
;
421 ii_target
= P
->ic_target_name
;
422 ii_isid
= P
->ic_isid
;
423 ii_tsih
= ((idm_conn_t
*)arg0
)->ic_tsih
;
424 ii_transport
= (P
->ic_transport_type
==
425 IDM_TRANSPORT_TYPE_ISER
) ?
"iser-ib" :
426 (P
->ic_transport_type
==
427 IDM_TRANSPORT_TYPE_SOCKETS
) ?
"sockets" : "Unknown";
438 #
pragma D binding
"1.5" translator
439 translator xferinfo_t
< uintptr_t P
> {
440 xfer_laddr
= (arg1
== NULL
) ?
0xffffffff : (uintptr_t
)arg1
;
442 xfer_lkey
= 0; /* not used */
450 inline
int IDM_TRANSPORT_TYPE_ISER
= 0;
451 #
pragma D binding
"1.5" IDM_TRANSPORT_TYPE_ISER
452 inline
int IDM_TRANSPORT_TYPE_SOCKETS
= 1;
453 #
pragma D binding
"1.5" IDM_TRANSPORT_TYPE_SOCKETS