1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35#ifndef _TIPC_SOCK_H
36#define _TIPC_SOCK_H
37
38#include <net/sock.h>
39#include <net/genetlink.h>
40
41
42#define FLOWCTL_MSG_WIN 512
43#define FLOWCTL_MSG_LIM ((FLOWCTL_MSG_WIN * 2 + 1) * SKB_TRUESIZE(MAX_MSG_SIZE))
44
45#define FLOWCTL_BLK_SZ 1024
46
47
48#define RCVBUF_MIN (FLOWCTL_BLK_SZ * 512)
49#define RCVBUF_DEF (FLOWCTL_BLK_SZ * 1024 * 2)
50#define RCVBUF_MAX (FLOWCTL_BLK_SZ * 1024 * 16)
51
52struct tipc_sock;
53
54int tipc_socket_init(void);
55void tipc_socket_stop(void);
56void tipc_sk_rcv(struct net *net, struct sk_buff_head *inputq);
57void tipc_sk_mcast_rcv(struct net *net, struct sk_buff_head *arrvq,
58 struct sk_buff_head *inputq);
59void tipc_sk_reinit(struct net *net);
60int tipc_sk_rht_init(struct net *net);
61void tipc_sk_rht_destroy(struct net *net);
62int tipc_nl_sk_dump(struct sk_buff *skb, struct netlink_callback *cb);
63int tipc_nl_publ_dump(struct sk_buff *skb, struct netlink_callback *cb);
64int tipc_sk_fill_sock_diag(struct sk_buff *skb, struct netlink_callback *cb,
65 struct tipc_sock *tsk, u32 sk_filter_state,
66 u64 (*tipc_diag_gen_cookie)(struct sock *sk));
67int tipc_nl_sk_walk(struct sk_buff *skb, struct netlink_callback *cb,
68 int (*skb_handler)(struct sk_buff *skb,
69 struct netlink_callback *cb,
70 struct tipc_sock *tsk));
71int tipc_dump_start(struct netlink_callback *cb);
72int __tipc_dump_start(struct netlink_callback *cb, struct net *net);
73int tipc_dump_done(struct netlink_callback *cb);
74u32 tipc_sock_get_portid(struct sock *sk);
75bool tipc_sk_overlimit1(struct sock *sk, struct sk_buff *skb);
76bool tipc_sk_overlimit2(struct sock *sk, struct sk_buff *skb);
77int tipc_sk_bind(struct socket *sock, struct sockaddr *skaddr, int alen);
78int tsk_set_importance(struct sock *sk, int imp);
79
80#endif
81