linux/include/rdma/ib.h

/* SPDX-License-Identifier: GPL-2.0 OR Linux-OpenIB */
/*
 * Copyright (c) 2010 Intel Corporation.  All rights reserved.
 */

#ifndef _RDMA_IB_H
#define _RDMA_IB_H

#include <linux/types.h>
#include <linux/sched.h>
#include <linux/cred.h>
#include <linux/uaccess.h>
#include <linux/fs.h>

struct ib_addr {};

static inline bool ib_addr_any(const struct ib_addr *a)
{}

static inline bool ib_addr_loopback(const struct ib_addr *a)
{}

static inline void ib_addr_set(struct ib_addr *addr,
			       __be32 w1, __be32 w2, __be32 w3, __be32 w4)
{}

static inline int ib_addr_cmp(const struct ib_addr *a1, const struct ib_addr *a2)
{}

struct sockaddr_ib {};

/*
 * The IB interfaces that use write() as bi-directional ioctl() are
 * fundamentally unsafe, since there are lots of ways to trigger "write()"
 * calls from various contexts with elevated privileges. That includes the
 * traditional suid executable error message writes, but also various kernel
 * interfaces that can write to file descriptors.
 *
 * This function provides protection for the legacy API by restricting the
 * calling context.
 */
static inline bool ib_safe_file_access(struct file *filp)
{}

#endif /* _RDMA_IB_H */