2011-12-27 14:24:47 +04:00
|
|
|
#ifndef CR_SOCKETS_H__
|
|
|
|
#define CR_SOCKETS_H__
|
|
|
|
|
2012-01-12 23:50:45 +04:00
|
|
|
#include <sys/types.h>
|
|
|
|
#include <unistd.h>
|
2011-12-27 14:24:47 +04:00
|
|
|
#include <stdbool.h>
|
|
|
|
|
2012-02-29 16:06:40 +03:00
|
|
|
struct sk_queue_item {
|
|
|
|
int fd;
|
|
|
|
int type;
|
|
|
|
unsigned int sk_id;
|
|
|
|
};
|
|
|
|
|
2012-02-29 16:06:48 +03:00
|
|
|
struct sk_queue_entry {
|
|
|
|
struct sk_queue_item item;
|
|
|
|
struct sk_queue_entry *next;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct sk_queue {
|
|
|
|
unsigned int entries;
|
|
|
|
struct sk_queue_entry *list;
|
|
|
|
};
|
|
|
|
|
2011-12-26 22:12:03 +04:00
|
|
|
struct cr_fdset;
|
2012-03-29 16:40:10 +04:00
|
|
|
struct fd_parms;
|
|
|
|
extern int dump_socket(struct fd_parms *p, int lfd,
|
|
|
|
const struct cr_fdset *cr_fdset, struct sk_queue *queue);
|
2011-12-27 14:24:47 +04:00
|
|
|
|
|
|
|
extern int collect_sockets(void);
|
|
|
|
extern int prepare_sockets(int pid);
|
2012-03-27 12:42:59 +04:00
|
|
|
struct fdinfo_entry;
|
|
|
|
extern int open_inet_sk(struct fdinfo_entry *fe);
|
2012-03-27 12:01:14 +04:00
|
|
|
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 *);
|
2011-12-27 14:24:47 +04:00
|
|
|
|
|
|
|
#endif /* CR_SOCKETS_H__ */
|