linux/drivers/infiniband/sw/siw/siw_cm.h

/* SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause */

/* Authors: Bernard Metzler <[email protected]> */
/*          Greg Joyce <[email protected]> */
/* Copyright (c) 2008-2019, IBM Corporation */
/* Copyright (c) 2017, Open Grid Computing, Inc. */

#ifndef _SIW_CM_H
#define _SIW_CM_H

#include <net/sock.h>
#include <linux/tcp.h>

#include <rdma/iw_cm.h>

enum siw_cep_state {};

struct siw_mpa_info {};

struct siw_device;

struct siw_cep {};

/*
 * Connection initiator waits 10 seconds to receive an
 * MPA reply after sending out MPA request. Reponder waits for
 * 5 seconds for MPA request to arrive if new TCP connection
 * was set up.
 */
#define MPAREQ_TIMEOUT
#define MPAREP_TIMEOUT

enum siw_work_type {};

struct siw_cm_work {};

#define to_sockaddr_in(a)
#define to_sockaddr_in6(a)

static inline int getname_peer(struct socket *s, struct sockaddr_storage *a)
{}

static inline int getname_local(struct socket *s, struct sockaddr_storage *a)
{}

static inline int ksock_recv(struct socket *sock, char *buf, size_t size,
			     int flags)
{}

int siw_connect(struct iw_cm_id *id, struct iw_cm_conn_param *parm);
int siw_accept(struct iw_cm_id *id, struct iw_cm_conn_param *param);
int siw_reject(struct iw_cm_id *id, const void *data, u8 len);
int siw_create_listen(struct iw_cm_id *id, int backlog);
int siw_destroy_listen(struct iw_cm_id *id);

void siw_cep_get(struct siw_cep *cep);
void siw_cep_put(struct siw_cep *cep);
int siw_cm_queue_work(struct siw_cep *cep, enum siw_work_type type);

int siw_cm_init(void);
void siw_cm_exit(void);

/*
 * TCP socket interface
 */
#define sk_to_qp(sk)
#define sk_to_cep(sk)

#endif