1 /* SPDX-License-Identifier: GPL-2.0 */
8 #include <linux/compat.h>
10 struct compat_msghdr {
11 compat_uptr_t msg_name; /* void * */
12 compat_int_t msg_namelen;
13 compat_uptr_t msg_iov; /* struct compat_iovec * */
14 compat_size_t msg_iovlen;
15 compat_uptr_t msg_control; /* void * */
16 compat_size_t msg_controllen;
17 compat_uint_t msg_flags;
20 struct compat_mmsghdr {
21 struct compat_msghdr msg_hdr;
22 compat_uint_t msg_len;
25 struct compat_cmsghdr {
26 compat_size_t cmsg_len;
27 compat_int_t cmsg_level;
28 compat_int_t cmsg_type;
31 struct compat_rtentry {
33 struct sockaddr rt_dst; /* target address */
34 struct sockaddr rt_gateway; /* gateway addr (RTF_GATEWAY) */
35 struct sockaddr rt_genmask; /* target network mask (IP) */
36 unsigned short rt_flags;
40 unsigned char rt_class;
42 short rt_metric; /* +1 for binary compatibility! */
43 compat_uptr_t rt_dev; /* forcing the device at add */
44 u32 rt_mtu; /* per route MTU/Window */
45 u32 rt_window; /* Window clamping */
46 unsigned short rt_irtt; /* Initial RTT */
49 int __get_compat_msghdr(struct msghdr *kmsg, struct compat_msghdr *msg,
50 struct sockaddr __user **save_addr);
51 int get_compat_msghdr(struct msghdr *, struct compat_msghdr __user *,
52 struct sockaddr __user **, struct iovec **);
53 int put_cmsg_compat(struct msghdr*, int, int, int, void *);
55 int cmsghdr_from_user_compat_to_kern(struct msghdr *, struct sock *,
56 unsigned char *, int);
58 struct compat_group_req {
60 struct __kernel_sockaddr_storage gr_group
64 struct compat_group_source_req {
66 struct __kernel_sockaddr_storage gsr_group
68 struct __kernel_sockaddr_storage gsr_source
72 struct compat_group_filter {
75 __u32 gf_interface_aux;
76 struct __kernel_sockaddr_storage gf_group_aux
80 struct __kernel_sockaddr_storage gf_slist[1]
85 struct __kernel_sockaddr_storage gf_group
89 struct __kernel_sockaddr_storage gf_slist_flex[]
95 #endif /* NET_COMPAT_H */