udp_diag.c (681e4a5e13c1c8315694eb4f44e0cdd84c9082d2) | udp_diag.c (62ad6fcd743792bf294f2a7ba26ab8f462065150) |
---|---|
1/* 2 * udp_diag.c Module for monitoring UDP transport protocols sockets. 3 * 4 * Authors: Pavel Emelyanov, <xemul@parallels.com> 5 * 6 * This program is free software; you can redistribute it and/or 7 * modify it under the terms of the GNU General Public License 8 * as published by the Free Software Foundation; either version --- 132 unchanged lines hidden (view full) --- 141} 142 143static int udp_diag_dump_one(struct sk_buff *in_skb, const struct nlmsghdr *nlh, 144 struct inet_diag_req_v2 *req) 145{ 146 return udp_dump_one(&udp_table, in_skb, nlh, req); 147} 148 | 1/* 2 * udp_diag.c Module for monitoring UDP transport protocols sockets. 3 * 4 * Authors: Pavel Emelyanov, <xemul@parallels.com> 5 * 6 * This program is free software; you can redistribute it and/or 7 * modify it under the terms of the GNU General Public License 8 * as published by the Free Software Foundation; either version --- 132 unchanged lines hidden (view full) --- 141} 142 143static int udp_diag_dump_one(struct sk_buff *in_skb, const struct nlmsghdr *nlh, 144 struct inet_diag_req_v2 *req) 145{ 146 return udp_dump_one(&udp_table, in_skb, nlh, req); 147} 148 |
149static void udp_diag_get_info(struct sock *sk, struct inet_diag_msg *r, 150 void *info) 151{ 152 r->idiag_rqueue = sk_rmem_alloc_get(sk); 153 r->idiag_wqueue = sk_wmem_alloc_get(sk); 154} 155 |
|
149static const struct inet_diag_handler udp_diag_handler = { 150 .dump = udp_diag_dump, 151 .dump_one = udp_diag_dump_one, | 156static const struct inet_diag_handler udp_diag_handler = { 157 .dump = udp_diag_dump, 158 .dump_one = udp_diag_dump_one, |
159 .idiag_get_info = udp_diag_get_info, |
|
152 .idiag_type = IPPROTO_UDP, 153}; 154 155static void udplite_diag_dump(struct sk_buff *skb, struct netlink_callback *cb, 156 struct inet_diag_req_v2 *r, struct nlattr *bc) 157{ 158 udp_dump(&udplite_table, skb, cb, r, bc); 159} 160 161static int udplite_diag_dump_one(struct sk_buff *in_skb, const struct nlmsghdr *nlh, 162 struct inet_diag_req_v2 *req) 163{ 164 return udp_dump_one(&udplite_table, in_skb, nlh, req); 165} 166 167static const struct inet_diag_handler udplite_diag_handler = { 168 .dump = udplite_diag_dump, 169 .dump_one = udplite_diag_dump_one, | 160 .idiag_type = IPPROTO_UDP, 161}; 162 163static void udplite_diag_dump(struct sk_buff *skb, struct netlink_callback *cb, 164 struct inet_diag_req_v2 *r, struct nlattr *bc) 165{ 166 udp_dump(&udplite_table, skb, cb, r, bc); 167} 168 169static int udplite_diag_dump_one(struct sk_buff *in_skb, const struct nlmsghdr *nlh, 170 struct inet_diag_req_v2 *req) 171{ 172 return udp_dump_one(&udplite_table, in_skb, nlh, req); 173} 174 175static const struct inet_diag_handler udplite_diag_handler = { 176 .dump = udplite_diag_dump, 177 .dump_one = udplite_diag_dump_one, |
178 .idiag_get_info = udp_diag_get_info, |
|
170 .idiag_type = IPPROTO_UDPLITE, 171}; 172 173static int __init udp_diag_init(void) 174{ 175 int err; 176 177 err = inet_diag_register(&udp_diag_handler); --- 23 unchanged lines hidden --- | 179 .idiag_type = IPPROTO_UDPLITE, 180}; 181 182static int __init udp_diag_init(void) 183{ 184 int err; 185 186 err = inet_diag_register(&udp_diag_handler); --- 23 unchanged lines hidden --- |