2 * Copyright (c) 2005 Mellanox Technologies. All rights reserved.
\r
3 * Copyright (c) 2005 SilverStorm Technologies. All rights reserved.
\r
5 * This software is available to you under the OpenIB.org BSD license
\r
8 * Redistribution and use in source and binary forms, with or
\r
9 * without modification, are permitted provided that the following
\r
10 * conditions are met:
\r
12 * - Redistributions of source code must retain the above
\r
13 * copyright notice, this list of conditions and the following
\r
16 * - Redistributions in binary form must reproduce the above
\r
17 * copyright notice, this list of conditions and the following
\r
18 * disclaimer in the documentation and/or other materials
\r
19 * provided with the distribution.
\r
21 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
\r
22 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
\r
23 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
\r
24 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
\r
25 * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
\r
26 * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
\r
27 * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
\r
33 /* This file is shared between user- and kernel-mode */
\r
35 #include <iba/ib_types.h>
\r
38 #ifndef _IB_AT_IOCTL_H_
\r
39 #define _IB_AT_IOCTL_H_
\r
42 #define IBAT_IOCTL_VERSION 4
\r
44 #define IBAT_MAC_LEN 6
\r
47 #define IOCTL_IBAT( n ) \
\r
48 CTL_CODE( FILE_DEVICE_UNKNOWN, (0x800 + n), \
\r
49 METHOD_BUFFERED, FILE_ANY_ACCESS )
\r
51 /** This IRP is used to return all available CAs ports number
\r
53 #define IOCTL_IBAT_PORTS IOCTL_IBAT( 1 )
\r
55 typedef struct _IBAT_PORT_RECORD
\r
63 typedef struct _IOCTL_IBAT_PORTS_IN
\r
67 } IOCTL_IBAT_PORTS_IN;
\r
69 typedef struct _IOCTL_IBAT_PORTS_OUT
\r
71 /** Total size, of the output buffer needed if the
\r
72 * suplied buffer wasn't enough */
\r
75 IBAT_PORT_RECORD Ports[1];
\r
77 } IOCTL_IBAT_PORTS_OUT;
\r
80 /** This IRP is used to return all the ip addresses that
\r
81 * are assigned to a port */
\r
82 #define IOCTL_IBAT_IP_ADDRESSES IOCTL_IBAT( 2 )
\r
84 typedef struct _IOCTL_IBAT_IP_ADDRESSES_IN
\r
87 /** The guid of the port that we are querying for. May be
\r
88 * zero if querying for IP addresses of all ports. */
\r
91 } IOCTL_IBAT_IP_ADDRESSES_IN;
\r
93 typedef struct _IP_ADDRESS
\r
95 /** Might only be 4 or 6 */
\r
97 /** Sized to support both IPv4 and IPv6 */
\r
102 typedef struct _IOCTL_IBAT_IP_ADDRESSES_OUT
\r
104 /** Total size of the output buffer needed if the
\r
105 * suplied buffer wasn't enough */
\r
108 IP_ADDRESS Address[1];
\r
110 } IOCTL_IBAT_IP_ADDRESSES_OUT;
\r
113 /** This IRP is used to convert a remote MAC addresses to a remote GID */
\r
114 #define IOCTL_IBAT_MAC_TO_GID IOCTL_IBAT( 3 )
\r
116 typedef struct _IOCTL_IBAT_MAC_TO_GID_IN
\r
120 UCHAR DestMac[IBAT_MAC_LEN];
\r
122 } IOCTL_IBAT_MAC_TO_GID_IN;
\r
124 typedef struct _IOCTL_IBAT_MAC_TO_GID_OUT
\r
128 } IOCTL_IBAT_MAC_TO_GID_OUT;
\r
131 #define IBAT_DEV_NAME L"\\Device\\ibat"
\r
132 #define IBAT_DOS_DEV_NAME L"\\DosDevices\\Global\\ibat"
\r
133 #define IBAT_WIN32_NAME L"\\\\.\\ibat"
\r
135 #endif /* _IB_AT_IOCTL_H_ */
\r