10Sstevel@tonic-gate/*
20Sstevel@tonic-gate * Copyright (c) 2005 Network Appliance, Inc. All rights reserved.
30Sstevel@tonic-gate * Copyright (c) 2005 Open Grid Computing, Inc. All rights reserved.
40Sstevel@tonic-gate *
56812Sraf * This software is available to you under a choice of one of two
66812Sraf * licenses.  You may choose to be licensed under the terms of the GNU
70Sstevel@tonic-gate * General Public License (GPL) Version 2, available from the file
80Sstevel@tonic-gate * COPYING in the main directory of this source tree, or the
90Sstevel@tonic-gate * OpenIB.org BSD license below:
100Sstevel@tonic-gate *
110Sstevel@tonic-gate *     Redistribution and use in source and binary forms, with or
120Sstevel@tonic-gate *     without modification, are permitted provided that the following
130Sstevel@tonic-gate *     conditions are met:
140Sstevel@tonic-gate *
150Sstevel@tonic-gate *      - Redistributions of source code must retain the above
160Sstevel@tonic-gate *        copyright notice, this list of conditions and the following
170Sstevel@tonic-gate *        disclaimer.
180Sstevel@tonic-gate *
190Sstevel@tonic-gate *      - Redistributions in binary form must reproduce the above
200Sstevel@tonic-gate *        copyright notice, this list of conditions and the following
216812Sraf *        disclaimer in the documentation and/or other materials
220Sstevel@tonic-gate *        provided with the distribution.
236812Sraf *
240Sstevel@tonic-gate * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
250Sstevel@tonic-gate * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
260Sstevel@tonic-gate * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
270Sstevel@tonic-gate * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
280Sstevel@tonic-gate * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
290Sstevel@tonic-gate * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
306812Sraf * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
310Sstevel@tonic-gate * SOFTWARE.
326812Sraf */
336812Sraf#ifndef IWCM_H
340Sstevel@tonic-gate#define IWCM_H
356812Sraf
360Sstevel@tonic-gateenum iw_cm_state {
370Sstevel@tonic-gate	IW_CM_STATE_IDLE,             /* unbound, inactive */
380Sstevel@tonic-gate	IW_CM_STATE_LISTEN,           /* listen waiting for connect */
390Sstevel@tonic-gate	IW_CM_STATE_CONN_RECV,        /* inbound waiting for user accept */
400Sstevel@tonic-gate	IW_CM_STATE_CONN_SENT,        /* outbound waiting for peer accept */
410Sstevel@tonic-gate	IW_CM_STATE_ESTABLISHED,      /* established */
420Sstevel@tonic-gate	IW_CM_STATE_CLOSING,	      /* disconnect */
430Sstevel@tonic-gate	IW_CM_STATE_DESTROYING        /* object being deleted */
440Sstevel@tonic-gate};
450Sstevel@tonic-gate
460Sstevel@tonic-gatestruct iwcm_id_private {
470Sstevel@tonic-gate	struct iw_cm_id	id;
480Sstevel@tonic-gate	enum iw_cm_state state;
490Sstevel@tonic-gate	unsigned long flags;
500Sstevel@tonic-gate	struct ib_qp *qp;
510Sstevel@tonic-gate	struct completion destroy_comp;
520Sstevel@tonic-gate	wait_queue_head_t connect_wait;
530Sstevel@tonic-gate	struct list_head work_list;
540Sstevel@tonic-gate	spinlock_t lock;
550Sstevel@tonic-gate	atomic_t refcount;
560Sstevel@tonic-gate	struct list_head work_free_list;
570Sstevel@tonic-gate};
580Sstevel@tonic-gate
590Sstevel@tonic-gate#define IWCM_F_CALLBACK_DESTROY   1
600Sstevel@tonic-gate#define IWCM_F_CONNECT_WAIT       2
610Sstevel@tonic-gate
620Sstevel@tonic-gate#endif /* IWCM_H */
630Sstevel@tonic-gate