Back to home page

OSCL-LXR

 
 

    


0001 /*
0002  * Copyright (c) 2005 Network Appliance, Inc. All rights reserved.
0003  * Copyright (c) 2005 Open Grid Computing, Inc. All rights reserved.
0004  *
0005  * This software is available to you under a choice of one of two
0006  * licenses.  You may choose to be licensed under the terms of the GNU
0007  * General Public License (GPL) Version 2, available from the file
0008  * COPYING in the main directory of this source tree, or the
0009  * OpenIB.org BSD license below:
0010  *
0011  *     Redistribution and use in source and binary forms, with or
0012  *     without modification, are permitted provided that the following
0013  *     conditions are met:
0014  *
0015  *      - Redistributions of source code must retain the above
0016  *        copyright notice, this list of conditions and the following
0017  *        disclaimer.
0018  *
0019  *      - Redistributions in binary form must reproduce the above
0020  *        copyright notice, this list of conditions and the following
0021  *        disclaimer in the documentation and/or other materials
0022  *        provided with the distribution.
0023  *
0024  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
0025  * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
0026  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
0027  * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
0028  * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
0029  * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
0030  * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
0031  * SOFTWARE.
0032  */
0033 #ifndef IWCM_H
0034 #define IWCM_H
0035 
0036 enum iw_cm_state {
0037     IW_CM_STATE_IDLE,             /* unbound, inactive */
0038     IW_CM_STATE_LISTEN,           /* listen waiting for connect */
0039     IW_CM_STATE_CONN_RECV,        /* inbound waiting for user accept */
0040     IW_CM_STATE_CONN_SENT,        /* outbound waiting for peer accept */
0041     IW_CM_STATE_ESTABLISHED,      /* established */
0042     IW_CM_STATE_CLOSING,          /* disconnect */
0043     IW_CM_STATE_DESTROYING        /* object being deleted */
0044 };
0045 
0046 struct iwcm_id_private {
0047     struct iw_cm_id id;
0048     enum iw_cm_state state;
0049     unsigned long flags;
0050     struct ib_qp *qp;
0051     struct completion destroy_comp;
0052     wait_queue_head_t connect_wait;
0053     struct list_head work_list;
0054     spinlock_t lock;
0055     refcount_t refcount;
0056     struct list_head work_free_list;
0057 };
0058 
0059 #define IWCM_F_DROP_EVENTS    1
0060 #define IWCM_F_CONNECT_WAIT       2
0061 
0062 #endif /* IWCM_H */