0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023
0024
0025
0026
0027
0028
0029
0030
0031
0032
0033
0034
0035 #ifndef _TIPC_SOCK_H
0036 #define _TIPC_SOCK_H
0037
0038 #include <net/sock.h>
0039 #include <net/genetlink.h>
0040
0041
0042 #define FLOWCTL_MSG_WIN 512
0043 #define FLOWCTL_MSG_LIM ((FLOWCTL_MSG_WIN * 2 + 1) * SKB_TRUESIZE(MAX_MSG_SIZE))
0044
0045 #define FLOWCTL_BLK_SZ 1024
0046
0047
0048 #define RCVBUF_MIN (FLOWCTL_BLK_SZ * 512)
0049 #define RCVBUF_DEF (FLOWCTL_BLK_SZ * 1024 * 2)
0050 #define RCVBUF_MAX (FLOWCTL_BLK_SZ * 1024 * 16)
0051
0052 struct tipc_sock;
0053
0054 int tipc_socket_init(void);
0055 void tipc_socket_stop(void);
0056 void tipc_sk_rcv(struct net *net, struct sk_buff_head *inputq);
0057 void tipc_sk_mcast_rcv(struct net *net, struct sk_buff_head *arrvq,
0058 struct sk_buff_head *inputq);
0059 void tipc_sk_reinit(struct net *net);
0060 int tipc_sk_rht_init(struct net *net);
0061 void tipc_sk_rht_destroy(struct net *net);
0062 int tipc_nl_sk_dump(struct sk_buff *skb, struct netlink_callback *cb);
0063 int tipc_nl_publ_dump(struct sk_buff *skb, struct netlink_callback *cb);
0064 int tipc_sk_fill_sock_diag(struct sk_buff *skb, struct netlink_callback *cb,
0065 struct tipc_sock *tsk, u32 sk_filter_state,
0066 u64 (*tipc_diag_gen_cookie)(struct sock *sk));
0067 int tipc_nl_sk_walk(struct sk_buff *skb, struct netlink_callback *cb,
0068 int (*skb_handler)(struct sk_buff *skb,
0069 struct netlink_callback *cb,
0070 struct tipc_sock *tsk));
0071 int tipc_dump_start(struct netlink_callback *cb);
0072 int __tipc_dump_start(struct netlink_callback *cb, struct net *net);
0073 int tipc_dump_done(struct netlink_callback *cb);
0074 u32 tipc_sock_get_portid(struct sock *sk);
0075 bool tipc_sk_overlimit1(struct sock *sk, struct sk_buff *skb);
0076 bool tipc_sk_overlimit2(struct sock *sk, struct sk_buff *skb);
0077 int tipc_sk_bind(struct socket *sock, struct sockaddr *skaddr, int alen);
0078 int tsk_set_importance(struct sock *sk, int imp);
0079
0080 #endif