18c2ecf20Sopenharmony_ci/* 28c2ecf20Sopenharmony_ci * net/tipc/group.h: Include file for TIPC group unicast/multicast functions 38c2ecf20Sopenharmony_ci * 48c2ecf20Sopenharmony_ci * Copyright (c) 2017, Ericsson AB 58c2ecf20Sopenharmony_ci * All rights reserved. 68c2ecf20Sopenharmony_ci * 78c2ecf20Sopenharmony_ci * Redistribution and use in source and binary forms, with or without 88c2ecf20Sopenharmony_ci * modification, are permitted provided that the following conditions are met: 98c2ecf20Sopenharmony_ci * 108c2ecf20Sopenharmony_ci * 1. Redistributions of source code must retain the above copyright 118c2ecf20Sopenharmony_ci * notice, this list of conditions and the following disclaimer. 128c2ecf20Sopenharmony_ci * 2. Redistributions in binary form must reproduce the above copyright 138c2ecf20Sopenharmony_ci * notice, this list of conditions and the following disclaimer in the 148c2ecf20Sopenharmony_ci * documentation and/or other materials provided with the distribution. 158c2ecf20Sopenharmony_ci * 3. Neither the names of the copyright holders nor the names of its 168c2ecf20Sopenharmony_ci * contributors may be used to endorse or promote products derived from 178c2ecf20Sopenharmony_ci * this software without specific prior written permission. 188c2ecf20Sopenharmony_ci * 198c2ecf20Sopenharmony_ci * Alternatively, this software may be distributed under the terms of the 208c2ecf20Sopenharmony_ci * GNU General Public License ("GPL") version 2 as published by the Free 218c2ecf20Sopenharmony_ci * Software Foundation. 228c2ecf20Sopenharmony_ci * 238c2ecf20Sopenharmony_ci * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 248c2ecf20Sopenharmony_ci * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 258c2ecf20Sopenharmony_ci * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 268c2ecf20Sopenharmony_ci * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 278c2ecf20Sopenharmony_ci * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 288c2ecf20Sopenharmony_ci * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 298c2ecf20Sopenharmony_ci * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 308c2ecf20Sopenharmony_ci * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 318c2ecf20Sopenharmony_ci * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 328c2ecf20Sopenharmony_ci * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 338c2ecf20Sopenharmony_ci * POSSIBILITY OF SUCH DAMAGE. 348c2ecf20Sopenharmony_ci */ 358c2ecf20Sopenharmony_ci 368c2ecf20Sopenharmony_ci#ifndef _TIPC_GROUP_H 378c2ecf20Sopenharmony_ci#define _TIPC_GROUP_H 388c2ecf20Sopenharmony_ci 398c2ecf20Sopenharmony_ci#include "core.h" 408c2ecf20Sopenharmony_ci 418c2ecf20Sopenharmony_cistruct tipc_group; 428c2ecf20Sopenharmony_cistruct tipc_member; 438c2ecf20Sopenharmony_cistruct tipc_msg; 448c2ecf20Sopenharmony_ci 458c2ecf20Sopenharmony_cistruct tipc_group *tipc_group_create(struct net *net, u32 portid, 468c2ecf20Sopenharmony_ci struct tipc_group_req *mreq, 478c2ecf20Sopenharmony_ci bool *group_is_open); 488c2ecf20Sopenharmony_civoid tipc_group_join(struct net *net, struct tipc_group *grp, int *sk_rcv_buf); 498c2ecf20Sopenharmony_civoid tipc_group_delete(struct net *net, struct tipc_group *grp); 508c2ecf20Sopenharmony_civoid tipc_group_add_member(struct tipc_group *grp, u32 node, 518c2ecf20Sopenharmony_ci u32 port, u32 instance); 528c2ecf20Sopenharmony_cistruct tipc_nlist *tipc_group_dests(struct tipc_group *grp); 538c2ecf20Sopenharmony_civoid tipc_group_self(struct tipc_group *grp, struct tipc_name_seq *seq, 548c2ecf20Sopenharmony_ci int *scope); 558c2ecf20Sopenharmony_ciu32 tipc_group_exclude(struct tipc_group *grp); 568c2ecf20Sopenharmony_civoid tipc_group_filter_msg(struct tipc_group *grp, 578c2ecf20Sopenharmony_ci struct sk_buff_head *inputq, 588c2ecf20Sopenharmony_ci struct sk_buff_head *xmitq); 598c2ecf20Sopenharmony_civoid tipc_group_member_evt(struct tipc_group *grp, bool *wakeup, 608c2ecf20Sopenharmony_ci int *sk_rcvbuf, struct tipc_msg *hdr, 618c2ecf20Sopenharmony_ci struct sk_buff_head *inputq, 628c2ecf20Sopenharmony_ci struct sk_buff_head *xmitq); 638c2ecf20Sopenharmony_civoid tipc_group_proto_rcv(struct tipc_group *grp, bool *wakeup, 648c2ecf20Sopenharmony_ci struct tipc_msg *hdr, 658c2ecf20Sopenharmony_ci struct sk_buff_head *inputq, 668c2ecf20Sopenharmony_ci struct sk_buff_head *xmitq); 678c2ecf20Sopenharmony_civoid tipc_group_update_bc_members(struct tipc_group *grp, int len, bool ack); 688c2ecf20Sopenharmony_cibool tipc_group_cong(struct tipc_group *grp, u32 dnode, u32 dport, 698c2ecf20Sopenharmony_ci int len, struct tipc_member **m); 708c2ecf20Sopenharmony_cibool tipc_group_bc_cong(struct tipc_group *grp, int len); 718c2ecf20Sopenharmony_civoid tipc_group_update_rcv_win(struct tipc_group *grp, int blks, u32 node, 728c2ecf20Sopenharmony_ci u32 port, struct sk_buff_head *xmitq); 738c2ecf20Sopenharmony_ciu16 tipc_group_bc_snd_nxt(struct tipc_group *grp); 748c2ecf20Sopenharmony_civoid tipc_group_update_member(struct tipc_member *m, int len); 758c2ecf20Sopenharmony_ciint tipc_group_fill_sock_diag(struct tipc_group *grp, struct sk_buff *skb); 768c2ecf20Sopenharmony_ci#endif 77