Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Typedefs | Enumerations | Functions
iw_cm.h File Reference
#include <linux/in.h>
#include <rdma/ib_cm.h>

Go to the source code of this file.

Data Structures

struct  iw_cm_event
 
struct  iw_cm_id
 
struct  iw_cm_conn_param
 
struct  iw_cm_verbs
 

Typedefs

typedef int(* iw_cm_handler )(struct iw_cm_id *cm_id, struct iw_cm_event *event)
 
typedef int(* iw_event_handler )(struct iw_cm_id *cm_id, struct iw_cm_event *event)
 

Enumerations

enum  iw_cm_event_type {
  IW_CM_EVENT_CONNECT_REQUEST = 1, IW_CM_EVENT_CONNECT_REPLY, IW_CM_EVENT_ESTABLISHED, IW_CM_EVENT_DISCONNECT,
  IW_CM_EVENT_CLOSE
}
 

Functions

struct iw_cm_idiw_create_cm_id (struct ib_device *device, iw_cm_handler cm_handler, void *context)
 
void iw_destroy_cm_id (struct iw_cm_id *cm_id)
 
void iw_cm_unbind_qp (struct iw_cm_id *cm_id, struct ib_qp *qp)
 
struct ib_qpiw_cm_get_qp (struct ib_device *device, int qpn)
 
int iw_cm_listen (struct iw_cm_id *cm_id, int backlog)
 
int iw_cm_accept (struct iw_cm_id *cm_id, struct iw_cm_conn_param *iw_param)
 
int iw_cm_reject (struct iw_cm_id *cm_id, const void *private_data, u8 private_data_len)
 
int iw_cm_connect (struct iw_cm_id *cm_id, struct iw_cm_conn_param *iw_param)
 
int iw_cm_disconnect (struct iw_cm_id *cm_id, int abrupt)
 
int iw_cm_init_qp_attr (struct iw_cm_id *cm_id, struct ib_qp_attr *qp_attr, int *qp_attr_mask)
 

Typedef Documentation

typedef int(* iw_cm_handler)(struct iw_cm_id *cm_id, struct iw_cm_event *event)

iw_cm_handler - Function to be called by the IW CM when delivering events to the client.

: The IW CM identifier associated with the event. : Pointer to the event structure.

Definition at line 68 of file iw_cm.h.

typedef int(* iw_event_handler)(struct iw_cm_id *cm_id, struct iw_cm_event *event)

iw_event_handler - Function called by the provider when delivering provider events to the IW CM. Returns either 0 indicating the event was processed or -errno if the event could not be processed.

: The IW CM identifier associated with the event. : Pointer to the event structure.

Definition at line 79 of file iw_cm.h.

Enumeration Type Documentation

Enumerator:
IW_CM_EVENT_CONNECT_REQUEST 
IW_CM_EVENT_CONNECT_REPLY 
IW_CM_EVENT_ESTABLISHED 
IW_CM_EVENT_DISCONNECT 
IW_CM_EVENT_CLOSE 

Definition at line 41 of file iw_cm.h.

Function Documentation

int iw_cm_accept ( struct iw_cm_id cm_id,
struct iw_cm_conn_param iw_param 
)

iw_cm_accept - Called to accept an incoming connect request.

: The IW CM identifier associated with the connection request. : Pointer to a structure containing connection establishment parameters.

The specified cm_id will have been provided in the event data for a CONNECT_REQUEST event. Subsequent events related to this connection will be delivered to the specified IW CM identifier prior and may occur prior to the return of this function. If this function returns a non-zero value, the client can assume that no events will be delivered to the specified IW CM identifier.

Definition at line 488 of file iwcm.c.

int iw_cm_connect ( struct iw_cm_id cm_id,
struct iw_cm_conn_param iw_param 
)

iw_cm_connect - Called to request a connection to a remote peer.

: The IW CM identifier for the connection. : Pointer to a structure containing connection establishment parameters.

Events may be delivered to the specified IW CM identifier prior to the return of this function. If this function returns a non-zero value, the client can assume that no events will be delivered to the specified IW CM identifier.

Definition at line 544 of file iwcm.c.

int iw_cm_disconnect ( struct iw_cm_id cm_id,
int  abrupt 
)

iw_cm_disconnect - Close the specified connection.

: The IW CM identifier to close. : If 0, the connection will be closed gracefully, otherwise, the connection will be reset.

The IW CM identifier is still active until the IW_CM_EVENT_CLOSE event is delivered.

Definition at line 259 of file iwcm.c.

struct ib_qp* iw_cm_get_qp ( struct ib_device device,
int  qpn 
)
read

iw_cm_get_qp - Return the ib_qp associated with a QPN

: The IB device : The queue pair number

int iw_cm_init_qp_attr ( struct iw_cm_id cm_id,
struct ib_qp_attr qp_attr,
int qp_attr_mask 
)

iw_cm_init_qp_attr - Called to initialize the attributes of the QP associated with a IW CM identifier.

: The IW CM identifier associated with the QP : Pointer to the QP attributes structure. : Pointer to a bit vector specifying which QP attributes are valid.

Definition at line 993 of file iwcm.c.

int iw_cm_listen ( struct iw_cm_id cm_id,
int  backlog 
)

iw_cm_listen - Listen for incoming connection requests on the specified IW CM id.

: The IW CM identifier. : The maximum number of outstanding un-accepted inbound listen requests to queue.

The source address and port number are specified in the IW CM identifier structure.

Definition at line 414 of file iwcm.c.

int iw_cm_reject ( struct iw_cm_id cm_id,
const void private_data,
u8  private_data_len 
)

iw_cm_reject - Reject an incoming connection request.

: Connection identifier associated with the request. : Pointer to data to deliver to the remote peer as part of the reject message. : The number of bytes in the private_data parameter.

The client can assume that no events will be delivered to the specified IW CM identifier following the return of this function. The private_data buffer is available for reuse when this function returns.

Definition at line 450 of file iwcm.c.

void iw_cm_unbind_qp ( struct iw_cm_id cm_id,
struct ib_qp qp 
)

iw_cm_bind_qp - Unbind the specified IW CM identifier and QP

: The IW CM idenfier to unbind from the QP. : The QP

This is called by the provider when destroying the QP to ensure that any references held by the IWCM are released. It may also be called by the IWCM when destroying a CM_ID to that any references held by the provider are released.

struct iw_cm_id* iw_create_cm_id ( struct ib_device device,
iw_cm_handler  cm_handler,
void context 
)
read

iw_create_cm_id - Create an IW CM identifier.

: The IB device on which to create the IW CM identier. : User callback invoked to report events associated with the returned IW CM identifier. : User specified context associated with the id.

Definition at line 194 of file iwcm.c.

void iw_destroy_cm_id ( struct iw_cm_id cm_id)

iw_destroy_cm_id - Destroy an IW CM identifier.

: The previously created IW CM identifier to destroy.

The client can assume that no events will be delivered for the CM ID after this function returns.

Definition at line 393 of file iwcm.c.