1 /* SPDX-License-Identifier: LGPL-2.1-or-later */ 2 #pragma once 3 4 #include <errno.h> 5 6 #include "conf-parser.h" 7 #include "netdev.h" 8 9 typedef enum IPoIBMode { 10 IP_OVER_INFINIBAND_MODE_DATAGRAM, 11 IP_OVER_INFINIBAND_MODE_CONNECTED, 12 _IP_OVER_INFINIBAND_MODE_MAX, 13 _IP_OVER_INFINIBAND_MODE_INVALID = -EINVAL, 14 } IPoIBMode; 15 16 typedef struct IPoIB { 17 NetDev meta; 18 19 uint16_t pkey; 20 IPoIBMode mode; 21 int umcast; 22 } IPoIB; 23 24 DEFINE_NETDEV_CAST(IPOIB, IPoIB); 25 extern const NetDevVTable ipoib_vtable; 26 27 int ipoib_set_netlink_message(Link *link, sd_netlink_message *m); 28 29 CONFIG_PARSER_PROTOTYPE(config_parse_ipoib_pkey); 30 CONFIG_PARSER_PROTOTYPE(config_parse_ipoib_mode); 31