#ifndef _LINUX_SOCKET_H
#define _LINUX_SOCKET_H
#include <asm/socket.h>
#include <linux/sockios.h>
#include <linux/uio.h>
#include <linux/types.h>
#include <linux/compiler.h>
#include <uapi/linux/socket.h>
struct file;
struct pid;
struct cred;
struct socket;
struct sock;
struct sk_buff;
struct proto_accept_arg;
#define __sockaddr_check_size(size) …
#ifdef CONFIG_PROC_FS
struct seq_file;
extern void socket_seq_show(struct seq_file *seq);
#endif
sa_family_t;
struct sockaddr { … };
struct linger { … };
#define sockaddr_storage …
struct msghdr { … };
struct user_msghdr { … };
struct mmsghdr { … };
struct cmsghdr { … };
#define __CMSG_NXTHDR(ctl, len, cmsg) …
#define CMSG_NXTHDR(mhdr, cmsg) …
#define CMSG_ALIGN(len) …
#define CMSG_DATA(cmsg) …
#define CMSG_USER_DATA(cmsg) …
#define CMSG_SPACE(len) …
#define CMSG_LEN(len) …
#define __CMSG_FIRSTHDR(ctl,len) …
#define CMSG_FIRSTHDR(msg) …
#define CMSG_OK(mhdr, cmsg) …
#define for_each_cmsghdr(cmsg, msg) …
static inline struct cmsghdr * __cmsg_nxthdr(void *__ctl, __kernel_size_t __size,
struct cmsghdr *__cmsg)
{ … }
static inline struct cmsghdr * cmsg_nxthdr (struct msghdr *__msg, struct cmsghdr *__cmsg)
{ … }
static inline size_t msg_data_left(struct msghdr *msg)
{ … }
#define SCM_RIGHTS …
#define SCM_CREDENTIALS …
#define SCM_SECURITY …
#define SCM_PIDFD …
struct ucred { … };
#define AF_UNSPEC …
#define AF_UNIX …
#define AF_LOCAL …
#define AF_INET …
#define AF_AX25 …
#define AF_IPX …
#define AF_APPLETALK …
#define AF_NETROM …
#define AF_BRIDGE …
#define AF_ATMPVC …
#define AF_X25 …
#define AF_INET6 …
#define AF_ROSE …
#define AF_DECnet …
#define AF_NETBEUI …
#define AF_SECURITY …
#define AF_KEY …
#define AF_NETLINK …
#define AF_ROUTE …
#define AF_PACKET …
#define AF_ASH …
#define AF_ECONET …
#define AF_ATMSVC …
#define AF_RDS …
#define AF_SNA …
#define AF_IRDA …
#define AF_PPPOX …
#define AF_WANPIPE …
#define AF_LLC …
#define AF_IB …
#define AF_MPLS …
#define AF_CAN …
#define AF_TIPC …
#define AF_BLUETOOTH …
#define AF_IUCV …
#define AF_RXRPC …
#define AF_ISDN …
#define AF_PHONET …
#define AF_IEEE802154 …
#define AF_CAIF …
#define AF_ALG …
#define AF_NFC …
#define AF_VSOCK …
#define AF_KCM …
#define AF_QIPCRTR …
#define AF_SMC …
#define AF_XDP …
#define AF_MCTP …
#define AF_MAX …
#define PF_UNSPEC …
#define PF_UNIX …
#define PF_LOCAL …
#define PF_INET …
#define PF_AX25 …
#define PF_IPX …
#define PF_APPLETALK …
#define PF_NETROM …
#define PF_BRIDGE …
#define PF_ATMPVC …
#define PF_X25 …
#define PF_INET6 …
#define PF_ROSE …
#define PF_DECnet …
#define PF_NETBEUI …
#define PF_SECURITY …
#define PF_KEY …
#define PF_NETLINK …
#define PF_ROUTE …
#define PF_PACKET …
#define PF_ASH …
#define PF_ECONET …
#define PF_ATMSVC …
#define PF_RDS …
#define PF_SNA …
#define PF_IRDA …
#define PF_PPPOX …
#define PF_WANPIPE …
#define PF_LLC …
#define PF_IB …
#define PF_MPLS …
#define PF_CAN …
#define PF_TIPC …
#define PF_BLUETOOTH …
#define PF_IUCV …
#define PF_RXRPC …
#define PF_ISDN …
#define PF_PHONET …
#define PF_IEEE802154 …
#define PF_CAIF …
#define PF_ALG …
#define PF_NFC …
#define PF_VSOCK …
#define PF_KCM …
#define PF_QIPCRTR …
#define PF_SMC …
#define PF_XDP …
#define PF_MCTP …
#define PF_MAX …
#define SOMAXCONN …
#define MSG_OOB …
#define MSG_PEEK …
#define MSG_DONTROUTE …
#define MSG_TRYHARD …
#define MSG_CTRUNC …
#define MSG_PROBE …
#define MSG_TRUNC …
#define MSG_DONTWAIT …
#define MSG_EOR …
#define MSG_WAITALL …
#define MSG_FIN …
#define MSG_SYN …
#define MSG_CONFIRM …
#define MSG_RST …
#define MSG_ERRQUEUE …
#define MSG_NOSIGNAL …
#define MSG_MORE …
#define MSG_WAITFORONE …
#define MSG_SENDPAGE_NOPOLICY …
#define MSG_BATCH …
#define MSG_EOF …
#define MSG_NO_SHARED_FRAGS …
#define MSG_SENDPAGE_DECRYPTED …
#define MSG_ZEROCOPY …
#define MSG_SPLICE_PAGES …
#define MSG_FASTOPEN …
#define MSG_CMSG_CLOEXEC …
#if defined(CONFIG_COMPAT)
#define MSG_CMSG_COMPAT …
#else
#define MSG_CMSG_COMPAT …
#endif
#define MSG_INTERNAL_SENDMSG_FLAGS …
#define SOL_IP …
#define SOL_TCP …
#define SOL_UDP …
#define SOL_IPV6 …
#define SOL_ICMPV6 …
#define SOL_SCTP …
#define SOL_UDPLITE …
#define SOL_RAW …
#define SOL_IPX …
#define SOL_AX25 …
#define SOL_ATALK …
#define SOL_NETROM …
#define SOL_ROSE …
#define SOL_DECNET …
#define SOL_X25 …
#define SOL_PACKET …
#define SOL_ATM …
#define SOL_AAL …
#define SOL_IRDA …
#define SOL_NETBEUI …
#define SOL_LLC …
#define SOL_DCCP …
#define SOL_NETLINK …
#define SOL_TIPC …
#define SOL_RXRPC …
#define SOL_PPPOL2TP …
#define SOL_BLUETOOTH …
#define SOL_PNPIPE …
#define SOL_RDS …
#define SOL_IUCV …
#define SOL_CAIF …
#define SOL_ALG …
#define SOL_NFC …
#define SOL_KCM …
#define SOL_TLS …
#define SOL_XDP …
#define SOL_MPTCP …
#define SOL_MCTP …
#define SOL_SMC …
#define SOL_VSOCK …
#define IPX_TYPE …
extern int move_addr_to_kernel(void __user *uaddr, int ulen, struct sockaddr_storage *kaddr);
extern int put_cmsg(struct msghdr*, int level, int type, int len, void *data);
struct timespec64;
struct __kernel_timespec;
struct old_timespec32;
struct scm_timestamping_internal { … };
extern void put_cmsg_scm_timestamping64(struct msghdr *msg, struct scm_timestamping_internal *tss);
extern void put_cmsg_scm_timestamping(struct msghdr *msg, struct scm_timestamping_internal *tss);
extern long __sys_recvmsg(int fd, struct user_msghdr __user *msg,
unsigned int flags, bool forbid_cmsg_compat);
extern long __sys_sendmsg(int fd, struct user_msghdr __user *msg,
unsigned int flags, bool forbid_cmsg_compat);
extern int __sys_recvmmsg(int fd, struct mmsghdr __user *mmsg,
unsigned int vlen, unsigned int flags,
struct __kernel_timespec __user *timeout,
struct old_timespec32 __user *timeout32);
extern int __sys_sendmmsg(int fd, struct mmsghdr __user *mmsg,
unsigned int vlen, unsigned int flags,
bool forbid_cmsg_compat);
extern long __sys_sendmsg_sock(struct socket *sock, struct msghdr *msg,
unsigned int flags);
extern long __sys_recvmsg_sock(struct socket *sock, struct msghdr *msg,
struct user_msghdr __user *umsg,
struct sockaddr __user *uaddr,
unsigned int flags);
extern int __copy_msghdr(struct msghdr *kmsg,
struct user_msghdr *umsg,
struct sockaddr __user **save_addr);
extern int __sys_recvfrom(int fd, void __user *ubuf, size_t size,
unsigned int flags, struct sockaddr __user *addr,
int __user *addr_len);
extern int __sys_sendto(int fd, void __user *buff, size_t len,
unsigned int flags, struct sockaddr __user *addr,
int addr_len);
extern struct file *do_accept(struct file *file, struct proto_accept_arg *arg,
struct sockaddr __user *upeer_sockaddr,
int __user *upeer_addrlen, int flags);
extern int __sys_accept4(int fd, struct sockaddr __user *upeer_sockaddr,
int __user *upeer_addrlen, int flags);
extern int __sys_socket(int family, int type, int protocol);
extern struct file *__sys_socket_file(int family, int type, int protocol);
extern int __sys_bind(int fd, struct sockaddr __user *umyaddr, int addrlen);
extern int __sys_bind_socket(struct socket *sock, struct sockaddr_storage *address,
int addrlen);
extern int __sys_connect_file(struct file *file, struct sockaddr_storage *addr,
int addrlen, int file_flags);
extern int __sys_connect(int fd, struct sockaddr __user *uservaddr,
int addrlen);
extern int __sys_listen(int fd, int backlog);
extern int __sys_listen_socket(struct socket *sock, int backlog);
extern int __sys_getsockname(int fd, struct sockaddr __user *usockaddr,
int __user *usockaddr_len);
extern int __sys_getpeername(int fd, struct sockaddr __user *usockaddr,
int __user *usockaddr_len);
extern int __sys_socketpair(int family, int type, int protocol,
int __user *usockvec);
extern int __sys_shutdown_sock(struct socket *sock, int how);
extern int __sys_shutdown(int fd, int how);
#endif