162306a36Sopenharmony_ci/* 262306a36Sopenharmony_ci * net/tipc/group.h: Include file for TIPC group unicast/multicast functions 362306a36Sopenharmony_ci * 462306a36Sopenharmony_ci * Copyright (c) 2017, Ericsson AB 562306a36Sopenharmony_ci * Copyright (c) 2020, Red Hat Inc 662306a36Sopenharmony_ci * All rights reserved. 762306a36Sopenharmony_ci * 862306a36Sopenharmony_ci * Redistribution and use in source and binary forms, with or without 962306a36Sopenharmony_ci * modification, are permitted provided that the following conditions are met: 1062306a36Sopenharmony_ci * 1162306a36Sopenharmony_ci * 1. Redistributions of source code must retain the above copyright 1262306a36Sopenharmony_ci * notice, this list of conditions and the following disclaimer. 1362306a36Sopenharmony_ci * 2. Redistributions in binary form must reproduce the above copyright 1462306a36Sopenharmony_ci * notice, this list of conditions and the following disclaimer in the 1562306a36Sopenharmony_ci * documentation and/or other materials provided with the distribution. 1662306a36Sopenharmony_ci * 3. Neither the names of the copyright holders nor the names of its 1762306a36Sopenharmony_ci * contributors may be used to endorse or promote products derived from 1862306a36Sopenharmony_ci * this software without specific prior written permission. 1962306a36Sopenharmony_ci * 2062306a36Sopenharmony_ci * Alternatively, this software may be distributed under the terms of the 2162306a36Sopenharmony_ci * GNU General Public License ("GPL") version 2 as published by the Free 2262306a36Sopenharmony_ci * Software Foundation. 2362306a36Sopenharmony_ci * 2462306a36Sopenharmony_ci * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 2562306a36Sopenharmony_ci * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 2662306a36Sopenharmony_ci * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 2762306a36Sopenharmony_ci * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 2862306a36Sopenharmony_ci * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 2962306a36Sopenharmony_ci * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 3062306a36Sopenharmony_ci * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 3162306a36Sopenharmony_ci * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 3262306a36Sopenharmony_ci * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 3362306a36Sopenharmony_ci * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 3462306a36Sopenharmony_ci * POSSIBILITY OF SUCH DAMAGE. 3562306a36Sopenharmony_ci */ 3662306a36Sopenharmony_ci 3762306a36Sopenharmony_ci#ifndef _TIPC_GROUP_H 3862306a36Sopenharmony_ci#define _TIPC_GROUP_H 3962306a36Sopenharmony_ci 4062306a36Sopenharmony_ci#include "core.h" 4162306a36Sopenharmony_ci 4262306a36Sopenharmony_cistruct tipc_group; 4362306a36Sopenharmony_cistruct tipc_member; 4462306a36Sopenharmony_cistruct tipc_msg; 4562306a36Sopenharmony_ci 4662306a36Sopenharmony_cistruct tipc_group *tipc_group_create(struct net *net, u32 portid, 4762306a36Sopenharmony_ci struct tipc_group_req *mreq, 4862306a36Sopenharmony_ci bool *group_is_open); 4962306a36Sopenharmony_civoid tipc_group_join(struct net *net, struct tipc_group *grp, int *sk_rcv_buf); 5062306a36Sopenharmony_civoid tipc_group_delete(struct net *net, struct tipc_group *grp); 5162306a36Sopenharmony_civoid tipc_group_add_member(struct tipc_group *grp, u32 node, 5262306a36Sopenharmony_ci u32 port, u32 instance); 5362306a36Sopenharmony_cistruct tipc_nlist *tipc_group_dests(struct tipc_group *grp); 5462306a36Sopenharmony_civoid tipc_group_self(struct tipc_group *grp, struct tipc_service_range *seq, 5562306a36Sopenharmony_ci int *scope); 5662306a36Sopenharmony_ciu32 tipc_group_exclude(struct tipc_group *grp); 5762306a36Sopenharmony_civoid tipc_group_filter_msg(struct tipc_group *grp, 5862306a36Sopenharmony_ci struct sk_buff_head *inputq, 5962306a36Sopenharmony_ci struct sk_buff_head *xmitq); 6062306a36Sopenharmony_civoid tipc_group_member_evt(struct tipc_group *grp, bool *wakeup, 6162306a36Sopenharmony_ci int *sk_rcvbuf, struct tipc_msg *hdr, 6262306a36Sopenharmony_ci struct sk_buff_head *inputq, 6362306a36Sopenharmony_ci struct sk_buff_head *xmitq); 6462306a36Sopenharmony_civoid tipc_group_proto_rcv(struct tipc_group *grp, bool *wakeup, 6562306a36Sopenharmony_ci struct tipc_msg *hdr, 6662306a36Sopenharmony_ci struct sk_buff_head *inputq, 6762306a36Sopenharmony_ci struct sk_buff_head *xmitq); 6862306a36Sopenharmony_civoid tipc_group_update_bc_members(struct tipc_group *grp, int len, bool ack); 6962306a36Sopenharmony_cibool tipc_group_cong(struct tipc_group *grp, u32 dnode, u32 dport, 7062306a36Sopenharmony_ci int len, struct tipc_member **m); 7162306a36Sopenharmony_cibool tipc_group_bc_cong(struct tipc_group *grp, int len); 7262306a36Sopenharmony_civoid tipc_group_update_rcv_win(struct tipc_group *grp, int blks, u32 node, 7362306a36Sopenharmony_ci u32 port, struct sk_buff_head *xmitq); 7462306a36Sopenharmony_ciu16 tipc_group_bc_snd_nxt(struct tipc_group *grp); 7562306a36Sopenharmony_civoid tipc_group_update_member(struct tipc_member *m, int len); 7662306a36Sopenharmony_ciint tipc_group_fill_sock_diag(struct tipc_group *grp, struct sk_buff *skb); 7762306a36Sopenharmony_ci#endif 78