Commit f1690ee0 authored by Cyrill Gorcunov's avatar Cyrill Gorcunov Committed by Pavel Emelyanov

Beautify include/sockets.h

Make it more readable.
Signed-off-by: 's avatarCyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
parent a411c8f2
......@@ -5,33 +5,16 @@
#include <unistd.h>
#include <stdbool.h>
struct cr_fdset;
struct fd_parms;
extern int dump_socket(struct fd_parms *p, int lfd,
const struct cr_fdset *cr_fdset);
struct sk_opts_entry;
extern int dump_socket_opts(int sk, struct sk_opts_entry *);
extern int restore_socket_opts(int sk, struct sk_opts_entry *);
extern void show_socket_opts(struct sk_opts_entry *);
#include "types.h"
struct fdinfo_list_entry;
struct file_desc;
struct sk_opts_entry;
struct fdinfo_entry;
extern int collect_sockets(void);
extern int fix_external_unix_sockets(void);
extern int collect_inet_sockets(void);
extern int collect_unix_sockets(void);
extern int resolve_unix_peers(void);
extern int run_unix_connections(void);
struct cr_options;
extern void show_unixsk(int fd, struct cr_options *);
extern void show_inetsk(int fd, struct cr_options *);
extern void show_sk_queues(int fd, struct cr_options *);
char *skfamily2s(u32 f);
char *sktype2s(u32 t);
char *skproto2s(u32 p);
char *skstate2s(u32 state);
struct file_desc;
struct fd_parms;
struct cr_fdset;
struct nlmsghdr;
struct socket_desc {
unsigned int family;
......@@ -40,13 +23,36 @@ struct socket_desc {
int already_dumped;
};
struct socket_desc *lookup_socket(int ino);
int sk_collect_one(int ino, int family, struct socket_desc *d);
int dump_one_inet(struct socket_desc *_sk, struct fd_parms *p,
int lfd, const struct cr_fdset *cr_fdset);
int dump_one_unix(const struct socket_desc *_sk, struct fd_parms *p,
int lfd, const struct cr_fdset *cr_fdset);
struct nlmsghdr;
int inet_collect_one(struct nlmsghdr *h, int family, int type, int proto);
int unix_receive_one(struct nlmsghdr *h);
extern int dump_socket(struct fd_parms *p, int lfd, const struct cr_fdset *cr_fdset);
extern int dump_socket_opts(int sk, struct sk_opts_entry *soe);
extern int restore_socket_opts(int sk, struct sk_opts_entry *soe);
extern void show_socket_opts(struct sk_opts_entry *soe);
extern int sk_collect_one(int ino, int family, struct socket_desc *d);
extern int collect_sockets(void);
extern int collect_inet_sockets(void);
extern int collect_unix_sockets(void);
extern int fix_external_unix_sockets(void);
extern int resolve_unix_peers(void);
extern int run_unix_connections(void);
extern void show_unixsk(int fd, struct cr_options *o);
extern void show_inetsk(int fd, struct cr_options *o);
extern void show_sk_queues(int fd, struct cr_options *o);
extern char *skfamily2s(u32 f);
extern char *sktype2s(u32 t);
extern char *skproto2s(u32 p);
extern char *skstate2s(u32 state);
extern struct socket_desc *lookup_socket(int ino);
extern int dump_one_inet(struct socket_desc *_sk, struct fd_parms *p,
int lfd, const struct cr_fdset *cr_fdset);
extern int dump_one_unix(const struct socket_desc *_sk, struct fd_parms *p,
int lfd, const struct cr_fdset *cr_fdset);
extern int inet_collect_one(struct nlmsghdr *h, int family, int type, int proto);
extern int unix_receive_one(struct nlmsghdr *h);
#endif /* CR_SOCKETS_H__ */
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment