Path: blob/main/sys/ofed/include/rdma/iw_portmap.h
39482 views
/*-1* SPDX-License-Identifier: BSD-2-Clause OR GPL-2.02*3* Copyright (c) 2014 Intel Corporation. All rights reserved.4* Copyright (c) 2014 Chelsio, Inc. All rights reserved.5*6* This software is available to you under a choice of one of two7* licenses. You may choose to be licensed under the terms of the GNU8* General Public License (GPL) Version 2, available from the file9* COPYING in the main directory of this source tree, or the10* OpenIB.org BSD license below:11*12* Redistribution and use in source and binary forms, with or13* without modification, are permitted provided that the following14* conditions are met:15*16* - Redistributions of source code must retain the above17* copyright notice, this list of conditions and the following18* disclaimer.19*20* - Redistributions in binary form must reproduce the above21* copyright notice, this list of conditions and the following22* disclaimer in the documentation and/or other materials23* provided with the distribution.24*25* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,26* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF27* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND28* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS29* BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN30* ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN31* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE32* SOFTWARE.33*/3435#ifndef _IW_PORTMAP_H36#define _IW_PORTMAP_H3738#define IWPM_ULIBNAME_SIZE 3239#define IWPM_DEVNAME_SIZE 3240#define IWPM_IFNAME_SIZE 1641#define IWPM_IPADDR_SIZE 164243enum {44IWPM_INVALID_NLMSG_ERR = 10,45IWPM_CREATE_MAPPING_ERR,46IWPM_DUPLICATE_MAPPING_ERR,47IWPM_UNKNOWN_MAPPING_ERR,48IWPM_CLIENT_DEV_INFO_ERR,49IWPM_USER_LIB_INFO_ERR,50IWPM_REMOTE_QUERY_REJECT51};5253struct iwpm_dev_data {54char dev_name[IWPM_DEVNAME_SIZE];55char if_name[IWPM_IFNAME_SIZE];56};5758struct iwpm_sa_data {59struct sockaddr_storage loc_addr;60struct sockaddr_storage mapped_loc_addr;61struct sockaddr_storage rem_addr;62struct sockaddr_storage mapped_rem_addr;63};6465/**66* iwpm_valid_pid - Check if the userspace iwarp port mapper pid is valid67*68* Returns true if the pid is greater than zero, otherwise returns false69*/70int iwpm_valid_pid(void);7172#endif /* _IW_PORTMAP_H */737475