#ifndef IB_ADDR_H
#define IB_ADDR_H
#include <linux/ethtool.h>
#include <linux/in.h>
#include <linux/in6.h>
#include <linux/if_arp.h>
#include <linux/netdevice.h>
#include <linux/inetdevice.h>
#include <linux/socket.h>
#include <linux/if_vlan.h>
#include <net/ipv6.h>
#include <net/if_inet6.h>
#include <net/ip.h>
#include <rdma/ib_verbs.h>
#include <rdma/ib_pack.h>
#include <net/net_namespace.h>
struct rdma_dev_addr { … };
int rdma_translate_ip(const struct sockaddr *addr,
struct rdma_dev_addr *dev_addr);
int rdma_resolve_ip(struct sockaddr *src_addr, const struct sockaddr *dst_addr,
struct rdma_dev_addr *addr, unsigned long timeout_ms,
void (*callback)(int status, struct sockaddr *src_addr,
struct rdma_dev_addr *addr, void *context),
bool resolve_by_gid_attr, void *context);
void rdma_addr_cancel(struct rdma_dev_addr *addr);
int rdma_addr_size(const struct sockaddr *addr);
int rdma_addr_size_in6(struct sockaddr_in6 *addr);
int rdma_addr_size_kss(struct __kernel_sockaddr_storage *addr);
static inline u16 ib_addr_get_pkey(struct rdma_dev_addr *dev_addr)
{ … }
static inline void ib_addr_set_pkey(struct rdma_dev_addr *dev_addr, u16 pkey)
{ … }
static inline void ib_addr_get_mgid(struct rdma_dev_addr *dev_addr,
union ib_gid *gid)
{ … }
static inline int rdma_addr_gid_offset(struct rdma_dev_addr *dev_addr)
{ … }
static inline u16 rdma_vlan_dev_vlan_id(const struct net_device *dev)
{ … }
static inline int rdma_ip2gid(struct sockaddr *addr, union ib_gid *gid)
{ … }
static inline void rdma_gid2ip(struct sockaddr *out, const union ib_gid *gid)
{ … }
static inline void rdma_addr_get_sgid(struct rdma_dev_addr *dev_addr, union ib_gid *gid)
{ … }
static inline void rdma_addr_set_sgid(struct rdma_dev_addr *dev_addr, union ib_gid *gid)
{ … }
static inline void rdma_addr_get_dgid(struct rdma_dev_addr *dev_addr, union ib_gid *gid)
{ … }
static inline void rdma_addr_set_dgid(struct rdma_dev_addr *dev_addr, union ib_gid *gid)
{ … }
static inline enum ib_mtu iboe_get_mtu(int mtu)
{ … }
static inline int rdma_link_local_addr(struct in6_addr *addr)
{ … }
static inline void rdma_get_ll_mac(struct in6_addr *addr, u8 *mac)
{ … }
static inline int rdma_is_multicast_addr(struct in6_addr *addr)
{ … }
static inline void rdma_get_mcast_mac(struct in6_addr *addr, u8 *mac)
{ … }
static inline u16 rdma_get_vlan_id(union ib_gid *dgid)
{ … }
static inline struct net_device *rdma_vlan_dev_real_dev(const struct net_device *dev)
{ … }
#endif