1331772Shselasky/*- 2331772Shselasky * SPDX-License-Identifier: BSD-2-Clause OR GPL-2.0 3331772Shselasky * 4319974Shselasky * Copyright (c) 2014 Intel Corporation. All rights reserved. 5319974Shselasky * Copyright (c) 2014 Chelsio, Inc. All rights reserved. 6319974Shselasky * 7319974Shselasky * This software is available to you under a choice of one of two 8319974Shselasky * licenses. You may choose to be licensed under the terms of the GNU 9319974Shselasky * General Public License (GPL) Version 2, available from the file 10319974Shselasky * COPYING in the main directory of this source tree, or the 11319974Shselasky * OpenIB.org BSD license below: 12319974Shselasky * 13319974Shselasky * Redistribution and use in source and binary forms, with or 14319974Shselasky * without modification, are permitted provided that the following 15319974Shselasky * conditions are met: 16319974Shselasky * 17319974Shselasky * - Redistributions of source code must retain the above 18319974Shselasky * copyright notice, this list of conditions and the following 19319974Shselasky * disclaimer. 20319974Shselasky * 21319974Shselasky * - Redistributions in binary form must reproduce the above 22319974Shselasky * copyright notice, this list of conditions and the following 23319974Shselasky * disclaimer in the documentation and/or other materials 24319974Shselasky * provided with the distribution. 25319974Shselasky * 26319974Shselasky * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 27319974Shselasky * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 28319974Shselasky * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 29319974Shselasky * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS 30319974Shselasky * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN 31319974Shselasky * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 32319974Shselasky * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 33319974Shselasky * SOFTWARE. 34331772Shselasky * 35331772Shselasky * $FreeBSD: stable/11/sys/ofed/include/rdma/iw_portmap.h 331772 2018-03-30 18:17:33Z hselasky $ 36319974Shselasky */ 37331772Shselasky 38319974Shselasky#ifndef _IW_PORTMAP_H 39319974Shselasky#define _IW_PORTMAP_H 40319974Shselasky 41319974Shselasky#define IWPM_ULIBNAME_SIZE 32 42319974Shselasky#define IWPM_DEVNAME_SIZE 32 43319974Shselasky#define IWPM_IFNAME_SIZE 16 44319974Shselasky#define IWPM_IPADDR_SIZE 16 45319974Shselasky 46319974Shselaskyenum { 47319974Shselasky IWPM_INVALID_NLMSG_ERR = 10, 48319974Shselasky IWPM_CREATE_MAPPING_ERR, 49319974Shselasky IWPM_DUPLICATE_MAPPING_ERR, 50319974Shselasky IWPM_UNKNOWN_MAPPING_ERR, 51319974Shselasky IWPM_CLIENT_DEV_INFO_ERR, 52319974Shselasky IWPM_USER_LIB_INFO_ERR, 53319974Shselasky IWPM_REMOTE_QUERY_REJECT 54319974Shselasky}; 55319974Shselasky 56319974Shselaskystruct iwpm_dev_data { 57319974Shselasky char dev_name[IWPM_DEVNAME_SIZE]; 58319974Shselasky char if_name[IWPM_IFNAME_SIZE]; 59319974Shselasky}; 60319974Shselasky 61319974Shselaskystruct iwpm_sa_data { 62319974Shselasky struct sockaddr_storage loc_addr; 63319974Shselasky struct sockaddr_storage mapped_loc_addr; 64319974Shselasky struct sockaddr_storage rem_addr; 65319974Shselasky struct sockaddr_storage mapped_rem_addr; 66319974Shselasky}; 67319974Shselasky 68319974Shselasky/** 69319974Shselasky * iwpm_valid_pid - Check if the userspace iwarp port mapper pid is valid 70319974Shselasky * 71319974Shselasky * Returns true if the pid is greater than zero, otherwise returns false 72319974Shselasky */ 73319974Shselaskyint iwpm_valid_pid(void); 74319974Shselasky 75319974Shselasky#endif /* _IW_PORTMAP_H */ 76