Blame view

include/linux/inet_diag.h 1.93 KB
73c1f4a03   Arnaldo Carvalho de Melo   [TCPDIAG]: Just r...
1
2
  #ifndef _INET_DIAG_H_
  #define _INET_DIAG_H_ 1
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
3

607ca46e9   David Howells   UAPI: (Scripted) ...
4
  #include <uapi/linux/inet_diag.h>
2df005b75   Jaswinder Singh Rajput   headers_check fix...
5

b613f56ec   Lorenzo Colitti   net: diag: split ...
6
  struct net;
4f5736c4c   Arnaldo Carvalho de Melo   [TCPDIAG]: Introd...
7
8
  struct sock;
  struct inet_hashinfo;
8d07d1518   Pavel Emelyanov   inet_diag: Introd...
9
  struct nlattr;
3c4d05c80   Pavel Emelyanov   inet_diag: Introd...
10
11
  struct nlmsghdr;
  struct sk_buff;
1942c518c   Pavel Emelyanov   inet_diag: Genera...
12
  struct netlink_callback;
4f5736c4c   Arnaldo Carvalho de Melo   [TCPDIAG]: Introd...
13
14
  
  struct inet_diag_handler {
34160ea3f   Eric Dumazet   inet_diag: add co...
15
16
17
18
19
20
21
22
23
24
25
26
  	void		(*dump)(struct sk_buff *skb,
  				struct netlink_callback *cb,
  				const struct inet_diag_req_v2 *r,
  				struct nlattr *bc);
  
  	int		(*dump_one)(struct sk_buff *in_skb,
  				    const struct nlmsghdr *nlh,
  				    const struct inet_diag_req_v2 *req);
  
  	void		(*idiag_get_info)(struct sock *sk,
  					  struct inet_diag_msg *r,
  					  void *info);
6eb5d2e08   Lorenzo Colitti   net: diag: Suppor...
27
28
29
  
  	int		(*destroy)(struct sk_buff *in_skb,
  				   const struct inet_diag_req_v2 *req);
34160ea3f   Eric Dumazet   inet_diag: add co...
30
  	__u16		idiag_type;
3fd22af80   Craig Gallek   sock_diag: specif...
31
  	__u16		idiag_info_size;
4f5736c4c   Arnaldo Carvalho de Melo   [TCPDIAG]: Introd...
32
  };
3c4d05c80   Pavel Emelyanov   inet_diag: Introd...
33
34
  struct inet_connection_sock;
  int inet_sk_diag_fill(struct sock *sk, struct inet_connection_sock *icsk,
34160ea3f   Eric Dumazet   inet_diag: add co...
35
36
37
  		      struct sk_buff *skb, const struct inet_diag_req_v2 *req,
  		      struct user_namespace *user_ns,
  		      u32 pid, u32 seq, u16 nlmsg_flags,
d545caca8   Lorenzo Colitti   net: inet: diag: ...
38
  		      const struct nlmsghdr *unlh, bool net_admin);
1942c518c   Pavel Emelyanov   inet_diag: Genera...
39
  void inet_diag_dump_icsk(struct inet_hashinfo *h, struct sk_buff *skb,
34160ea3f   Eric Dumazet   inet_diag: add co...
40
41
42
  			 struct netlink_callback *cb,
  			 const struct inet_diag_req_v2 *r,
  			 struct nlattr *bc);
1942c518c   Pavel Emelyanov   inet_diag: Genera...
43
  int inet_diag_dump_one_icsk(struct inet_hashinfo *hashinfo,
34160ea3f   Eric Dumazet   inet_diag: add co...
44
45
  			    struct sk_buff *in_skb, const struct nlmsghdr *nlh,
  			    const struct inet_diag_req_v2 *req);
1942c518c   Pavel Emelyanov   inet_diag: Genera...
46

b613f56ec   Lorenzo Colitti   net: diag: split ...
47
48
49
  struct sock *inet_diag_find_one_icsk(struct net *net,
  				     struct inet_hashinfo *hashinfo,
  				     const struct inet_diag_req_v2 *req);
8d07d1518   Pavel Emelyanov   inet_diag: Introd...
50
  int inet_diag_bc_sk(const struct nlattr *_bc, struct sock *sk);
b005ab4ef   Pavel Emelyanov   inet_diag: Export...
51

c3ec5e5ce   Ben Dooks   net: diag: add mi...
52
53
54
55
  void inet_diag_msg_common_fill(struct inet_diag_msg *r, struct sock *sk);
  
  int inet_diag_msg_attrs_fill(struct sock *sk, struct sk_buff *skb,
  			     struct inet_diag_msg *r, int ext,
d545caca8   Lorenzo Colitti   net: inet: diag: ...
56
  			     struct user_namespace *user_ns, bool net_admin);
c3ec5e5ce   Ben Dooks   net: diag: add mi...
57

4f5736c4c   Arnaldo Carvalho de Melo   [TCPDIAG]: Introd...
58
59
  extern int  inet_diag_register(const struct inet_diag_handler *handler);
  extern void inet_diag_unregister(const struct inet_diag_handler *handler);
73c1f4a03   Arnaldo Carvalho de Melo   [TCPDIAG]: Just r...
60
  #endif /* _INET_DIAG_H_ */